-
Notifications
You must be signed in to change notification settings - Fork 0
/
testall.sh
executable file
·117 lines (112 loc) · 5.08 KB
/
testall.sh
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#!/usr/local/bin/bash
if [ "$#" -lt 0 ]; then
echo "USAGE:"
echo "$0 prog1"
exit 1
fi
PRG_NAME=$1
rm out/*
SCORE=$(./run1.sh 10 $PRG_NAME ./fork | tail -1)
echo "$PRG_NAME vs ./fork 10: $SCORE" > 'out/test1-1'
SCORE=$(./run1.sh 20 $PRG_NAME ./fork | tail -1)
echo "$PRG_NAME vs ./fork 20: $SCORE" >> 'out/test1-1'
SCORE=$(./run1.sh 30 $PRG_NAME ./fork | tail -1)
echo "$PRG_NAME vs ./fork 30: $SCORE" >> 'out/test1-1'
SCORE=$(./run1.sh 40 $PRG_NAME ./fork | tail -1)
echo "$PRG_NAME vs ./fork 40: $SCORE" >> 'out/test1-1'
SCORE=$(./run1.sh 50 $PRG_NAME ./fork | tail -1)
echo "$PRG_NAME vs ./fork 50: $SCORE" >> 'out/test1-1'
cat out/test1-1
SCORE=$(./run1.sh 10 $PRG_NAME ./freehit | tail -1)
echo "$PRG_NAME vs ./freehit 10: $SCORE" > 'out/test1-2'
SCORE=$(./run1.sh 20 $PRG_NAME ./freehit | tail -1)
echo "$PRG_NAME vs ./freehit 20: $SCORE" >> 'out/test1-2'
SCORE=$(./run1.sh 30 $PRG_NAME ./freehit | tail -1)
echo "$PRG_NAME vs ./freehit 30: $SCORE" >> 'out/test1-2'
SCORE=$(./run1.sh 40 $PRG_NAME ./freehit | tail -1)
echo "$PRG_NAME vs ./freehit 40: $SCORE" >> 'out/test1-2'
SCORE=$(./run1.sh 50 $PRG_NAME ./freehit | tail -1)
echo "$PRG_NAME vs ./freehit 50: $SCORE" >> 'out/test1-2'
cat out/test1-2
SCORE=$(./run1.sh 10 $PRG_NAME ./choi | tail -1)
echo "$PRG_NAME vs ./choi 10: $SCORE" > 'out/test1-3'
SCORE=$(./run1.sh 20 $PRG_NAME ./choi | tail -1)
echo "$PRG_NAME vs ./choi 20: $SCORE" >> 'out/test1-3'
SCORE=$(./run1.sh 30 $PRG_NAME ./choi| tail -1)
echo "$PRG_NAME vs ./choi 30: $SCORE" >> 'out/test1-3'
SCORE=$(./run1.sh 40 $PRG_NAME ./choi | tail -1)
echo "$PRG_NAME vs ./choi 40: $SCORE" >> 'out/test1-3'
SCORE=$(./run1.sh 50 $PRG_NAME ./choi | tail -1)
echo "$PRG_NAME vs ./choi 50: $SCORE" >> 'out/test1-3'
cat out/test1-3
SCORE=$(./run1.sh 10 $PRG_NAME ./fork ./freehit | tail -1)
echo "$PRG_NAME vs ./fork ./freehit 10: $SCORE" > 'out/test1-4'
SCORE=$(./run1.sh 15 $PRG_NAME ./fork ./freehit | tail -1)
echo "$PRG_NAME vs ./fork ./freehit 15: $SCORE" >> 'out/test1-4'
SCORE=$(./run1.sh 20 $PRG_NAME ./fork ./freehit | tail -1)
echo "$PRG_NAME vs ./fork ./freehit 20: $SCORE" >> 'out/test1-4'
SCORE=$(./run1.sh 25 $PRG_NAME ./fork ./freehit | tail -1)
echo "$PRG_NAME vs ./fork ./freehit 25: $SCORE" >> 'out/test1-4'
SCORE=$(./run1.sh 30 $PRG_NAME ./fork ./freehit | tail -1)
echo "$PRG_NAME vs ./fork ./freehit 30: $SCORE" >> 'out/test1-4'
cat out/test1-4
SCORE=$(./run2.sh 10 $PRG_NAME ./fork | tail -1)
echo "$PRG_NAME vs ./fork 10: $SCORE" > 'out/test2-1'
SCORE=$(./run2.sh 20 $PRG_NAME ./fork | tail -1)
echo "$PRG_NAME vs ./fork 20: $SCORE" >> 'out/test2-1'
SCORE=$(./run2.sh 30 $PRG_NAME ./fork | tail -1)
echo "$PRG_NAME vs ./fork 30: $SCORE" >> 'out/test2-1'
SCORE=$(./run2.sh 40 $PRG_NAME ./fork | tail -1)
echo "$PRG_NAME vs ./fork 40: $SCORE" >> 'out/test2-1'
SCORE=$(./run2.sh 50 $PRG_NAME ./fork | tail -1)
echo "$PRG_NAME vs ./fork 50: $SCORE" >> 'out/test2-1'
cat out/test2-1
SCORE=$(./run2.sh 10 $PRG_NAME ./freehit | tail -1)
echo "$PRG_NAME vs ./freehit 10: $SCORE" > 'out/test2-2'
SCORE=$(./run2.sh 20 $PRG_NAME ./freehit | tail -1)
echo "$PRG_NAME vs ./freehit 20: $SCORE" >> 'out/test2-2'
SCORE=$(./run2.sh 30 $PRG_NAME ./freehit | tail -1)
echo "$PRG_NAME vs ./freehit 30: $SCORE" >> 'out/test2-2'
SCORE=$(./run2.sh 40 $PRG_NAME ./freehit | tail -1)
echo "$PRG_NAME vs ./freehit 40: $SCORE" >> 'out/test2-2'
SCORE=$(./run2.sh 50 $PRG_NAME ./freehit | tail -1)
echo "$PRG_NAME vs ./freehit 50: $SCORE" >> 'out/test2-2'
cat out/test2-2
SCORE=$(./run2.sh 10 $PRG_NAME ./choi | tail -1)
echo "$PRG_NAME vs ./choi 10: $SCORE" > 'out/test2-3'
SCORE=$(./run2.sh 20 $PRG_NAME ./choi | tail -1)
echo "$PRG_NAME vs ./choi 20: $SCORE" >> 'out/test2-3'
SCORE=$(./run2.sh 30 $PRG_NAME ./choi| tail -1)
echo "$PRG_NAME vs ./choi 30: $SCORE" >> 'out/test2-3'
SCORE=$(./run2.sh 40 $PRG_NAME ./choi | tail -1)
echo "$PRG_NAME vs ./choi 40: $SCORE" >> 'out/test2-3'
SCORE=$(./run2.sh 50 $PRG_NAME ./choi | tail -1)
echo "$PRG_NAME vs ./choi 50: $SCORE" >> 'out/test2-3'
cat out/test2-3
SCORE=$(./run2.sh 10 $PRG_NAME ./fork ./freehit | tail -1)
echo "$PRG_NAME vs ./fork ./freehit 10: $SCORE" > 'out/test2-4'
SCORE=$(./run2.sh 15 $PRG_NAME ./fork ./freehit | tail -1)
echo "$PRG_NAME vs ./fork ./freehit 15: $SCORE" >> 'out/test2-4'
SCORE=$(./run2.sh 20 $PRG_NAME ./fork ./freehit | tail -1)
echo "$PRG_NAME vs ./fork ./freehit 20: $SCORE" >> 'out/test2-4'
SCORE=$(./run2.sh 25 $PRG_NAME ./fork ./freehit | tail -1)
echo "$PRG_NAME vs ./fork ./freehit 25: $SCORE" >> 'out/test2-4'
SCORE=$(./run2.sh 30 $PRG_NAME ./fork ./freehit | tail -1)
echo "$PRG_NAME vs ./fork ./freehit 30: $SCORE" >> 'out/test2-4'
cat out/test2-4
echo "ARENA 1:" > 'out/output.txt'
echo "---------" >> 'out/output.txt'
cat out/test1-1 >> 'out/output.txt'
cat out/test1-2 >> 'out/output.txt'
cat out/test1-3 >> 'out/output.txt'
cat out/test1-4 >> 'out/output.txt'
echo " " >> 'out/output.txt'
echo " " >> 'out/output.txt'
echo " " >> 'out/output.txt'
echo "ARENA 2:" >> 'out/output.txt'
echo "---------" >> 'out/output.txt'
cat out/test2-1 >> 'out/output.txt'
cat out/test2-2 >> 'out/output.txt'
cat out/test2-3 >> 'out/output.txt'
cat out/test2-4 >> 'out/output.txt'
cat out/output.txt