From 02518334f22ff1749b0533391faab906e2546113 Mon Sep 17 00:00:00 2001 From: werner Date: Tue, 12 Oct 2010 15:32:15 +0000 Subject: [PATCH] Updated regression tests for output change in r5974 and improved handling of cores. - test/structure, test/del_vec, test/frame_ref, test/meas_qual, test/del_frame: added newline after "unit" directive (reported by Xiangfu Liu) - test/Common: new function expect_sed for post-processing of test output - test/tsort: use expect_sed to ignore "(core dumped") after "Aborted" - test/Common: if there is a file called "core", don't run it - Makefile (clean): remove test/core git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5978 99fdad57-331a-0410-800a-d7fa5415bdb3 --- Makefile | 4 ++-- test/Common | 9 +++++++++ test/del_frame | 4 ++++ test/del_vec | 4 ++++ test/frame_ref | 6 ++++++ test/meas_qual | 1 + test/structure | 6 ++++++ test/tsort | 4 ++-- 8 files changed, 34 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 223578a..ac356eb 100644 --- a/Makefile +++ b/Makefile @@ -162,7 +162,7 @@ test tests: all LANG= sh -c \ 'passed=0 && cd test && \ for n in [a-z]*; do \ - SCRIPT=$$n CWD_PREFIX=.. . ./$$n; done; \ + [ $$n != core ] && SCRIPT=$$n CWD_PREFIX=.. . ./$$n; done; \ echo "Passed all $$passed tests"' valgrind: @@ -173,7 +173,7 @@ valgrind: clean: rm -f $(OBJS) $(XPMS:%=icons/%) $(XPMS:%.xpm=icons/%.ppm) rm -f lex.yy.c y.tab.c y.tab.h y.output .depend $(OBJS:.o=.d) - rm -f __dbg????.png _tmp* + rm -f __dbg????.png _tmp* test/core # ----- Install / uninstall --------------------------------------------------- diff --git a/test/Common b/test/Common index 5a3b1a1..f9fc61c 100755 --- a/test/Common +++ b/test/Common @@ -71,6 +71,15 @@ expect_grep() } +expect_sed() +{ + sed "$1" <_out >_tmp || exit 1 + mv _tmp _out + shift + expect "$@" +} + + if [ ! -z "$CWD_PREFIX" -a ! -z "$FPED" -a "$FPED" = "${FPED#/}" ]; then FPED="$CWD_PREFIX/$FPED" fi diff --git a/test/del_frame b/test/del_frame index 91f064e..25ad2f1 100755 --- a/test/del_frame +++ b/test/del_frame @@ -26,6 +26,7 @@ expect <> c.v EOF diff --git a/test/structure b/test/structure index 057d54b..bcb124b 100755 --- a/test/structure +++ b/test/structure @@ -10,6 +10,7 @@ expect < f.b EOF diff --git a/test/tsort b/test/tsort index 0caf313..f685fcb 100644 --- a/test/tsort +++ b/test/tsort @@ -126,9 +126,9 @@ fped_fail "tsort: cycle" <