| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 |
|
| 12 | . scripts/parseargs.sh
|
| 13 | . scripts/hwfnseg.sh
|
| 14 |
|
| 15 | T=/tmp/checkghlitmus.sh.$$
|
| 16 | trap 'rm -rf $T' 0
|
| 17 | mkdir $T
|
| 18 |
|
| 19 | |
| 20 | if test -d litmus
|
| 21 | then
|
| 22 | :
|
| 23 | else
|
| 24 | git clone https://github.com/paulmckrcu/litmus
|
| 25 | ( cd litmus; git checkout origin/master )
|
| 26 | fi
|
| 27 |
|
| 28 | |
| 29 | |
| 30 | if test "$LKMM_DESTDIR" != "."
|
| 31 | then
|
| 32 | find litmus -type d -print |
|
| 33 | ( cd "$LKMM_DESTDIR"; sed -e 's/^/mkdir -p /' | sh )
|
| 34 | fi
|
| 35 |
|
| 36 | |
| 37 | ( cd $LKMM_DESTDIR; find litmus -name "*.litmus${hwfnseg}.out" -print ) |
|
| 38 | sed -e "s/${hwfnseg}"'\.out$//' |
|
| 39 | xargs -r grep -E -l '^ \* Result: (Never|Sometimes|Always|DEADLOCK)' |
|
| 40 | xargs -r grep -L "^P${LKMM_PROCS}"> $T/list-C-already
|
| 41 |
|
| 42 | |
| 43 | |
| 44 | find litmus -name '*.litmus' -print | mselect7 -arch C > $T/list-C
|
| 45 | xargs < $T/list-C -r grep -E -l '^ \* Result: (Never|Sometimes|Always|DEADLOCK)' > $T/list-C-result
|
| 46 | xargs < $T/list-C-result -r grep -L "^P${LKMM_PROCS}" > $T/list-C-result-short
|
| 47 |
|
| 48 | |
| 49 | sort $T/list-C-already $T/list-C-result-short | uniq -u > $T/list-C-needed
|
| 50 |
|
| 51 | |
| 52 | if scripts/runlitmushist.sh < $T/list-C-needed > $T/run.stdout 2> $T/run.stderr
|
| 53 | then
|
| 54 | errs=
|
| 55 | else
|
| 56 | errs=1
|
| 57 | fi
|
| 58 |
|
| 59 | sed < $T/list-C-result-short -e 's,^,scripts/judgelitmus.sh ,' |
|
| 60 | sh > $T/judge.stdout 2> $T/judge.stderr
|
| 61 |
|
| 62 | if test -n "$errs"
|
| 63 | then
|
| 64 | cat $T/run.stderr 1>&2
|
| 65 | fi
|
| 66 | grep '!!!' $T/judge.stdout
|