0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 . scripts/parseargs.sh
0013
0014 T=/tmp/checkghlitmus.sh.$$
0015 trap 'rm -rf $T' 0
0016 mkdir $T
0017
0018
0019 if test -d litmus
0020 then
0021 :
0022 else
0023 git clone https://github.com/paulmckrcu/litmus
0024 ( cd litmus; git checkout origin/master )
0025 fi
0026
0027
0028
0029 if test "$LKMM_DESTDIR" != "."
0030 then
0031 find litmus -type d -print |
0032 ( cd "$LKMM_DESTDIR"; sed -e 's/^/mkdir -p /' | sh )
0033 fi
0034
0035
0036 ( cd $LKMM_DESTDIR; find litmus -name '*.litmus.out' -print ) |
0037 sed -e 's/\.out$//' |
0038 xargs -r egrep -l '^ \* Result: (Never|Sometimes|Always|DEADLOCK)' |
0039 xargs -r grep -L "^P${LKMM_PROCS}"> $T/list-C-already
0040
0041
0042
0043 find litmus -name '*.litmus' -exec grep -l -m 1 "^C " {} \; > $T/list-C
0044 xargs < $T/list-C -r egrep -l '^ \* Result: (Never|Sometimes|Always|DEADLOCK)' > $T/list-C-result
0045 xargs < $T/list-C-result -r grep -L "^P${LKMM_PROCS}" > $T/list-C-result-short
0046
0047
0048 sort $T/list-C-already $T/list-C-result-short | uniq -u > $T/list-C-needed
0049
0050
0051 if scripts/runlitmushist.sh < $T/list-C-needed > $T/run.stdout 2> $T/run.stderr
0052 then
0053 errs=
0054 else
0055 errs=1
0056 fi
0057
0058 sed < $T/list-C-result-short -e 's,^,scripts/judgelitmus.sh ,' |
0059 sh > $T/judge.stdout 2> $T/judge.stderr
0060
0061 if test -n "$errs"
0062 then
0063 cat $T/run.stderr 1>&2
0064 fi
0065 grep '!!!' $T/judge.stdout