Fix OPJ_CI_SKIP_TESTS
authormayeut <mayeut@users.noreply.github.com>
Sat, 12 Sep 2015 13:52:13 +0000 (15:52 +0200)
committermayeut <mayeut@users.noreply.github.com>
Sat, 12 Sep 2015 13:52:13 +0000 (15:52 +0200)
.travis.yml
tools/ctest_scripts/travis-ci.cmake

index c9b5282a503720520aa463602deb7a8bb923d0ef..6fd10240ffb1c1f14ebd54679006dd15902faf5c 100644 (file)
@@ -14,7 +14,7 @@ matrix:
     - os: osx
       compiler: gcc
     - compiler: clang
-      env: OPJ_CI_ARCH=x86
+      env: OPJ_CI_ARCH=i386
   
 addons:
   apt:
index 7c1c25ff1eec9d7d6471249b5e37043acaf0816b..4e6c50df2354c9bb700ad3da07074e696766cf44 100644 (file)
@@ -40,19 +40,24 @@ if (NOT "$ENV{OPJ_CI_ARCH}" STREQUAL "")
        endif()
 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 
-# at http://www.kakadusoftware.com.
-# Here's the copyright notice from kakadu:
-# Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney.
-# You are free to trial these executables and even to re-distribute them,
-# so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain.
-# Note: Binaries can only be used for non-commercial purposes.
-if ("$ENV{OPJ_NONCOMMERCIAL}" STREQUAL "1")
-       set(KDUPATH $ENV{PWD}/kdu)
-       set(ENV{LD_LIBRARY_PATH} ${KDUPATH})
-       set(ENV{PATH} $ENV{PATH}:${KDUPATH})
-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 
+       # it to the baseline. Kakadu binaries are freely available for non-commercial purposes 
+       # at http://www.kakadusoftware.com.
+       # Here's the copyright notice from kakadu:
+       # Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney.
+       # You are free to trial these executables and even to re-distribute them,
+       # so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain.
+       # Note: Binaries can only be used for non-commercial purposes.
+       if ("$ENV{OPJ_NONCOMMERCIAL}" STREQUAL "1" )
+               set(KDUPATH $ENV{PWD}/kdu)
+               set(ENV{LD_LIBRARY_PATH} ${KDUPATH})
+               set(ENV{PATH} $ENV{PATH}:${KDUPATH})
+       endif()
+       set(BUILD_TESTING "TRUE")
+else()
+       set(BUILD_TESTING "FALSE")
+endif(NOT "$ENV{OPJ_CI_SKIP_TESTS}" STREQUAL "1")
 
 # Options 
 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
 
 # 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:BOOL=TRUE
@@ -101,8 +106,9 @@ ctest_start(Experimental)
 ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}")
 ctest_read_custom_files(${CTEST_BINARY_DIRECTORY})
 ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}")
-ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL 2)
-
+if(NOT "$ENV{OPJ_CI_SKIP_TESTS}" STREQUAL "1")
+       ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL 2)
+endif()
 if ("$ENV{OPJ_DO_SUBMIT}" STREQUAL "1")
        ctest_submit()
 endif()