-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild
executable file
·49 lines (39 loc) · 831 Bytes
/
build
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/bash
yacc -d recalc.y
flex -I lexer.l
rm a.out
gcc lex.yy.c y.tab.c -lfl
rm my_tests
rm his_tests
echo running tests
for i in 1 2 3 4 5 6 7 8
do
#echo tests/$i.test
(a.out < tests/$i.test) >> my_tests
#a.out < tests/$i.test
#echo -------------------
(proj2_linprog < tests/$i.test) >> his_tests
#proj2_linprog < tests/$i.test
#echo
done
rm my_errors
rm his_errors
echo running errors
for i in 1 2 3 4
do
#echo tests/$i.error
(a.out < tests/$i.error) >> my_errors
#a.out < tests/$i.error
#echo -------------------
(proj2_linprog < tests/$i.error) >> his_errors
#proj2_linprog < tests/$i.error
#echo
done
rm my_custom
rm his_custom
echo running custom
(a.out < tests/mytest) >> my_custom
(proj2_linprog < tests/mytest) >> his_custom
#diff my_tests his_tests
#diff my_errors his_errors
diff -u my_custom his_custom