Travis ASan build
This commit is contained in:
parent
4f157f3cf0
commit
fc131a1339
|
@ -40,6 +40,13 @@ if (NOT "$ENV{OPJ_CI_ARCH}" STREQUAL "")
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if ("$ENV{OPJ_CI_ASAN}" STREQUAL "1")
|
||||
set(OPJ_HAS_MEMCHECK TRUE)
|
||||
set(CTEST_MEMORYCHECK_TYPE "AddressSanitizer")
|
||||
set(CCFLAGS_ARCH "${CCFLAGS_ARCH} -g -fsanitize=address -fno-omit-frame-pointer")
|
||||
|
||||
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
|
||||
|
@ -108,6 +115,9 @@ ctest_read_custom_files(${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)
|
||||
if(OPJ_HAS_MEMCHECK)
|
||||
ctest_memcheck(BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL 2)
|
||||
endif()
|
||||
endif()
|
||||
if ("$ENV{OPJ_DO_SUBMIT}" STREQUAL "1")
|
||||
ctest_submit()
|
||||
|
|
|
@ -21,7 +21,16 @@ trap exit ERR
|
|||
|
||||
# We don't need anything for coverity scan builds
|
||||
|
||||
if [ "${COVERITY_SCAN_BRANCH:-}" != "1" ] && [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then
|
||||
if [ "${COVERITY_SCAN_BRANCH:-}" != "1" ]; then
|
||||
|
||||
if [ "${OPJ_CI_ASAN:-}" == "1" ]; then
|
||||
# We need a new version of cmake than travis-ci provides
|
||||
wget -qO - http://www.cmake.org/files/v3.3/cmake-3.3.1-Linux-x86_64.tar.gz | tar -xz
|
||||
# copy to a directory that will not changed every version
|
||||
mv cmake-3.3.1-Linux-x86_64 cmake-install
|
||||
fi
|
||||
|
||||
if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then
|
||||
|
||||
OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd)
|
||||
|
||||
|
@ -72,5 +81,5 @@ if [ "${COVERITY_SCAN_BRANCH:-}" != "1" ] && [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]
|
|||
install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_expand
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -82,6 +82,9 @@ if [ "${TRAVIS_PULL_REQUEST:-}" != "false" ] && [ "${TRAVIS_PULL_REQUEST:-}" !=
|
|||
OPJ_BUILDNAME=${OPJ_BUILDNAME}-pr${TRAVIS_PULL_REQUEST}
|
||||
fi
|
||||
OPJ_BUILDNAME=${OPJ_BUILDNAME}-${OPJ_CI_BUILD_CONFIGURATION}-3rdP
|
||||
if [ "${OPJ_CI_ASAN:-}" == "1" ]; then
|
||||
OPJ_BUILDNAME=${OPJ_BUILDNAME}-ASan
|
||||
fi
|
||||
|
||||
if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ] && [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ] && [ -d kdu ]; then
|
||||
echo "
|
||||
|
@ -93,6 +96,10 @@ Note: Binaries can only be used for non-commercial purposes.
|
|||
"
|
||||
fi
|
||||
|
||||
if [ -d cmake-install ]; then
|
||||
export PATH=${PWD}/cmake-install/bin:${PATH}
|
||||
fi
|
||||
|
||||
set -x
|
||||
# This will print configuration
|
||||
# travis-ci doesn't dump cmake version in system info, let's print it
|
||||
|
|
Loading…
Reference in New Issue