blob: a206408078d87542892dc9f0bcfd32000fb76086 (
plain)
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
|
#!/bin/bash
#
. ../subject.sh
langs='asm crack c cs d go java julia ocaml'
mkdir -p working
echo working/* | xargs rm -f
[ $# = 0 ] && set -- `find case -type f -and -not -name '*_*' | sort`
for fn; do
prohibit_languages=`sed '/@PROHIBIT_LANGUAGES:/s/^.*: *//p;d' $fn`
for l in $langs; do
echo "$prohibit_languages" | grep -q "\<$l\>" && continue;
out=${fn%.rl}_$l.out
out=working/${out#case/}
class=${fn%.rl}
class=${class#case/}_$l
exp=${fn%.rl}_$l.rl
diff=${fn%.rl}_$l.out
diff=working/${diff#case/}
sh=${fn%.rl}_$l.sh
sh=working/${sh#case/}
rm -f $sh
echo echo testing $l $fn >> $sh
echo ./trans $l $out $fn $class >> $sh
echo diff $exp $out '>' $diff >> $sh
echo $sh
done
done
|