Fix OPJ_CI_SKIP_TESTS

This commit is contained in:
mayeut 2015-09-12 15:52:13 +02:00
parent 52c36b4955
commit 82c238f504
2 changed files with 23 additions and 17 deletions

View File

@ -14,7 +14,7 @@ matrix:
- os: osx - os: osx
compiler: gcc compiler: gcc
- compiler: clang - compiler: clang
env: OPJ_CI_ARCH=x86 env: OPJ_CI_ARCH=i386
addons: addons:
apt: apt:

View File

@ -40,6 +40,7 @@ if (NOT "$ENV{OPJ_CI_ARCH}" STREQUAL "")
endif() endif()
endif() endif()
if(NOT "$ENV{OPJ_CI_SKIP_TESTS}" STREQUAL "1")
# To execute part of the encoding test suite, kakadu binaries are needed to decode encoded image and compare # 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 # it to the baseline. Kakadu binaries are freely available for non-commercial purposes
# at http://www.kakadusoftware.com. # at http://www.kakadusoftware.com.
@ -53,6 +54,10 @@ if ("$ENV{OPJ_NONCOMMERCIAL}" STREQUAL "1")
set(ENV{LD_LIBRARY_PATH} ${KDUPATH}) set(ENV{LD_LIBRARY_PATH} ${KDUPATH})
set(ENV{PATH} $ENV{PATH}:${KDUPATH}) set(ENV{PATH} $ENV{PATH}:${KDUPATH})
endif() endif()
set(BUILD_TESTING "TRUE")
else()
set(BUILD_TESTING "FALSE")
endif(NOT "$ENV{OPJ_CI_SKIP_TESTS}" STREQUAL "1")
# Options # Options
set( CACHE_CONTENTS " set( CACHE_CONTENTS "
@ -64,7 +69,7 @@ CMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION}
CMAKE_C_FLAGS:STRING= ${CCFLAGS_ARCH} -Wall -Wextra -Wconversion -Wno-unused-parameter -Wdeclaration-after-statement CMAKE_C_FLAGS:STRING= ${CCFLAGS_ARCH} -Wall -Wextra -Wconversion -Wno-unused-parameter -Wdeclaration-after-statement
# Use to activate the test suite # Use to activate the test suite
BUILD_TESTING:BOOL=TRUE BUILD_TESTING:BOOL=${BUILD_TESTING}
# Build Thirdparty, useful but not required for test suite # Build Thirdparty, useful but not required for test suite
BUILD_THIRDPARTY:BOOL=TRUE BUILD_THIRDPARTY:BOOL=TRUE
@ -101,8 +106,9 @@ ctest_start(Experimental)
ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}") ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}")
ctest_read_custom_files(${CTEST_BINARY_DIRECTORY}) ctest_read_custom_files(${CTEST_BINARY_DIRECTORY})
ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}") ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}")
if(NOT "$ENV{OPJ_CI_SKIP_TESTS}" STREQUAL "1")
ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL 2) ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL 2)
endif()
if ("$ENV{OPJ_DO_SUBMIT}" STREQUAL "1") if ("$ENV{OPJ_DO_SUBMIT}" STREQUAL "1")
ctest_submit() ctest_submit()
endif() endif()