From c18e8335e8a38479e656c3a7f8a309876c950712 Mon Sep 17 00:00:00 2001 From: Someone Serge Date: Thu, 12 May 2022 13:00:49 +0300 Subject: [PATCH] xgboost: disable TestXGBoostLib when cudaSupport ...because the test suite includes .cu files so it won't run in the sandbox, isolated from gpu --- pkgs/development/libraries/xgboost/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/xgboost/default.nix b/pkgs/development/libraries/xgboost/default.nix index 24c6ec0635d..b4d668d5fba 100644 --- a/pkgs/development/libraries/xgboost/default.nix +++ b/pkgs/development/libraries/xgboost/default.nix @@ -43,6 +43,12 @@ stdenv.mkDerivation rec { inherit doCheck; + # By default, cmake build will run ctests with all checks enabled + # If we're building with cuda, we run ctest manually so that we can skip the GPU tests + checkPhase = lib.optionalString cudaSupport '' + ctest --force-new-ctest-process ${lib.optionalString cudaSupport "-E TestXGBoostLib"} + ''; + installPhase = let libname = "libxgboost${stdenv.hostPlatform.extensions.sharedLibrary}"; in ''