-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmktests
executable file
·49 lines (43 loc) · 933 Bytes
/
mktests
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
#!/bin/sh
# Make the output files for each test
# Build our ROMs if needed
if [ ! -f ucode.rom ]
then make
fi
for i in Examples/example*s
do
# Work out the output and error file names
out=`echo $i | sed 's/example/out.example/'`
err=`echo $i | sed 's/example/err.example/'`
if [ ! -f "$out" -a ! -f "$err" ]
then
./cas $i 2> "$err"
# If the err file is empty
if [ ! -s "$err" ]
then
rm -f "$err"
./cas $i
./csim > "$out"
fi
fi
rm -f instr.rom
done
for i in Examples/ramexample*s
do
# Work out the output and error file names
out=`echo $i | sed 's/example/out.example/'`
err=`echo $i | sed 's/example/err.example/'`
if [ ! -f "$out" -a ! -f "$err" ]
then
./cas $i 2> "$err"
# If the err file is empty
if [ ! -s "$err" ]
then
rm -f "$err"
./cas $i
./csim -l > "$out"
fi
fi
rm -f instr.rom
done
exit 0