Modify TLDK jenkins job to clone and build googletest and run unit tests.
Change-Id: I20b8bce8c715a492ac77d73f07a2b26f56f4d057
Signed-off-by: Karol Latecki <karolx.latecki@intel.com>
--- /dev/null
+#!/bin/bash
+set -e -o pipefail
+echo $WORKSPACE
+git clone https://github.com/google/googletest.git $WORKSPACE/googletest
+cmake $WORKSPACE/googletest/CMakeLists.txt
+make -C $WORKSPACE/googletest
+echo GTEST_DIR=$WORKSPACE/googletest/googletest > gtest-env.prop
+echo GMOCK_DIR=$WORKSPACE/googletest/googlemock >> gtest-env.prop
+
+echo "*******************************************************************"
+echo "* GTEST BUILD SUCCESSFULLY COMPLETED"
+echo "*******************************************************************"
+
echo "sha1sum of this script: ${0}"
sha1sum $0
+# Make TLDK
make
echo "*******************************************************************"
echo "* TLDK BUILD SUCCESSFULLY COMPLETED"
echo "*******************************************************************"
+
+# Run unit tests application
+$WORKSPACE/x86_64-native-linuxapp-gcc/app/gtest-rfc --lcores=0 -n 2
+
+echo "*******************************************************************"
+echo "* TLDK UNIT TESTS SUCCESSFUL"
+echo "*******************************************************************"
branch: '{branch}'
builders:
+ - shell:
+ !include-raw-escape: gtest-build.sh
+ - inject:
+ properties-file: gtest-env.prop
- shell:
!include-raw-escape: include-raw-build.sh
notbuilt: true
builders:
+ - shell:
+ !include-raw-escape: gtest-build.sh
+ - inject:
+ properties-file: gtest-env.prop
- shell:
!include-raw-escape: include-raw-build.sh
branch: '{branch}'
builders:
+ - shell:
+ !include-raw-escape: gtest-build.sh
+ - inject:
+ properties-file: gtest-env.prop
- shell:
!include-raw-escape: include-raw-build.sh