travis: Run CPP tests

This commit is contained in:
AbdealiJK 2016-12-02 08:58:42 +05:30 committed by Tianqi Chen
parent 006f9e0760
commit 61a9b3a49e
3 changed files with 16 additions and 0 deletions

View File

@ -20,6 +20,8 @@ env:
- TASK=java_test
# cmake test
- TASK=cmake_test
# c++ test
- TASK=cpp_test
matrix:
exclude:
@ -33,6 +35,8 @@ matrix:
env: TASK=java_test
- os: osx
env: TASK=python_lightweight_test
- os: osx
env: TASK=cpp_test
# dependent apt packages
addons:

View File

@ -25,6 +25,10 @@ LIB_RABIT = librabit.a
# path to libjvm.so
LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server
# path to googletest and whether to measure coverage or not
GTEST_PATH =
WITH_COVER = 1
# List of additional plugins, checkout plugin folder.
# uncomment the following lines to include these plugins
# you can also add your own plugin like this

View File

@ -88,3 +88,11 @@ if [ ${TASK} == "cmake_test" ]; then
cmake ..
make
fi
if [ ${TASK} == "cpp_test" ]; then
set -e
make -f dmlc-core/scripts/packages.mk gtest
echo "TEST_COVER=1" >> config.mk
echo "GTEST_PATH="${CACHE_PREFIX} >> config.mk
make check
fi