-
Notifications
You must be signed in to change notification settings - Fork 71
/
autotest.sh
executable file
·61 lines (46 loc) · 1.25 KB
/
autotest.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
#!/usr/bin/env bash
function make_dir() {
rm -rf $1
mkdir -p $1
}
echo "shell log - autotest start"
./install_tools.sh
echo $(pwd)
COMPLIE_RESULT=true
WORKSPACE=$(pwd)
cd $WORKSPACE
./update_baseline.sh 1
if test $? -ne 0; then
exit 1
fi
cp -r $WORKSPACE/test/baseline $WORKSPACE/result
make_dir result
make_dir build
cd build
cmake -DCMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage -g -O0" -DTGFX_USE_SWIFTSHADER=ON -DTGFX_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Debug ../
if test $? -eq 0; then
echo "~~~~~~~~~~~~~~~~~~~CMakeLists OK~~~~~~~~~~~~~~~~~~"
else
echo "~~~~~~~~~~~~~~~~~~~CMakeLists error~~~~~~~~~~~~~~~~~~"
exit
fi
cmake --build . --target TGFXFullTest -- -j 12
if test $? -eq 0; then
echo "~~~~~~~~~~~~~~~~~~~TGFXFullTest make successed~~~~~~~~~~~~~~~~~~"
else
echo "~~~~~~~~~~~~~~~~~~~TGFXFullTest make error~~~~~~~~~~~~~~~~~~"
exit 1
fi
./TGFXFullTest --gtest_output=json:TGFXFullTest.json
if test $? -eq 0; then
echo "~~~~~~~~~~~~~~~~~~~TGFXFullTest successed~~~~~~~~~~~~~~~~~~"
else
echo "~~~~~~~~~~~~~~~~~~~TGFXFullTest Failed~~~~~~~~~~~~~~~~~~"
COMPLIE_RESULT=false
fi
cp -a $WORKSPACE/build/*.json $WORKSPACE/result/
cd ..
cp -r $WORKSPACE/test/out $WORKSPACE/result
if [ "$COMPLIE_RESULT" == false ]; then
exit 1
fi