diff options
Diffstat (limited to '')
-rw-r--r-- | auto/make | 27 | ||||
-rw-r--r-- | auto/options | 4 | ||||
-rw-r--r-- | auto/sources | 42 |
3 files changed, 34 insertions, 39 deletions
@@ -45,7 +45,7 @@ $echo >> $NXT_MAKEFILE $echo "NXT_LIB_DEPS = \\" >> $NXT_MAKEFILE -for nxt_dep in $NXT_LIB_DEPS $NXT_LIB_UNIT_TEST_DEPS $NXT_AUTO_CONFIG_H +for nxt_dep in $NXT_LIB_DEPS $NXT_TEST_DEPS $NXT_AUTO_CONFIG_H do $echo " $nxt_dep \\" >> $NXT_MAKEFILE done @@ -87,7 +87,7 @@ END # Object files. -for nxt_src in $NXT_LIB_SRCS $NXT_LIB_UNIT_TEST_SRCS +for nxt_src in $NXT_LIB_SRCS $NXT_TEST_SRCS do nxt_obj=`$echo $nxt_src | sed -e "s/\.c$/\.o/"` cat << END >> $NXT_MAKEFILE @@ -103,25 +103,25 @@ done $echo >> $NXT_MAKEFILE -# Unit test object files list. +# Test object files list. -$echo "NXT_LIB_UNIT_TEST_OBJS = \\" >> $NXT_MAKEFILE +$echo "NXT_TEST_OBJS = \\" >> $NXT_MAKEFILE -for nxt_src in $NXT_LIB_UNIT_TEST_SRCS +for nxt_src in $NXT_TEST_SRCS do nxt_obj=`$echo $nxt_src | sed -e "s/\.c$/\.o/"` $echo " $NXT_BUILD_DIR/$nxt_obj \\" >> $NXT_MAKEFILE done -# Unit test and utf8 test executables. +# Test executables. cat << END >> $NXT_MAKEFILE -$NXT_BUILD_DIR/lib_unit_test: \$(NXT_LIB_UNIT_TEST_OBJS) \\ +$NXT_BUILD_DIR/tests: \$(NXT_TEST_OBJS) \\ $NXT_BUILD_DIR/$NXT_LIB_STATIC \$(NXT_LIB_DEPS) - \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/lib_unit_test \\ - \$(CFLAGS) \$(NXT_LIB_UNIT_TEST_OBJS) \\ + \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/tests \\ + \$(CFLAGS) \$(NXT_TEST_OBJS) \\ $NXT_BUILD_DIR/$NXT_LIB_STATIC \\ $NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS @@ -136,11 +136,6 @@ $NXT_BUILD_DIR/utf8_file_name_test: $NXT_LIB_UTF8_FILE_NAME_TEST_SRCS \\ END -if [ $NXT_LIB_UNIT_TEST = YES ]; then - NXT_UNIT_TEST_TARGETS="$NXT_UNIT_TEST_TARGETS lib_test" -fi - - NXT_MAKE_INCS="src $NXT_BUILD_DIR" NXT_MAKE_DEPS="\$(NXT_LIB_DEPS) $NXT_DEPS" NXT_MAKE_SRCS="$NXT_SRCS" @@ -222,8 +217,8 @@ cat << END > Makefile include $NXT_MAKEFILE -.PHONY: lib_test -lib_test: $NXT_BUILD_DIR/lib_unit_test $NXT_BUILD_DIR/utf8_file_name_test +.PHONY: tests +tests: $NXT_BUILD_DIR/tests $NXT_BUILD_DIR/utf8_file_name_test clean: rm -rf $NXT_BUILD_DIR *.dSYM Makefile diff --git a/auto/options b/auto/options index 67f53258..19cd3dee 100644 --- a/auto/options +++ b/auto/options @@ -38,7 +38,7 @@ NXT_TEST_BUILD_SOLARIS_SENDFILEV=NO NXT_TEST_BUILD_AIX_SEND_FILE=NO NXT_TEST_BUILD_HPUX_SENDFILE=NO -NXT_LIB_UNIT_TEST=NO +NXT_TESTS=NO for nxt_option do @@ -89,7 +89,7 @@ do --test-build-aix-send_file) NXT_TEST_BUILD_AIX_SEND_FILE=YES ;; --test-build-hpux-sendfile) NXT_TEST_BUILD_HPUX_SENDFILE=YES ;; - --tests) NXT_LIB_UNIT_TEST=YES ;; + --tests) NXT_TESTS=YES ;; *) $echo diff --git a/auto/sources b/auto/sources index eab4e29b..c1d8b37f 100644 --- a/auto/sources +++ b/auto/sources @@ -198,28 +198,28 @@ NXT_LIB_MACOSX_SENDFILE_SRCS="src/nxt_macosx_sendfile.c" NXT_LIB_AIX_SEND_FILE_SRCS="src/nxt_aix_send_file.c" NXT_LIB_HPUX_SENDFILE_SRCS="src/nxt_hpux_sendfile.c" -NXT_LIB_TEST_BUILD_DEPS="src/nxt_test_build.h" -NXT_LIB_TEST_BUILD_SRCS="src/nxt_test_build.c" +NXT_TEST_BUILD_DEPS="src/nxt_test_build.h" +NXT_TEST_BUILD_SRCS="src/nxt_test_build.c" -NXT_LIB_UNIT_TEST_DEPS="test/nxt_lib_unit_test.h \ +NXT_TEST_DEPS="test/nxt_tests.h \ test/nxt_rbtree1.h \ " -NXT_LIB_UNIT_TEST_SRCS=" \ - test/nxt_lib_unit_test.c \ +NXT_TEST_SRCS=" \ + test/nxt_tests.c \ test/nxt_rbtree1.c \ - test/nxt_rbtree_unit_test.c \ - test/nxt_term_parse_unit_test.c \ - test/nxt_msec_diff_unit_test.c \ - test/nxt_mp_unit_test.c \ - test/nxt_mem_zone_unit_test.c \ - test/nxt_lvlhsh_unit_test.c \ - test/nxt_gmtime_unit_test.c \ - test/nxt_sprintf_unit_test.c \ - test/nxt_malloc_unit_test.c \ - test/nxt_utf8_unit_test.c \ - test/nxt_rbtree1_unit_test.c \ - test/nxt_http_parse_unit_test.c \ + test/nxt_rbtree_test.c \ + test/nxt_term_parse_test.c \ + test/nxt_msec_diff_test.c \ + test/nxt_mp_test.c \ + test/nxt_mem_zone_test.c \ + test/nxt_lvlhsh_test.c \ + test/nxt_gmtime_test.c \ + test/nxt_sprintf_test.c \ + test/nxt_malloc_test.c \ + test/nxt_utf8_test.c \ + test/nxt_rbtree1_test.c \ + test/nxt_http_parse_test.c \ " NXT_LIB_UTF8_FILE_NAME_TEST_SRCS=" \ @@ -323,13 +323,13 @@ fi if [ "$NXT_TEST_BUILD" = "YES" ]; then - NXT_LIB_DEPS="$NXT_LIB_DEPS $NXT_LIB_TEST_BUILD_DEPS" - NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_LIB_TEST_BUILD_SRCS" + NXT_LIB_DEPS="$NXT_LIB_DEPS $NXT_TEST_BUILD_DEPS" + NXT_LIB_SRCS="$NXT_LIB_SRCS $NXT_TEST_BUILD_SRCS" fi -if [ $NXT_LIB_UNIT_TEST = YES ]; then - nxt_have=NXT_LIB_UNIT_TEST . auto/have +if [ $NXT_TESTS = YES ]; then + nxt_have=NXT_TESTS . auto/have fi NXT_DEPS=" \ |