diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 3 | ||||
-rw-r--r-- | test/aapl.d/Makefile.am | 14 | ||||
-rw-r--r-- | test/colm.d/Makefile.am | 11 | ||||
-rw-r--r-- | test/colm.d/gentests.sh | 2 | ||||
-rw-r--r-- | test/rlhc.d/Makefile.am | 14 | ||||
-rw-r--r-- | test/rlparse.d/Makefile.am | 26 | ||||
-rw-r--r-- | test/trans.d/Makefile.am | 22 | ||||
-rwxr-xr-x | test/trans.d/gentests | 2 |
8 files changed, 67 insertions, 27 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 4b6bba61..b239156c 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS = . aapl.d colm.d rlhc.d rlparse.d trans.d -noinst_SCRIPTS = subject.mk subject.sh +check_SCRIPTS = subject.mk subject.sh pkgdata_DATA = runtests @@ -15,3 +15,4 @@ subject.sh: subject.sh.in Makefile dist: dist.sh @$(top_srcdir)/sedsubst $< $@ -w,+x $(SED_SUBST) +CLEANFILES = subject.mk subject.sh diff --git a/test/aapl.d/Makefile.am b/test/aapl.d/Makefile.am index 906b94ef..03908032 100644 --- a/test/aapl.d/Makefile.am +++ b/test/aapl.d/Makefile.am @@ -4,7 +4,7 @@ CPPFLAGS = @SUBJ_AAPL_CPPFLAGS@ -noinst_PROGRAMS = \ +check_PROGRAMS = \ stress_avltree stress_avliter stress_avlmel \ stress_avlmelkey stress_avlitree stress_avlmap \ stress_avlset stress_avlimel stress_avlimelkey \ @@ -19,7 +19,7 @@ noinst_PROGRAMS = \ test_avlikeyless test_compare test_string \ test_rope -noinst_SCRIPTS = gentests +check_SCRIPTS = gentests stress_avltree_SOURCES = stress_avltree.cpp util.cpp stress_avliter_SOURCES = stress_avliter.cpp util.cpp @@ -101,5 +101,13 @@ gentests: gentests.sh Makefile # #-include $(DEPS) +CLEANFILES = gentests + clean-local: - rm -Rf working + rm -Rf working *.exp + +check-local: + if test '$(builddir)' != '$(srcdir)'; then \ + $(LN_S) -f '$(srcdir)/'*.exp '$(builddir)'; \ + fi + '$(top_srcdir)/test/runtests' diff --git a/test/colm.d/Makefile.am b/test/colm.d/Makefile.am index e2a4c911..b0041329 100644 --- a/test/colm.d/Makefile.am +++ b/test/colm.d/Makefile.am @@ -1,4 +1,4 @@ -noinst_SCRIPTS = gentests +check_SCRIPTS = gentests EXTRA_DIST = \ gentests.sh \ @@ -185,6 +185,13 @@ EXTRA_DIST = \ gentests: gentests.sh Makefile @$(top_srcdir)/sedsubst $< $@ -w,+x $(SED_SUBST) +CLEANFILES = gentests + clean-local: - rm -Rf working + rm -Rf working *.lm *.lmi *.in +check-local: + if test '$(builddir)' != '$(srcdir)'; then \ + $(LN_S) -f '$(srcdir)/'*.lm '$(srcdir)/'*.lmi '$(srcdir)/'*.in '$(builddir)'; \ + fi + '$(top_srcdir)/test/runtests' diff --git a/test/colm.d/gentests.sh b/test/colm.d/gentests.sh index b5cc8982..783f002f 100644 --- a/test/colm.d/gentests.sh +++ b/test/colm.d/gentests.sh @@ -226,7 +226,7 @@ function runtests() fi else # Compilation. - echo $COLM_BIN $COMP $COLM_ADDS $LM '&>' $LOG >> $SH + echo $COLM_BIN -B ../.. $COMP $COLM_ADDS $LM '&>' $LOG >> $SH echo "if [ \$? != 0 ]; then echo \"COMPILATION FAILED (see $LOG)\" >> $DIFF; fi" >> $SH fi diff --git a/test/rlhc.d/Makefile.am b/test/rlhc.d/Makefile.am index 4e9ffe56..9d150771 100644 --- a/test/rlhc.d/Makefile.am +++ b/test/rlhc.d/Makefile.am @@ -16,10 +16,10 @@ RLHC_DEP = \ EXTRA_DIST = gentests rlhc.lm $(RLHC_DEP) $(CASES) -noinst_PROGRAMS = rlhc +check_PROGRAMS = rlhc rlhc$(EXEEXT): rlhc.lm $(RLHC_DEP) $(COLM_BIN) - $(COLM_BIN) -b rlhc_object -o $@ $< + $(COLM_BIN) -B '$(top_builddir)' -b rlhc_object -o $@ -I$(srcdir) $< CASES = \ case/atoi1_c.c-C-F1--goto-backend.exp \ @@ -1089,5 +1089,13 @@ CASES = \ case/union.cpp-C-T1--goto-backend.exp \ case/union.cpp-C-T1--goto-backend.in +CLEANFILES = gentests rlhc.c + clean-local: - rm -Rf working + rm -Rf working case + +check-local: + if test '$(builddir)' != '$(srcdir)'; then \ + $(LN_S) -f '$(srcdir)/gentests' '$(srcdir)/case' '$(builddir)'; \ + fi + '$(top_srcdir)/test/runtests' diff --git a/test/rlparse.d/Makefile.am b/test/rlparse.d/Makefile.am index 54a14639..cbbc28dd 100644 --- a/test/rlparse.d/Makefile.am +++ b/test/rlparse.d/Makefile.am @@ -1,8 +1,8 @@ COLM_BIN = ../../src/colm COLM_xCPPFLAGS = -I../../src/include -COLM_xLDFLAGS = -L../../src +COLM_xLDADD = ../../src/libcolm.la -noinst_PROGRAMS = rlparse +check_PROGRAMS = rlparse rlparse_SOURCES = parse.c if.h if.cc commit.cc \ actparams.cc parsetree.cc parsedata.cc \ @@ -21,8 +21,8 @@ rlparse_SOURCES = parse.c if.h if.cc commit.cc \ svector.h rlparse_CPPFLAGS = $(COLM_xCPPFLAGS) -rlparse_LDADD = -lcolm -rlparse_LDFLAGS = $(COLM_xLDFLAGS) +rlparse_LDADD = $(COLM_xLDADD) +rlparse_LDFLAGS = -static EXTRA_DIST = \ reducer.lm rlparse.lm ragel.lm \ @@ -31,14 +31,24 @@ EXTRA_DIST = \ case/rlparse.h case/rlscan.rl \ case/rlscan--colm-frontend.exp case/rlscan--reduce-frontend.exp -BUILT_SOURCES = parse.c if.h if.cc commit.cc - parse.c: rlparse.lm reducer.lm $(RAGEL_LM) $(COLM_BIN) - $(COLM_BIN) -c -b rlparse_object -o $@ -e if.h -x if.cc -m commit.cc $< + $(COLM_BIN) -c -b rlparse_object -o $@ -e if.h -x if.cc -m commit.cc -I$(srcdir) $< if.h: parse.c if.cc: parse.c commit.cc: parse.c +load.cc: if.h +reducer.cc: if.h + +CLEANFILES = gentests parse.c if.h if.cc commit.cc + clean-local: - rm -Rf working + rm -Rf working case + +check-local: + if test '$(builddir)' != '$(srcdir)'; then \ + $(LN_S) -f '$(srcdir)/gentests' '$(builddir)'; \ + cp -pR -f '$(srcdir)/case' '$(builddir)'; \ + fi + '$(top_srcdir)/test/runtests' diff --git a/test/trans.d/Makefile.am b/test/trans.d/Makefile.am index 4a9d8798..200cd10a 100644 --- a/test/trans.d/Makefile.am +++ b/test/trans.d/Makefile.am @@ -1,11 +1,9 @@ COLM_BIN = ../../src/colm COLM_xCPPFLAGS = -I../../src/include -COLM_xLDFLAGS = -L../../src +COLM_xLDADD = ../../src/libcolm.la -noinst_PROGRAMS = trans - -BUILT_SOURCES = trans.c +check_PROGRAMS = trans EXTRA_DIST = \ gentests \ @@ -29,12 +27,12 @@ EXTRA_DIST = \ $(CASES) trans.c: trans.lm $(TRANS_DEPS) $(COLM_BIN) - $(COLM_BIN) -b trans_object -c -o $@ $< + $(COLM_BIN) -b trans_object -c -o $@ -I$(srcdir) $< trans_CPPFLAGS = $(COLM_xCPPFLAGS) trans_SOURCES = actparams.cc trans.c main.c -trans_LDADD = -lcolm -trans_LDFLAGS = $(COLM_xLDFLAGS) +trans_LDADD = $(COLM_xLDADD) +trans_LDFLAGS = -static CASES = \ case/any1_asm.rl \ @@ -378,5 +376,13 @@ CASES = \ case/zlen1_ruby.rl \ case/zlen1_rust.rl +CLEANFILES = gentests trans.c + clean-local: - rm -Rf working + rm -Rf working case + +check-local: + if test '$(builddir)' != '$(srcdir)'; then \ + $(LN_S) -f '$(srcdir)/gentests' '$(srcdir)/case' '$(builddir)'; \ + fi + '$(top_srcdir)/test/runtests' diff --git a/test/trans.d/gentests b/test/trans.d/gentests index a2064080..dd3bcf91 100755 --- a/test/trans.d/gentests +++ b/test/trans.d/gentests @@ -9,7 +9,7 @@ mkdir -p working echo working/* | xargs rm -f -[ $# = 0 ] && set -- `find case -type f -and -not -name '*_*' | sort` +[ $# = 0 ] && set -- `find -H case -type f -and -not -name '*_*' | sort` for fn; do |