From cc692142d9b8824ad46e0b0d7cc949813cedf2d9 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 28 Jan 2014 20:33:19 +0100 Subject: [PATCH] tests: Feed only logs and xdump to normalize.pl Feeding other test output files (right now tests/files/files.out tests/fairland/fairland.out fairland/newcap_script) works, but it's odd, and might not work as well for all future output files. Only strip trailing white space there. There used to be other output files that required normalize.pl: client output. Gone since commit 9ca3fa9. Signed-off-by: Markus Armbruster --- tests/test-common.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/test-common.sh b/tests/test-common.sh index eec7b43c..5fc117c1 100644 --- a/tests/test-common.sh +++ b/tests/test-common.sh @@ -177,18 +177,22 @@ cmp_logs_xdump() cmp_out() { - local opt exp act nrm ret=0 + local exp act nrm ret=0 for i do - case "$i" in - */journal.log) opt=-j ;; - */server.log) opt=-s ;; - *) opt= ;; - esac exp="$testdir/${i##*/}" act="sandbox/$i" nrm="sandbox/normalized-${i##*/}" - perl "$srcdir"/tests/normalize.pl $opt "$act" >"$nrm" + case "$i" in + */journal.log) + perl "$srcdir"/tests/normalize.pl -j "$act" ;; + */server.log) + perl "$srcdir"/tests/normalize.pl -s "$act" ;; + *.xdump) + perl "$srcdir"/tests/normalize.pl "$act" ;; + *) + perl -pe 's/\s+$/\n/;' "$act" ;; + esac >"$nrm" if diff -u "$exp" "$nrm" >"$nrm.diff" then echo "$i OK"