-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathregress.sh
More file actions
executable file
·80 lines (71 loc) · 3.06 KB
/
regress.sh
File metadata and controls
executable file
·80 lines (71 loc) · 3.06 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
variant=$1
rm -rf build/compare
mkdir -p build/compare
#
# create a RAM image with KERNAL in $9d80-9fff and $bf40-$fe7f
#
# from our version
dd if=/dev/zero bs=1 count=40320 of=build/compare/kernal.bin 2> /dev/null
cat build/$variant/kernal/kernal.bin /dev/zero | dd bs=1 count=25216 skip=19840 >> build/compare/kernal.bin 2> /dev/null
# from reference version
dd if=/dev/zero bs=1 count=40320 of=build/compare/kernal_reference.bin 2> /dev/null
cat reference/$variant/lokernal.bin /dev/zero | dd bs=1 count=8640 >> build/compare/kernal_reference.bin 2> /dev/null
cat reference/$variant/kernal.bin /dev/zero | dd bs=1 count=16576 >> build/compare/kernal_reference.bin 2> /dev/null
if [ -e build/$variant/kernal/kernal2.bin ] && [ -e reference/$variant/kernal2.bin ]; then
dd if=/dev/zero bs=1 count=49152 of=build/compare/kernal2.bin 2> /dev/null
cat build/$variant/kernal/kernal2.bin >> build/compare/kernal2.bin
dd if=/dev/zero bs=1 count=49152 of=build/compare/kernal2_reference.bin 2> /dev/null
cat reference/$variant/kernal2.bin >> build/compare/kernal2_reference.bin
fi
#
# create RAM images of Wheels "new kernal" extensions at $5000
#
for i in 0 1 2 3 4 5 6 7 8 9 10 11 x; do
if [ -e build/$variant/kernal/reu$i.bin ]; then
# from our version
dd if=/dev/zero bs=1 count=16192 of=build/compare/reu$i.bin 2> /dev/null
cat build/$variant/kernal/reu$i.bin >> build/compare/reu$i.bin
# from reference version
dd if=/dev/zero bs=1 count=16192 of=build/compare/reu${i}_reference.bin 2> /dev/null
cat reference/$variant/reu$i.bin >> build/compare/reu${i}_reference.bin
fi
done
fail=0
for file in kernal kernal2 reu0 reu1 reu2 reu3 reu4 reu5 reu6 reu7 reu8 reu9 reu10 reu11 reux; do
if [ -e build/compare/$file.bin ]; then
hexdump -v -C build/compare/$file.bin > build/compare/$file.txt
hexdump -v -C build/compare/${file}_reference.bin > build/compare/${file}_reference.txt
if diff build/compare/${file}_reference.txt build/compare/${file}.txt > /dev/null 2>&1; then
echo "$file: OK"
else
echo "$file: MISMATCH"
diff --suppress-common-lines -y build/compare/${file}_reference.txt build/compare/${file}.txt | head -n 40
fail=1
fi
fi
done
# compare disk drivers against reference binaries
for file in drv1541; do
if [ -e reference/$variant/$file.bin ] && [ -e build/$variant/drv/$file.bin ]; then
if diff reference/$variant/$file.bin build/$variant/drv/$file.bin > /dev/null 2>&1; then
echo "$file: OK"
else
echo "$file: MISMATCH"
diff --suppress-common-lines -y <(hexdump -v -C reference/$variant/$file.bin) <(hexdump -v -C build/$variant/drv/$file.bin) | head -n 20
fail=1
fi
fi
done
# compare input drivers against reference binaries
for file in joydrv; do
if [ -e reference/$variant/$file.bin ] && [ -e build/$variant/input/$file.bin ]; then
if diff reference/$variant/$file.bin build/$variant/input/$file.bin > /dev/null 2>&1; then
echo "$file: OK"
else
echo "$file: MISMATCH"
diff --suppress-common-lines -y <(hexdump -v -C reference/$variant/$file.bin) <(hexdump -v -C build/$variant/input/$file.bin) | head -n 20
fail=1
fi
fi
done
exit $fail