Skip to content

Commit

Permalink
Add script for jenkins CI and fix of issues
Browse files Browse the repository at this point in the history
  • Loading branch information
eramox committed Jul 18, 2016
1 parent 47577dd commit 22a74b0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
13 changes: 13 additions & 0 deletions jenkinsBuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
JK_SRV_WABLE="$HOME/app-root/data"

GTEST_LIB_FOLDER="$JK_SRV_WABLE/usr/local/lib"
GTEST_INCLUDE_FOLDER="$JK_SRV_WABLE/compilation/googletest/googletest/include"

echo $GTEST_INCLUDE_FOLDER

sh runBuild.sh " \
-DCONTINUOUS_INTEGRATION_BUILD=ON \
-DBUILD_LIB_TEST=ON \
-DGTEST_ROOT=$GTEST_LIB_FOLDER \
-DGTEST_INCLUDE_DIR=$GTEST_INCLUDE_FOLDER \
"
8 changes: 4 additions & 4 deletions liberamox/testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ include_directories("${PROJECT_BINARY_DIR}/src")
# add the sources to the include directive
include_directories("../lib")

if (BUILD_LIB_TEST)
if (BUILD_LIB_TEST)
enable_testing()
find_package(GTest REQUIRED)
include_directories(
${GTEST_INCLUDE_DIRS}
${GMOCK_INCLUDE_DIRS}
${GTEST_INCLUDE_DIR}
)

# add the executable
add_executable(${EXECUTABLE_NAME} main.cpp)
SET_TARGET_PROPERTIES(${EXECUTABLE_NAME} PROPERTIES LINKER_LANGUAGE CXX)
Expand Down
18 changes: 5 additions & 13 deletions runTest.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
echo "Starting test"

TEST_EXE="gtestexe"
REPORT_XML="gtestreport.xml"
REPORT_FOLDER="../"

# moving to test folder
cd liberamox/build/testing

# Google test
if [ $run_gtest -eq 1 ]; then
echo "Running GTest:"
./completetestlib
./$TEST_EXE --gtest_output=xml:$REPORT_FOLDER$REPORT_XML
res_gtest=$?
fi

cd -
echo "Test Finished"

exit $res_gtest

if [ "$1" == "" ]
then
echo "no parameter, executing all";
run_gtest=1;
else
if [ "$1" == "--gtest" ]
then
run_gtest=1;
fi

0 comments on commit 22a74b0

Please sign in to comment.