cryfs: Enable tests

This commit is contained in:
adisbladis
2017-10-13 23:29:20 +08:00
parent 8efe90a3f4
commit 7a86e4cf0d
3 changed files with 82 additions and 1 deletions
+24 -1
View File
@@ -35,6 +35,11 @@ stdenv.mkDerivation rec {
buildInputs = [ boost cryptopp curl fuse openssl python spdlog ];
patches = [
./test-no-network.patch # Disable tests using external networking
./skip-failing-test-large-malloc.patch
];
# coreutils is needed for the vendored scrypt
nativeBuildInputs = [ cmake coreutils pkgconfig ];
@@ -43,9 +48,27 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DCRYFS_UPDATE_CHECKS=OFF"
"-DBoost_USE_STATIC_LIBS=OFF" # this option is case sensitive
"-DBUILD_TESTING=OFF"
"-DBUILD_TESTING=ON"
];
doCheck = true;
# Cryfs tests are broken on darwin
checkPhase = stdenv.lib.optionalString (!stdenv.isDarwin) ''
# Skip CMakeFiles directory and tests depending on fuse (does not work well with sandboxing)
SKIP_IMPURE_TESTS="CMakeFiles|fspp|cryfs-cli"
for test in `ls -d test/*/ | egrep -v "$SKIP_IMPURE_TESTS"`; do
"./$test`basename $test`-test"
done
'';
installPhase = ''
# Building with BUILD_TESTING=ON is missing the install target
mkdir -p $out/bin
install -m 755 ./src/cryfs-cli/cryfs $out/bin/cryfs
'';
meta = with stdenv.lib; {
description = "Cryptographic filesystem for the cloud";
homepage = https://www.cryfs.org;