openjpeg: enable tests

This commit is contained in:
Robert Scott 2019-07-06 18:36:43 +01:00 committed by Frederik Rietdijk
parent 5c85b24edc
commit 3e5ccd4300
1 changed files with 9 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig
, libpng, libtiff, lcms2
, libpng, libtiff, lcms2, jpylyzer
, mj2Support ? true # MJ2 executables
, jpwlLibSupport ? true # JPWL library & executables
, jpipLibSupport ? false # JPIP library & executables
@ -8,7 +8,7 @@
, openjpegJarSupport ? false # Openjpeg jar (Java)
, jp3dSupport ? true # # JP3D comp
, thirdPartySupport ? false # Third party libraries - OFF: only build when found, ON: always build
, testsSupport ? false
, testsSupport ? true
, jdk ? null
# Inherit generics
, branch, version, revision, sha256, patches ? [], extraFlags ? [], ...
@ -62,6 +62,13 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ libpng libtiff lcms2 ];
doCheck = testsSupport;
checkPhase = ''
substituteInPlace ../tools/ctest_scripts/travis-ci.cmake \
--replace "JPYLYZER_EXECUTABLE=" "JPYLYZER_EXECUTABLE=\"${jpylyzer}/bin/jpylyzer\" # "
OPJ_SOURCE_DIR=.. ctest -S ../tools/ctest_scripts/travis-ci.cmake
'';
passthru = {
incDir = "openjpeg-${branch}";
};