diff --git a/tools/ctest_scripts/travis-ci.cmake b/tools/ctest_scripts/travis-ci.cmake index 841d926c..8d5b9239 100644 --- a/tools/ctest_scripts/travis-ci.cmake +++ b/tools/ctest_scripts/travis-ci.cmake @@ -6,10 +6,27 @@ cmake_minimum_required(VERSION 2.8) -set(ENV{LANG} en_US.UTF-8) +set( ENV{LANG} en_US.UTF-8) set( CTEST_DASHBOARD_ROOT "$ENV{PWD}/build" ) set( CTEST_CMAKE_GENERATOR "Unix Makefiles") # Always makefile in travis-ci environment -set( BUILD_PLATFORM "x86_64" ) + +if ("$ENV{OPJ_BUILD_CONFIGURATION}" STREQUAL "") + set( CTEST_BUILD_CONFIGURATION "Release") +else() + set( CTEST_BUILD_CONFIGURATION "$ENV{OPJ_BUILD_CONFIGURATION}") +endif() + +if ("$ENV{OPJ_SITE}" STREQUAL "") + set( CTEST_SITE "Unknown") +else() + set( CTEST_SITE "$ENV{OPJ_SITE}") +endif() + +if ("$ENV{OPJ_BUILDNAME}" STREQUAL "") + set( CTEST_BUILD_NAME "Unknown-${CTEST_BUILD_CONFIGURATION}") +else() + set( CTEST_BUILD_NAME "$ENV{OPJ_BUILDNAME}") +endif() # To execute part of the encoding test suite, kakadu binaries are needed to decode encoded image and compare # it to the baseline. Kakadu binaries are freely available for non-commercial purposes diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index 58b86c1a..75c01dc9 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -84,7 +84,10 @@ fi set -x # This will print configuration -export OPJ_DO_SUBMIT=${OPJ_DO_SUBMIT} +export OPJ_SITE=${OPJ_SITE} +export OPJ_BUILDNAME=${OPJ_BUILDNAME} export OPJ_SOURCE_DIR=${OPJ_SOURCE_DIR} +export OPJ_BUILD_CONFIGURATION=${OPJ_BUILD_CONFIGURATION} +export OPJ_DO_SUBMIT=${OPJ_DO_SUBMIT} -ctest -S ${OPJ_SOURCE_DIR}/tools/ctest_scripts/travis-ci.cmake -V -D CTEST_BUILD_NAME:STRING=${OPJ_BUILDNAME} -D CTEST_SITE:STRING=${OPJ_SITE} -D CTEST_BUILD_CONFIGURATION:STRING=${OPJ_BUILD_CONFIGURATION} +ctest -S ${OPJ_SOURCE_DIR}/tools/ctest_scripts/travis-ci.cmake -V