From 532f2e1eaa870ad5f0122e957e9aa41b91d2fea6 Mon Sep 17 00:00:00 2001 From: kanschat Date: Tue, 29 Aug 2006 22:36:26 +0000 Subject: [PATCH] make output more readable git-svn-id: https://svn.dealii.org/trunk@13780 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/common/scripts/diffsearch | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/deal.II/common/scripts/diffsearch b/deal.II/common/scripts/diffsearch index fd5d7419be..991f6b99dc 100755 --- a/deal.II/common/scripts/diffsearch +++ b/deal.II/common/scripts/diffsearch @@ -8,6 +8,9 @@ # Upon success, store the name of the successful file in $1/cmp # in the file $1/OK # +# +# This is a possible replacement of the hardcoded hierarchies in the +# tests directory. ###################################################################### # Process command line arguments. @@ -18,7 +21,7 @@ diffout="/dev/null" diffopt="" -result=" " +result="" for arg in $* ; do if test "x$arg" = "x-v" ; then @@ -32,24 +35,26 @@ done if test -r $1/OK; then okname=`cat $1/OK` if test "x$okname" != "x" ; then - result=" $result $okname" + result=" $okname" if diff $diffopt $1/output $1/cmp/$okname > $diffout ; then touch $1/OK - echo $result + echo "$result" exit 0 ; fi fi fi +rm -f $1/OK + # If this round failed, check all files in this directory # If successful, write the name into $1/OK for file in `cd $1/cmp ; ls` ; do if test -f $1/cmp/$file ; then - result=" $result $file" + result="$result $file" if diff $diffopt $1/output $1/cmp/$file > $diffout ; then echo $file > $1/OK - echo $result + echo "$result" exit 0 ; fi fi @@ -57,6 +62,6 @@ done # All files failed -echo $result +echo "$result" exit 1 -- 2.39.5