-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-tests.sh
executable file
·78 lines (66 loc) · 1.87 KB
/
run-tests.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
echo
echo "----------------------------------"
echo "Testing CheckFile for FA"
echo "The tests below should all SUCCEED"
echo "----------------------------------"
echo
ls testsuite/FA/valid/* \
| awk '{ print "echo \"Checking file: "$1"\"; scripts/CheckFile.sh "$1; }' \
| bash
echo
echo "-------------------------------"
echo "Testing CheckFile for FA"
echo "The tests below should all FAIL"
echo "-------------------------------"
echo
ls testsuite/FA/invalid/* \
| awk '{ print "echo \"Checking file: "$1"\"; scripts/CheckFile.sh "$1; }' \
| bash
echo
echo "----------------------------------"
echo "Testing ProcessFile for FA"
echo "The tests below should all SUCCEED"
echo "----------------------------------"
echo
ls testsuite/FA/pre/* \
| xargs -n 1 basename \
| awk '{ print " \
echo \"Processing file: testsuite/FA/pre/"$1"\"; \
rm -rf temp; \
mkdir temp; \
cp testsuite/FA/pre/"$1" temp/; \
scripts/ProcessFile.sh temp/"$1"; \
N=`ls temp`; \
if [[ -e \"testsuite/FA/valid/$N\" ]]; then \
echo Success; \
else \
echo FAILURE; \
fi; \
rm -r temp; \
"; }' \
| bash
echo
echo "----------------------------------"
echo "Testing CheckFile for RA"
echo "The tests below should all SUCCEED"
echo "----------------------------------"
echo
( ls testsuite/RA/valid/*.ttl ;
ls testsuite/RA/valid/*.nq ;
ls testsuite/RA/valid/*.trig ;
ls testsuite/RA/valid/*.rdf
) \
| awk '{ print "echo \"Checking file: "$1"\"; scripts/CheckFile.sh "$1; }' \
| bash
echo
echo "-------------------------------"
echo "Testing CheckFile for RA"
echo "The tests below should all FAIL"
echo "-------------------------------"
echo
( ls testsuite/RA/invalid/*.ttl ;
ls testsuite/RA/invalid/*.nq ;
ls testsuite/RA/invalid/*.trig
) \
| awk '{ print "echo \"Checking file: "$1"\"; scripts/CheckFile.sh "$1; }' \
| bash