-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun-test.sh
executable file
·28 lines (27 loc) · 1.04 KB
/
run-test.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
#!/bin/bash
if [ -z $SAXON_HOME ]; then
export SAXON_HOME=$PWD/validator/saxon
fi
for xspectest in test/xspec/*.xspec;do
if [[ "$xspectest" == *schematron* ]]; then ./xspec/bin/xspec.sh -s $xspectest &> result.log
if [ $? -ne 0 ] || grep -q ".*failed:\s[1-9]" result.log || grep -q -E "\*+\sError\s(running|compiling)\sthe\stest\ssuite" result.log;
then
echo "FAILED: $xspectest";
echo "---------- result.log";
cat result.log;
echo "----------";
exit 1;
else echo "OK: $xspectest";
fi
else ./xspec/bin/xspec.sh $xspectest &> result.log
if [ $? -ne 0 ] || grep -q ".*failed:\s[1-9]" result.log || grep -q -E "\*+\sError\s(running|compiling)\sthe\stest\ssuite" result.log;
then
echo "FAILED: $xspectest";
echo "---------- result.log";
cat result.log;
echo "----------";
exit 1;
else echo "OK: $xspectest";
fi
fi
done