-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathjenkins_run_crave_check.sh
executable file
·84 lines (62 loc) · 1.35 KB
/
jenkins_run_crave_check.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
79
80
81
82
#!/bin/bash
#IMPORTANT to catch all errors
set -e
I=`basename $0`
echo "$I version 0.1, 2016-02-01, 16:49"
echo "*********************************************************"
echo
### some helper functions
showRegionBegin() {
echo "#################################################################"
echo "## BEGIN: $1"
}
showRegionEnd() {
echo "## END: $1"
echo "#################################################################"
}
### some helper functions end
export CC=gcc
export CXX=g++
#export HOMEDIR=`pwd`
echo "Check HOMEDIR: $HOMEDIR"
if [ -z "$HOMEDIR" ]; then
echo "Error: Define HOMEDIR !!"
exit 1
fi
if ! [ -d "$HOMEDIR" ];then
echo "Error: $HOMEDIR not found!"
exit 1
fi
echo "ok"
#set +x # echo off
echo
echo "#################################################################"
echo "Information:"
echo
scripts/show_gits_summary.sh
echo
scripts/show_linux_distribution.sh
echo
echo "Environment variables"
echo "CC: $CC"
echo "CXX: $CXX"
$CXX --version
echo "#################################################################"
echo
CI_SKIP=`git log -1 --oneline | grep "[ci skip]"`
if [ -n "$CI_SKIP" ]; then
echo "skip build"
exit
fi
showRegionBegin "Build crave"
pwd
rm build -Rf # clean
echo "make:"
make
showRegionEnd "Build crave"
showRegionBegin "make test"
cd build
pwd
echo "make test:"
make test
showRegionEnd "make test"