diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/FSRCDIR/Makefile | 5 | ||||
-rw-r--r-- | tests/FSRCDIR/expect.out | 3 | ||||
-rw-r--r-- | tests/FSRCDIR/test.mk | 10 | ||||
-rw-r--r-- | tests/mkdll/Makefile | 2 | ||||
-rw-r--r-- | tests/mkdll/expect.out | 35 | ||||
-rw-r--r-- | tests/mkpiclib/expect.out | 30 | ||||
-rw-r--r-- | tests/mkpiclib/test.mk | 8 | ||||
-rw-r--r-- | tests/mkprofilelib/expect.out | 40 | ||||
-rw-r--r-- | tests/mkshlib/expect.out | 30 | ||||
-rw-r--r-- | tests/mkstaticlib/expect.out | 36 | ||||
-rw-r--r-- | tests/predopost_targets/Makefile.inc | 2 | ||||
-rw-r--r-- | tests/predopost_targets/expect.out | 24 | ||||
-rw-r--r-- | tests/predopost_targets/test.mk | 2 | ||||
-rw-r--r-- | tests/reqd/expect.out | 2 | ||||
-rw-r--r-- | tests/reqd2/expect.out | 2 | ||||
-rw-r--r-- | tests/reqd3/expect.out | 2 | ||||
-rw-r--r-- | tests/reqd4/expect.out | 2 | ||||
-rw-r--r-- | tests/sys_queue/Makefile | 1 | ||||
-rw-r--r-- | tests/sys_queue/test.mk | 3 |
19 files changed, 228 insertions, 11 deletions
diff --git a/tests/FSRCDIR/Makefile b/tests/FSRCDIR/Makefile new file mode 100644 index 0000000..76e9392 --- /dev/null +++ b/tests/FSRCDIR/Makefile @@ -0,0 +1,5 @@ +FOREIGN = autotools +TEST_PREREQS = + +.include "test.mk" +.include <mkc.mk> diff --git a/tests/FSRCDIR/expect.out b/tests/FSRCDIR/expect.out new file mode 100644 index 0000000..3f29ee1 --- /dev/null +++ b/tests/FSRCDIR/expect.out @@ -0,0 +1,3 @@ +=========== all ============ +FSRCDIR should not be empty +*** Error code 1 diff --git a/tests/FSRCDIR/test.mk b/tests/FSRCDIR/test.mk new file mode 100644 index 0000000..6059c8f --- /dev/null +++ b/tests/FSRCDIR/test.mk @@ -0,0 +1,10 @@ +.PHONY : test_output +test_output : + @set -e; \ + \ + echo =========== all ============; \ + ${MAKE} ${MAKEFLAGS} all 2>&1 | head -n 2; \ + \ + ${MAKE} ${MAKEFLAGS} cleandir > /dev/null + +.include <mkc.minitest.mk> diff --git a/tests/mkdll/Makefile b/tests/mkdll/Makefile index 7239e82..c3cc464 100644 --- a/tests/mkdll/Makefile +++ b/tests/mkdll/Makefile @@ -1,6 +1,6 @@ .PATH: ../../examples/hello_cxxlib/cxxlib -MKDLL= yes +MKDLL = only .include "../../examples/hello_cxxlib/cxxlib/Makefile" .include "../mkpiclib/test.mk" diff --git a/tests/mkdll/expect.out b/tests/mkdll/expect.out index af084bd..c1c93eb 100644 --- a/tests/mkdll/expect.out +++ b/tests/mkdll/expect.out @@ -1,16 +1,19 @@ =========== all ============ /objdir/Makefile +/objdir/_mkc_compiler_type.err +/objdir/_mkc_compiler_type.res /objdir/_mkc_cxx_type.err /objdir/_mkc_cxx_type.res +/objdir/_mkc_funclib_dummy.c +/objdir/_mkc_funclib_dummy.err +/objdir/_mkc_funclib_dummy.res /objdir/_mkc_prog_cxx.err /objdir/_mkc_prog_cxx.res /objdir/cxxlib.so +/objdir/dummy.os /objdir/expect.out -/objdir/hello_msg1.o /objdir/hello_msg1.os -/objdir/hello_msg2.o /objdir/hello_msg2.os -/objdir/libcxxlib.a /objdir/mkdll.test.out.tmp ========= install ========== /objdir/prefix @@ -21,16 +24,40 @@ /objdir/prefix/include/impl/hello_msg2.h /objdir/prefix/lib /objdir/prefix/lib/cxxlib.so -/objdir/prefix/lib/libcxxlib.a ======== uninstall ========= ========== clean =========== /objdir/Makefile +/objdir/_mkc_compiler_type.err +/objdir/_mkc_compiler_type.res /objdir/_mkc_cxx_type.err /objdir/_mkc_cxx_type.res +/objdir/_mkc_funclib_dummy.c +/objdir/_mkc_funclib_dummy.err +/objdir/_mkc_funclib_dummy.res /objdir/_mkc_prog_cxx.err /objdir/_mkc_prog_cxx.res /objdir/expect.out /objdir/mkdll.test.out.tmp +======= CLEANFILES ========== +/objdir/mkdll.test.out +cxxlib.so +dummy.o +dummy.op +dummy.os +hello_msg1.o +hello_msg1.op +hello_msg1.os +hello_msg2.o +hello_msg2.op +hello_msg2.os +libcxxlib.a +libcxxlib_p.a +libcxxlib_pic.a +======= UNINSTALLFILES ========== +/prefix/include/hello_msg.h +/prefix/include/impl/hello_msg1.h +/prefix/include/impl/hello_msg2.h +/prefix/lib/cxxlib.so ======= distclean ========== /objdir/Makefile /objdir/expect.out diff --git a/tests/mkpiclib/expect.out b/tests/mkpiclib/expect.out index f3a8f4d..9ec67cf 100644 --- a/tests/mkpiclib/expect.out +++ b/tests/mkpiclib/expect.out @@ -1,9 +1,15 @@ =========== all ============ /objdir/Makefile +/objdir/_mkc_compiler_type.err +/objdir/_mkc_compiler_type.res /objdir/_mkc_cxx_type.err /objdir/_mkc_cxx_type.res +/objdir/_mkc_funclib_dummy.c +/objdir/_mkc_funclib_dummy.err +/objdir/_mkc_funclib_dummy.res /objdir/_mkc_prog_cxx.err /objdir/_mkc_prog_cxx.res +/objdir/dummy.os /objdir/expect.out /objdir/hello_msg1.os /objdir/hello_msg2.os @@ -22,13 +28,37 @@ ======== uninstall ========= ========== clean =========== /objdir/Makefile +/objdir/_mkc_compiler_type.err +/objdir/_mkc_compiler_type.res /objdir/_mkc_cxx_type.err /objdir/_mkc_cxx_type.res +/objdir/_mkc_funclib_dummy.c +/objdir/_mkc_funclib_dummy.err +/objdir/_mkc_funclib_dummy.res /objdir/_mkc_prog_cxx.err /objdir/_mkc_prog_cxx.res /objdir/expect.out /objdir/mkpiclib.test.out.tmp /objdir/test.mk +======= CLEANFILES ========== +/objdir/mkpiclib.test.out +dummy.o +dummy.op +dummy.os +hello_msg1.o +hello_msg1.op +hello_msg1.os +hello_msg2.o +hello_msg2.op +hello_msg2.os +libcxxlib.a +libcxxlib_p.a +libcxxlib_pic.a +======= UNINSTALLFILES ========== +/prefix/include/hello_msg.h +/prefix/include/impl/hello_msg1.h +/prefix/include/impl/hello_msg2.h +/prefix/lib/libcxxlib_pic.a ======= distclean ========== /objdir/Makefile /objdir/expect.out diff --git a/tests/mkpiclib/test.mk b/tests/mkpiclib/test.mk index cc6ecc8..a4856dd 100644 --- a/tests/mkpiclib/test.mk +++ b/tests/mkpiclib/test.mk @@ -25,6 +25,14 @@ test_output: find ${.OBJDIR} -type f | \ mkc_test_helper "${PREFIX}" "${.OBJDIR}";\ \ + echo ======= CLEANFILES ==========; \ + ${MAKE} ${MAKEFLAGS} print_values VARS='CLEANFILES' MKCHECKS=no | \ + awk '{for(i=1; i<=NF; ++i) print $$i}' | \ + mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \ + echo ======= UNINSTALLFILES ==========; \ + ${MAKE} ${MAKEFLAGS} print_values2 VARS='UNINSTALLFILES' MKCHECKS=no | \ + awk '{for(i=1; i<=NF; ++i) print $$i}' | \ + mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \ echo ======= distclean ==========; \ ${MAKE} ${MAKEFLAGS} distclean DESTDIR=${.OBJDIR} > /dev/null; \ find ${.OBJDIR} -type f | \ diff --git a/tests/mkprofilelib/expect.out b/tests/mkprofilelib/expect.out index 46af6f2..041e2e3 100644 --- a/tests/mkprofilelib/expect.out +++ b/tests/mkprofilelib/expect.out @@ -1,9 +1,17 @@ =========== all ============ /objdir/Makefile +/objdir/_mkc_compiler_type.err +/objdir/_mkc_compiler_type.res /objdir/_mkc_cxx_type.err /objdir/_mkc_cxx_type.res +/objdir/_mkc_funclib_dummy.c +/objdir/_mkc_funclib_dummy.err +/objdir/_mkc_funclib_dummy.res /objdir/_mkc_prog_cxx.err /objdir/_mkc_prog_cxx.res +/objdir/dummy.o +/objdir/dummy.op +/objdir/dummy.os /objdir/expect.out /objdir/hello_msg1.o /objdir/hello_msg1.op @@ -31,12 +39,44 @@ ======== uninstall ========= ========== clean =========== /objdir/Makefile +/objdir/_mkc_compiler_type.err +/objdir/_mkc_compiler_type.res /objdir/_mkc_cxx_type.err /objdir/_mkc_cxx_type.res +/objdir/_mkc_funclib_dummy.c +/objdir/_mkc_funclib_dummy.err +/objdir/_mkc_funclib_dummy.res /objdir/_mkc_prog_cxx.err /objdir/_mkc_prog_cxx.res /objdir/expect.out /objdir/mkprofilelib.test.out.tmp +======= CLEANFILES ========== +/objdir/mkprofilelib.test.out +dummy.o +dummy.op +dummy.os +hello_msg1.o +hello_msg1.op +hello_msg1.os +hello_msg2.o +hello_msg2.op +hello_msg2.os +libcxxlib.a +libcxxlib.so +libcxxlib.so.1 +libcxxlib.so.1.0 +libcxxlib.so.1.0.5 +libcxxlib_p.a +libcxxlib_pic.a +======= UNINSTALLFILES ========== +/prefix/include/hello_msg.h +/prefix/include/impl/hello_msg1.h +/prefix/include/impl/hello_msg2.h +/prefix/lib/libcxxlib.a +/prefix/lib/libcxxlib.so +/prefix/lib/libcxxlib.so.1 +/prefix/lib/libcxxlib.so.1.0.5 +/prefix/lib/libcxxlib_p.a ======= distclean ========== /objdir/Makefile /objdir/expect.out diff --git a/tests/mkshlib/expect.out b/tests/mkshlib/expect.out index bfeaee9..caad11d 100644 --- a/tests/mkshlib/expect.out +++ b/tests/mkshlib/expect.out @@ -1,9 +1,15 @@ =========== all ============ /objdir/Makefile +/objdir/_mkc_compiler_type.err +/objdir/_mkc_compiler_type.res /objdir/_mkc_cxx_type.err /objdir/_mkc_cxx_type.res +/objdir/_mkc_funclib_dummy.c +/objdir/_mkc_funclib_dummy.err +/objdir/_mkc_funclib_dummy.res /objdir/_mkc_prog_cxx.err /objdir/_mkc_prog_cxx.res +/objdir/dummy.o /objdir/expect.out /objdir/hello_msg1.o /objdir/hello_msg2.o @@ -21,12 +27,36 @@ ======== uninstall ========= ========== clean =========== /objdir/Makefile +/objdir/_mkc_compiler_type.err +/objdir/_mkc_compiler_type.res /objdir/_mkc_cxx_type.err /objdir/_mkc_cxx_type.res +/objdir/_mkc_funclib_dummy.c +/objdir/_mkc_funclib_dummy.err +/objdir/_mkc_funclib_dummy.res /objdir/_mkc_prog_cxx.err /objdir/_mkc_prog_cxx.res /objdir/expect.out /objdir/mkshlib.test.out.tmp +======= CLEANFILES ========== +/objdir/mkshlib.test.out +dummy.o +dummy.op +dummy.os +hello_msg1.o +hello_msg1.op +hello_msg1.os +hello_msg2.o +hello_msg2.op +hello_msg2.os +libcxxlib.a +libcxxlib_p.a +libcxxlib_pic.a +======= UNINSTALLFILES ========== +/prefix/include/hello_msg.h +/prefix/include/impl/hello_msg1.h +/prefix/include/impl/hello_msg2.h +/prefix/lib/libcxxlib.a ======= distclean ========== /objdir/Makefile /objdir/expect.out diff --git a/tests/mkstaticlib/expect.out b/tests/mkstaticlib/expect.out index e0e55a0..db17b35 100644 --- a/tests/mkstaticlib/expect.out +++ b/tests/mkstaticlib/expect.out @@ -1,9 +1,15 @@ =========== all ============ /objdir/Makefile +/objdir/_mkc_compiler_type.err +/objdir/_mkc_compiler_type.res /objdir/_mkc_cxx_type.err /objdir/_mkc_cxx_type.res +/objdir/_mkc_funclib_dummy.c +/objdir/_mkc_funclib_dummy.err +/objdir/_mkc_funclib_dummy.res /objdir/_mkc_prog_cxx.err /objdir/_mkc_prog_cxx.res +/objdir/dummy.os /objdir/expect.out /objdir/hello_msg1.os /objdir/hello_msg2.os @@ -23,12 +29,42 @@ ======== uninstall ========= ========== clean =========== /objdir/Makefile +/objdir/_mkc_compiler_type.err +/objdir/_mkc_compiler_type.res /objdir/_mkc_cxx_type.err /objdir/_mkc_cxx_type.res +/objdir/_mkc_funclib_dummy.c +/objdir/_mkc_funclib_dummy.err +/objdir/_mkc_funclib_dummy.res /objdir/_mkc_prog_cxx.err /objdir/_mkc_prog_cxx.res /objdir/expect.out /objdir/mkstaticlib.test.out.tmp +======= CLEANFILES ========== +/objdir/mkstaticlib.test.out +dummy.o +dummy.op +dummy.os +hello_msg1.o +hello_msg1.op +hello_msg1.os +hello_msg2.o +hello_msg2.op +hello_msg2.os +libcxxlib.a +libcxxlib.so +libcxxlib.so.1 +libcxxlib.so.1.0 +libcxxlib.so.1.0.5 +libcxxlib_p.a +libcxxlib_pic.a +======= UNINSTALLFILES ========== +/prefix/include/hello_msg.h +/prefix/include/impl/hello_msg1.h +/prefix/include/impl/hello_msg2.h +/prefix/lib/libcxxlib.so +/prefix/lib/libcxxlib.so.1 +/prefix/lib/libcxxlib.so.1.0.5 ======= distclean ========== /objdir/Makefile /objdir/expect.out diff --git a/tests/predopost_targets/Makefile.inc b/tests/predopost_targets/Makefile.inc index 02da702..3f66516 100644 --- a/tests/predopost_targets/Makefile.inc +++ b/tests/predopost_targets/Makefile.inc @@ -1,5 +1,5 @@ .ifndef REAL_TARGETS -.for i in clean cleandir install all uninstall installdirs depend \ +.for i in errorcheck clean cleandir install all uninstall installdirs depend \ bin_tar bin_targz bin_tarbz2 bin_zip bin_deb pre_${i} do_${i} post_${i}: @echo "fake target ${.TARGET}" diff --git a/tests/predopost_targets/expect.out b/tests/predopost_targets/expect.out index e5bbcaf..4315220 100644 --- a/tests/predopost_targets/expect.out +++ b/tests/predopost_targets/expect.out @@ -1,5 +1,20 @@ =========== {pre,do,post}_recursive ============ ================================================== +errorcheck ===> tests/predopost_targets/lib +fake target pre_errorcheck +fake target do_errorcheck +fake target post_errorcheck +================================================== +errorcheck ===> tests/predopost_targets/others +fake target pre_errorcheck +fake target do_errorcheck +fake target post_errorcheck +================================================== +errorcheck ===> tests/predopost_targets/lua +fake target pre_errorcheck +fake target do_errorcheck +fake target post_errorcheck +================================================== clean ===> tests/predopost_targets/lib fake target pre_clean fake target do_clean @@ -57,16 +72,25 @@ fake target do_install fake target post_install ================================================== all ===> tests/predopost_targets/lib +fake target pre_errorcheck +fake target do_errorcheck +fake target post_errorcheck fake target pre_all fake target do_all fake target post_all ================================================== all ===> tests/predopost_targets/others +fake target pre_errorcheck +fake target do_errorcheck +fake target post_errorcheck fake target pre_all fake target do_all fake target post_all ================================================== all ===> tests/predopost_targets/lua +fake target pre_errorcheck +fake target do_errorcheck +fake target post_errorcheck fake target pre_all fake target do_all fake target post_all diff --git a/tests/predopost_targets/test.mk b/tests/predopost_targets/test.mk index 5db4de1..6ec1c09 100644 --- a/tests/predopost_targets/test.mk +++ b/tests/predopost_targets/test.mk @@ -4,7 +4,7 @@ test_output : \ { \ echo '=========== {pre,do,post}_recursive ============'; \ - for t in clean cleandir install all uninstall installdirs depend; do \ + for t in errorcheck clean cleandir install all uninstall installdirs depend; do \ ${MAKE} ${MAKEFLAGS} -j1 $$t | \ grep -v checking; \ done ; \ diff --git a/tests/reqd/expect.out b/tests/reqd/expect.out index 9e1a280..2cf1c41 100644 --- a/tests/reqd/expect.out +++ b/tests/reqd/expect.out @@ -1 +1 @@ -ERROR: We need mk-configure v.999.0.0 while 0.27.0 is detected +ERROR: We need mk-configure v.999.0.0 while 0.28.0 is detected diff --git a/tests/reqd2/expect.out b/tests/reqd2/expect.out index 9e1a280..2cf1c41 100644 --- a/tests/reqd2/expect.out +++ b/tests/reqd2/expect.out @@ -1 +1 @@ -ERROR: We need mk-configure v.999.0.0 while 0.27.0 is detected +ERROR: We need mk-configure v.999.0.0 while 0.28.0 is detected diff --git a/tests/reqd3/expect.out b/tests/reqd3/expect.out index 9e1a280..2cf1c41 100644 --- a/tests/reqd3/expect.out +++ b/tests/reqd3/expect.out @@ -1 +1 @@ -ERROR: We need mk-configure v.999.0.0 while 0.27.0 is detected +ERROR: We need mk-configure v.999.0.0 while 0.28.0 is detected diff --git a/tests/reqd4/expect.out b/tests/reqd4/expect.out index 5e1cb98..0cb180a 100644 --- a/tests/reqd4/expect.out +++ b/tests/reqd4/expect.out @@ -1,4 +1,4 @@ -ERROR: We need mk-configure v.999.0.0 while 0.27.0 is detected +ERROR: We need mk-configure v.999.0.0 while 0.28.0 is detected "bmake-20110606 or newer is required" =========== all ============ /objdir/Makefile diff --git a/tests/sys_queue/Makefile b/tests/sys_queue/Makefile index b50aa77..96a92bf 100644 --- a/tests/sys_queue/Makefile +++ b/tests/sys_queue/Makefile @@ -8,4 +8,5 @@ MKC_FEATURES = CIRCLEQ LIST SIMPLEQ SLIST STAILQ TAILQ MKC_REQD = 0.26.0 test: all +.include "test.mk" .include <mkc.prog.mk> diff --git a/tests/sys_queue/test.mk b/tests/sys_queue/test.mk new file mode 100644 index 0000000..d6a56ab --- /dev/null +++ b/tests/sys_queue/test.mk @@ -0,0 +1,3 @@ +test: + @set -e; \ + ${MAKE} ${MAKEFLAGS} cleandir > /dev/null |