From f9dae929647a177ef65edf7113ff16b9fa429993 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sun, 7 Mar 2010 15:48:10 +0100 Subject: [PATCH] Generated tests are now just a thin layer around other tests. * tests/Makefile.am: Rewrite the rule to generate the `*-p.test' test scripts so that any of them simply includes the corresponding `*.test' script (after setting `$parallel_tests' to `yes'). * tests/.gitignore: Add wildcard for temporary files used in the generation of `*-p.test' tests. --- ChangeLog | 9 +++++++++ tests/.gitignore | 1 + tests/Makefile.am | 12 ++++++++---- tests/Makefile.in | 12 ++++++++---- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index bdfeff3..a5b5426 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-04-04 Stefano Lattarini + + Generated tests are now just a thin layer around other tests. + * tests/Makefile.am: Rewrite the rule to generate the `*-p.test' + test scripts so that any of them simply includes the corresponding + `*.test' script (after setting `$parallel_tests' to `yes'). + * tests/.gitignore: Add wildcard for temporary files used in the + generation of `*-p.test' tests. + 2010-03-30 Stefano Lattarini Avoid an unportable use of `$status' shell variable. diff --git a/tests/.gitignore b/tests/.gitignore index 3c1f990..61b0783 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -6,3 +6,4 @@ parallel-tests.am *.log *.log-t *-p.test +*-p.test-t diff --git a/tests/Makefile.am b/tests/Makefile.am index acc979c..62ad6aa 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -28,11 +28,15 @@ include $(srcdir)/parallel-tests.am $(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am $(AM_V_GEN)(cd $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@ -$(parallel_tests): $(parallel_tests:-p.test=.test) Makefile.am +$(parallel_tests): Makefile.am + $(AM_V_at)rm -f $@ $@-t $(AM_V_GEN)input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \ - sed 's|^\. \./defs.*|parallel_tests=yes; &|' \ - < $(srcdir)/$$input >$@ - $(AM_V_at)chmod a+rx $@ + { echo '#!/bin/sh'; \ + echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \ + echo 'parallel_tests=yes'; \ + echo ". '$(srcdir)/$$input'"; \ + } > $@-t + $(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@ MAINTAINERCLEANFILES = $(parallel_tests) diff --git a/tests/Makefile.in b/tests/Makefile.in index 1d70152..295d259 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1374,11 +1374,15 @@ uninstall-am: $(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am $(AM_V_GEN)(cd $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@ -$(parallel_tests): $(parallel_tests:-p.test=.test) Makefile.am +$(parallel_tests): Makefile.am + $(AM_V_at)rm -f $@ $@-t $(AM_V_GEN)input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \ - sed 's|^\. \./defs.*|parallel_tests=yes; &|' \ - < $(srcdir)/$$input >$@ - $(AM_V_at)chmod a+rx $@ + { echo '#!/bin/sh'; \ + echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \ + echo 'parallel_tests=yes'; \ + echo ". '$(srcdir)/$$input'"; \ + } > $@-t + $(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@ clean-local: clean-local-check .PHONY: clean-local-check -- 2.7.4