Merge "Refactor vpp job names to align with jenkins labels"
[ci-management.git] / jjb / scripts / vpp / gcc-build.sh
1 #!/bin/bash
2 # basic build script example
3 set -xe -o pipefail
4
5 OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
6 OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
7
8 echo OS_ID: $OS_ID
9 echo OS_VERSION_ID: $OS_VERSION_ID
10
11 # do nothing but print the current slave hostname
12 hostname
13
14 echo "cat /etc/bootstrap.sha"
15 if [ -f /etc/bootstrap.sha ];then
16     cat /etc/bootstrap.sha
17 else
18     echo "Cannot find cat /etc/bootstrap.sha"
19 fi
20
21 echo "cat /etc/bootstrap-functions.sha"
22 if [ -f /etc/bootstrap-functions.sha ];then
23     cat /etc/bootstrap-functions.sha
24 else
25     echo "Cannot find cat /etc/bootstrap-functions.sha"
26 fi
27
28 echo "sha1sum of this script: ${0}"
29 sha1sum $0
30 export CC=gcc
31
32 make UNATTENDED=yes install-dep
33 make UNATTENDED=yes install-ext-deps
34 make UNATTENDED=yes build
35 # TODO: Add 'smoke test' env var to select smoke test cases
36 #       then update this accordingly.  For now pick a few basic suites...
37 MAKE_TEST_SUITES="vlib vppinfra vpe_api vapi vom bihash"
38 for suite in $MAKE_TEST_SUITES ; do
39     make UNATTENDED=yes GCOV_TESTS=1 TEST_JOBS=auto TEST=$suite test
40     make UNATTENDED=yes GCOV_TESTS=1 TEST_JOBS=auto TEST=$suite test-debug
41 done
42
43 echo "*******************************************************************"
44 echo "* VPP GCC BUILD SUCCESSFULLY COMPLETED"
45 echo "*******************************************************************"