mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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:
committed by
Rich Johnston
parent
1686f9abfc
commit
1d5d46db80
+9
-6
@@ -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...
|
||||
|
||||
Reference in New Issue
Block a user