blob: 5d7eb130e6aab5599ba800006f412ab392d3b73b (
plain)
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
|
#!/usr/bin/env bash
# This script calls the run.sh in the test-suite (see the test-suite dir)
# and bails if the tests fail, giving enough to run.sh to mark that commit
# as BAD and bail.
if [[ $1 = '' ]]; then
echo "Syntax: $0 <full-test-name>"
exit 1
fi
testname=$1
if [ ! -d test ]; then
echo "Missing test directory"
exit 1
fi
if [ ! -f test/run.sh ]; then
echo "Missing test script"
exit 1
fi
# Check which build was built last
build_dir=build
if [ build2/bin/clang -nt build/bin/clang ]; then
build_dir=build2
fi
# Update install dir
rm -f install
ln -s $build_dir install
# Run the test
cd test
./run.sh -t $testname
result=$?
cd ..
if [[ $result != 0 ]]; then
exit 1
fi
|