mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
nix store benchmarks: Only get unit test dir from env var
This commit is contained in:
parent
44d096f68d
commit
fa76b6e215
2 changed files with 11 additions and 16 deletions
|
|
@ -51,18 +51,10 @@ static void BM_UnparseRealDerivationFile(benchmark::State & state, const std::st
|
||||||
|
|
||||||
// Register benchmarks for actual test derivation files if they exist
|
// Register benchmarks for actual test derivation files if they exist
|
||||||
BENCHMARK_CAPTURE(
|
BENCHMARK_CAPTURE(
|
||||||
BM_ParseRealDerivationFile,
|
BM_ParseRealDerivationFile, hello, getEnvNonEmpty("_NIX_TEST_UNIT_DATA").value() + "/derivation/hello.drv");
|
||||||
hello,
|
|
||||||
getEnvNonEmpty("_NIX_TEST_UNIT_DATA").value_or(NIX_UNIT_TEST_DATA) + "/derivation/hello.drv");
|
|
||||||
BENCHMARK_CAPTURE(
|
BENCHMARK_CAPTURE(
|
||||||
BM_ParseRealDerivationFile,
|
BM_ParseRealDerivationFile, firefox, getEnvNonEmpty("_NIX_TEST_UNIT_DATA").value() + "/derivation/firefox.drv");
|
||||||
firefox,
|
|
||||||
getEnvNonEmpty("_NIX_TEST_UNIT_DATA").value_or(NIX_UNIT_TEST_DATA) + "/derivation/firefox.drv");
|
|
||||||
BENCHMARK_CAPTURE(
|
BENCHMARK_CAPTURE(
|
||||||
BM_UnparseRealDerivationFile,
|
BM_UnparseRealDerivationFile, hello, getEnvNonEmpty("_NIX_TEST_UNIT_DATA").value() + "/derivation/hello.drv");
|
||||||
hello,
|
|
||||||
getEnvNonEmpty("_NIX_TEST_UNIT_DATA").value_or(NIX_UNIT_TEST_DATA) + "/derivation/hello.drv");
|
|
||||||
BENCHMARK_CAPTURE(
|
BENCHMARK_CAPTURE(
|
||||||
BM_UnparseRealDerivationFile,
|
BM_UnparseRealDerivationFile, firefox, getEnvNonEmpty("_NIX_TEST_UNIT_DATA").value() + "/derivation/firefox.drv");
|
||||||
firefox,
|
|
||||||
getEnvNonEmpty("_NIX_TEST_UNIT_DATA").value_or(NIX_UNIT_TEST_DATA) + "/derivation/firefox.drv");
|
|
||||||
|
|
|
||||||
|
|
@ -130,10 +130,13 @@ if get_option('benchmarks')
|
||||||
link_args : linker_export_flags,
|
link_args : linker_export_flags,
|
||||||
install : true,
|
install : true,
|
||||||
cpp_pch : do_pch ? [ 'pch/precompiled-headers.hh' ] : [],
|
cpp_pch : do_pch ? [ 'pch/precompiled-headers.hh' ] : [],
|
||||||
cpp_args : [
|
|
||||||
'-DNIX_UNIT_TEST_DATA="' + meson.current_source_dir() + '/data"',
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
benchmark('nix-store-benchmarks', benchmark_exe)
|
benchmark(
|
||||||
|
'nix-store-benchmarks',
|
||||||
|
benchmark_exe,
|
||||||
|
env : {
|
||||||
|
'_NIX_TEST_UNIT_DATA' : meson.current_source_dir() / 'data',
|
||||||
|
},
|
||||||
|
)
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue