Fixed unit tests building broken by the previous commit.
This commit is contained in:
22
auto/sources
22
auto/sources
@@ -66,6 +66,9 @@ NXT_LIB_DEPS=" \
|
|||||||
src/nxt_job_resolve.h \
|
src/nxt_job_resolve.h \
|
||||||
src/nxt_listen_socket.h \
|
src/nxt_listen_socket.h \
|
||||||
src/nxt_http_parse.h \
|
src/nxt_http_parse.h \
|
||||||
|
src/nxt_runtime.h \
|
||||||
|
src/nxt_application.h \
|
||||||
|
src/nxt_master_process.h \
|
||||||
"
|
"
|
||||||
|
|
||||||
NXT_LIB_SRCS=" \
|
NXT_LIB_SRCS=" \
|
||||||
@@ -130,6 +133,14 @@ NXT_LIB_SRCS=" \
|
|||||||
src/nxt_listen_socket.c \
|
src/nxt_listen_socket.c \
|
||||||
src/nxt_upstream_round_robin.c \
|
src/nxt_upstream_round_robin.c \
|
||||||
src/nxt_http_parse.c \
|
src/nxt_http_parse.c \
|
||||||
|
src/nxt_app_log.c \
|
||||||
|
src/nxt_runtime.c \
|
||||||
|
src/nxt_stream_module.c \
|
||||||
|
src/nxt_master_process.c \
|
||||||
|
src/nxt_worker_process.c \
|
||||||
|
src/nxt_controller.c \
|
||||||
|
src/nxt_router.c \
|
||||||
|
src/nxt_application.c \
|
||||||
"
|
"
|
||||||
|
|
||||||
NXT_LIB_SRC0=" \
|
NXT_LIB_SRC0=" \
|
||||||
@@ -321,19 +332,8 @@ if [ $NXT_LIB_UNIT_TEST = YES ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
NXT_DEPS=" \
|
NXT_DEPS=" \
|
||||||
src/nxt_runtime.h \
|
|
||||||
src/nxt_application.h \
|
|
||||||
src/nxt_master_process.h \
|
|
||||||
"
|
"
|
||||||
|
|
||||||
NXT_SRCS=" \
|
NXT_SRCS=" \
|
||||||
src/nxt_main.c \
|
src/nxt_main.c \
|
||||||
src/nxt_app_log.c \
|
|
||||||
src/nxt_runtime.c \
|
|
||||||
src/nxt_stream_module.c \
|
|
||||||
src/nxt_master_process.c \
|
|
||||||
src/nxt_worker_process.c \
|
|
||||||
src/nxt_controller.c \
|
|
||||||
src/nxt_router.c \
|
|
||||||
src/nxt_application.c \
|
|
||||||
"
|
"
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ static nxt_int_t nxt_app_http_process_headers(nxt_app_request_t *r);
|
|||||||
|
|
||||||
static const nxt_event_conn_state_t nxt_app_delivery_write_state;
|
static const nxt_event_conn_state_t nxt_app_delivery_write_state;
|
||||||
|
|
||||||
static nxt_application_module_t *nxt_app = &nxt_python_module;
|
nxt_application_module_t *nxt_app;
|
||||||
|
|
||||||
static nxt_thread_mutex_t nxt_app_mutex;
|
static nxt_thread_mutex_t nxt_app_mutex;
|
||||||
static nxt_thread_cond_t nxt_app_cond;
|
static nxt_thread_cond_t nxt_app_cond;
|
||||||
|
|||||||
@@ -50,7 +50,8 @@ typedef struct {
|
|||||||
} nxt_application_module_t;
|
} nxt_application_module_t;
|
||||||
|
|
||||||
|
|
||||||
extern nxt_application_module_t nxt_python_module;
|
extern nxt_application_module_t *nxt_app;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
nxt_int_t nxt_app_http_read_body(nxt_app_request_t *r, u_char *data,
|
nxt_int_t nxt_app_http_read_body(nxt_app_request_t *r, u_char *data,
|
||||||
|
|||||||
@@ -242,6 +242,8 @@ nxt_python_wsgi_init(nxt_thread_t *thr, nxt_runtime_t *rt)
|
|||||||
|
|
||||||
Py_DECREF(obj);
|
Py_DECREF(obj);
|
||||||
|
|
||||||
|
nxt_app = &nxt_python_module;
|
||||||
|
|
||||||
return NXT_OK;
|
return NXT_OK;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
|
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
|
||||||
|
nxt_module_init_t nxt_init_modules[0];
|
||||||
|
nxt_uint_t nxt_init_modules_n;
|
||||||
|
|
||||||
|
|
||||||
/* The function is defined here to prevent inline optimizations. */
|
/* The function is defined here to prevent inline optimizations. */
|
||||||
static nxt_bool_t
|
static nxt_bool_t
|
||||||
|
|||||||
@@ -9,10 +9,13 @@
|
|||||||
|
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
|
||||||
|
|
||||||
static nxt_int_t nxt_utf8_file_name_test(nxt_thread_t *thr);
|
static nxt_int_t nxt_utf8_file_name_test(nxt_thread_t *thr);
|
||||||
|
|
||||||
|
|
||||||
|
nxt_module_init_t nxt_init_modules[0];
|
||||||
|
nxt_uint_t nxt_init_modules_n;
|
||||||
|
|
||||||
|
|
||||||
int nxt_cdecl
|
int nxt_cdecl
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
@@ -41,6 +44,7 @@ nxt_utf8_file_name_test(nxt_thread_t *thr)
|
|||||||
ssize_t n;
|
ssize_t n;
|
||||||
uint32_t uc, lc;
|
uint32_t uc, lc;
|
||||||
nxt_int_t ret;
|
nxt_int_t ret;
|
||||||
|
nxt_task_t *task = NULL;
|
||||||
nxt_file_t uc_file, lc_file;
|
nxt_file_t uc_file, lc_file;
|
||||||
const u_char *pp;
|
const u_char *pp;
|
||||||
nxt_file_name_t uc_name[10], lc_name[10];
|
nxt_file_name_t uc_name[10], lc_name[10];
|
||||||
@@ -102,7 +106,7 @@ nxt_utf8_file_name_test(nxt_thread_t *thr)
|
|||||||
|
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
|
||||||
ret = nxt_file_open(&uc_file, NXT_FILE_WRONLY, NXT_FILE_TRUNCATE,
|
ret = nxt_file_open(task, &uc_file, NXT_FILE_WRONLY, NXT_FILE_TRUNCATE,
|
||||||
NXT_FILE_DEFAULT_ACCESS);
|
NXT_FILE_DEFAULT_ACCESS);
|
||||||
if (ret != NXT_OK) {
|
if (ret != NXT_OK) {
|
||||||
return NXT_ERROR;
|
return NXT_ERROR;
|
||||||
@@ -112,15 +116,15 @@ nxt_utf8_file_name_test(nxt_thread_t *thr)
|
|||||||
return NXT_ERROR;
|
return NXT_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
nxt_file_close(&uc_file);
|
nxt_file_close(task, &uc_file);
|
||||||
|
|
||||||
ret = nxt_file_open(&lc_file, NXT_FILE_RDONLY, NXT_FILE_OPEN,
|
ret = nxt_file_open(task, &lc_file, NXT_FILE_RDONLY, NXT_FILE_OPEN,
|
||||||
NXT_FILE_DEFAULT_ACCESS);
|
NXT_FILE_DEFAULT_ACCESS);
|
||||||
|
|
||||||
if (ret == NXT_OK) {
|
if (ret == NXT_OK) {
|
||||||
n = nxt_file_read(&lc_file, test, 4, 0);
|
n = nxt_file_read(&lc_file, test, 4, 0);
|
||||||
|
|
||||||
nxt_file_close(&lc_file);
|
nxt_file_close(task, &lc_file);
|
||||||
|
|
||||||
if (n != 4 || nxt_memcmp(utf8, test, 4) != 0) {
|
if (n != 4 || nxt_memcmp(utf8, test, 4) != 0) {
|
||||||
nxt_log_alert(thr->log, "nxt_file_read() mismatch");
|
nxt_log_alert(thr->log, "nxt_file_read() mismatch");
|
||||||
|
|||||||
Reference in New Issue
Block a user