-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_tests.sh
executable file
·57 lines (45 loc) · 1010 Bytes
/
run_tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash -e
# call this script with the argument directory of traces to test test
# e.g. ./this_script.sh current_tests/open_read_write
if [[ $1 == "-dummy" ]]
then
shift;
real=0;
else
real=1;
fi
test_dir=$1
if [[ ! (-d $test_dir) ]]
then
echo "Error: argument is not a directory containing trace files";
exit 1;
fi
date=`date +'%F'`
test_dir_name=`basename $test_dir`
if [[ $real -eq 1 ]]
then
OUTDIR=`mktemp -d --tmpdir=. ${date}_${test_dir_name}_XXX`
else
OUTDIR=`mktemp -d --tmpdir=. dummy_${test_dir_name}_XXX`
fi
echo "creating test-directory $OUTDIR ..."
cp $test_dir/* $OUTDIR
rm -f $OUTDIR/*~
mkdir $OUTDIR/results
cd $OUTDIR
for file in *.trace; do
../run_trace.sh -q $file
# be more verbose
# ../run_trace.sh $file
echo "-----------------------------------"
done
echo -e "\ndone!"
# tr: I prefer not to stage these in git automatically!
#
# if [[ $real -eq 1 ]]
# then
# cd ..
# echo "staging $OUTDIR ..."
# git stage $OUTDIR
# fi
exit 0