forked from facebook/fatal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
validate.sh
executable file
·56 lines (44 loc) · 952 Bytes
/
validate.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
#/bin/sh
. ./scripts.inc
set -xe
skip_test=false
skip_build=false
skip_demo=false
while [ "$1" ]; do
if [ "$1" = "notest" ]; then
skip_test=true
elif [ "$1" = "nobuild" ]; then
skip_build=true
elif [ "$1" = "nodemo" ]; then
skip_demo=true
fi
shift
done
if [ "$USE_STD" = "c++11" ] || [ "$USE_STD" = "c++0x" ]; then
skip_demo=true
fi
run_validation() {
cc="$1"
if ! which "$cc"; then
return
fi
lclear
if [ "$skip_build" != "true" ]; then
CC_OPT="-O0" USE_CC="$cc" NO_CLEAR=true ./build.sh
fi
if [ "$skip_test" != "true" ]; then
CC_OPT="-O0" USE_CC="$cc" NO_CLEAR=true ./test.sh
fi
if [ "$skip_demo" != "true" ] && [ "$cc" != "g++-4.8" ]; then
for demo in ytse_jam; do
echo -n | CC_OPT="-O0" USE_CC="$cc" NO_CLEAR=true ./demo.sh $demo
done
fi
}
if [ "$USE_CC" ]; then
run_validation "$USE_CC"
else
for cc in $full_compilers_list; do
run_validation "$cc"
done
fi