Skip to content

Commit

Permalink
run only benchmarks and no other tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyMlashkin committed Nov 28, 2024
1 parent dfd8828 commit 049bc76
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crypto3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ in stdenv.mkDerivation {
"-G Ninja"
];

doCheck = runTests; # tests are inside crypto3-tests derivation
doCheck = runTests || benchmarkTests;

checkPhase = ''
# JUNIT file without explicit file name is generated after the name of the master test suite inside `CMAKE_CURRENT_SOURCE_DIR`
Expand Down
20 changes: 13 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
sanitize = true;
});
crypto3-clang-bench = (pkgs.callPackage ./crypto3.nix {
runTests = true;
stdenv = pkgs.llvmPackages_19.stdenv;
runTests = false;
enableDebug = false;
benchmarkTests = true;
});
Expand All @@ -60,7 +61,8 @@
enableDebug = false;
});
parallel-crypto3-clang-bench = (pkgs.callPackage ./parallel-crypto3.nix {
runTests = true;
stdenv = pkgs.llvmPackages_19.stdenv;
runTests = false;
enableDebug = false;
benchmarkTests = true;
});
Expand Down Expand Up @@ -112,7 +114,7 @@
enableDebug = false;
});
crypto3-gcc-bench = (pkgs.callPackage ./crypto3.nix {
runTests = true;
runTests = false;
enableDebug = false;
benchmarkTests = true;
});
Expand All @@ -129,19 +131,19 @@
});
crypto3-clang-bench = (pkgs.callPackage ./crypto3.nix {
stdenv = pkgs.llvmPackages_19.stdenv;
runTests = true;
runTests = false;
enableDebug = false;
benchmarkTests = true;
});

parallel-crypto3-gcc = (pkgs.callPackage ./parallel-crypto3.nix {
runTests = true;
enableDebug = false;
benchmarkTests = true;
});
parallel-crypto3-gcc-bench = (pkgs.callPackage ./parallel-crypto3.nix {
runTests = true;
runTests = false;
enableDebug = false;
benchmarkTests = true;
});
parallel-crypto3-clang = (pkgs.callPackage ./parallel-crypto3.nix {
stdenv = pkgs.llvmPackages_19.stdenv;
Expand All @@ -155,7 +157,7 @@
});
parallel-crypto3-clang-bench = (pkgs.callPackage ./parallel-crypto3.nix {
stdenv = pkgs.llvmPackages_19.stdenv;
runTests = true;
runTests = false;
enableDebug = false;
benchmarkTests = true;
});
Expand Down Expand Up @@ -184,6 +186,10 @@
name = "all";
paths = [ crypto3-clang-sanitize parallel-crypto3-clang-sanitize proof-producer-clang-sanitize ];
};
all-clang-benchmarks = pkgs.symlinkJoin {
name = "all";
paths = [ crypto3-clang-bench parallel-crypto3-clang-bench ];
};
all-gcc = pkgs.symlinkJoin {
name = "all";
paths = [ crypto3-gcc parallel-crypto3-gcc proof-producer-gcc ];
Expand Down
3 changes: 2 additions & 1 deletion parallel-crypto3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ in stdenv.mkDerivation {
"-DPARALLEL_CRYPTO3_ENABLE=TRUE"
];

doCheck = runTests; # tests are inside parallel-crypto3-tests derivation
doCheck = runTests || benchmarkTests;

checkPhase = ''
# JUNIT file without explicit file name is generated after the name of the master test suite inside `CMAKE_CURRENT_SOURCE_DIR`
Expand All @@ -49,6 +49,7 @@ in stdenv.mkDerivation {
cd ..
mkdir -p ${placeholder "out"}/test-logs
find .. -type f -name '*_test.xml' -exec cp {} ${placeholder "out"}/test-logs \;
find .. -type f -name '*_benchmark.xml' -exec cp {} ${placeholder "out"}/test-logs \;
'';

shellHook = ''
Expand Down

0 comments on commit 049bc76

Please sign in to comment.