xfstests: convert tests to use new results directory

Essentially the change is simply this. Converting:

... >> $seq.????

to:

.... >> $RESULT_DIR/$seq.????

so that output files are directed to the defined output directory.

sed to the rescue:

$ sed -i -e '/^seq=.*$/a seqres=$RESULT_DIR/$seq' -e 's/seq.full/seqres.full/' tests/*/*

will do most of the work automatically.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Phil White <pwhite@sgi.com>
[rjohnston@sgi.com reworked for TOT changes]
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
Dave Chinner
2013-03-15 12:28:02 +00:00
committed by Rich Johnston
parent 1686f9abfc
commit 1d5d46db80
308 changed files with 1641 additions and 717 deletions
+9 -6
View File
@@ -23,13 +23,16 @@
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=1 # failure is the default!
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
rm -f $seq.full
rm -f $seqres.full
# get standard environment, filters and checks
. ./common.rc
@@ -41,15 +44,15 @@ _link_out_file $seq.out
_check_repair()
{
echo "Repairing, round 0" >> $seq.full
_scratch_xfs_repair 2>&1 | _filter_repair | tee -a $seq.full >$tmp.0
echo "Repairing, round 0" >> $seqres.full
_scratch_xfs_repair 2>&1 | _filter_repair | tee -a $seqres.full >$tmp.0
for i in 1 2 3 4
do
echo "Repairing, iteration $i" | tee -a $seq.full
echo "Repairing, iteration $i" | tee -a $seqres.full
_scratch_xfs_repair 2>&1 | _filter_repair >$tmp.$i
diff $tmp.0 $tmp.$i >> $seq.full
diff $tmp.0 $tmp.$i >> $seqres.full
if [ $? -ne 0 ]; then
echo "ERROR: repair round $i differs to round 0 (see $seq.full)" | tee -a $seq.full
echo "ERROR: repair round $i differs to round 0 (see $seqres.full)" | tee -a $seqres.full
break
fi
# echo all interesting stuff...