mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
Fix build of unit tests
This commit is contained in:
parent
f7ce10dbc1
commit
912c517bc0
5 changed files with 22 additions and 3 deletions
|
@ -69,6 +69,9 @@ headers = [config_h] + files(
|
||||||
'nix_api_value.h',
|
'nix_api_value.h',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# TODO don't install this once tests don't use it.
|
||||||
|
headers += files('nix_api_expr_internal.h')
|
||||||
|
|
||||||
subdir('build-utils-meson/export-all-symbols')
|
subdir('build-utils-meson/export-all-symbols')
|
||||||
|
|
||||||
this_library = library(
|
this_library = library(
|
||||||
|
|
|
@ -61,6 +61,9 @@ headers = [config_h] + files(
|
||||||
'nix_api_store.h',
|
'nix_api_store.h',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# TODO don't install this once tests don't use it.
|
||||||
|
headers += files('nix_api_store_internal.h')
|
||||||
|
|
||||||
subdir('build-utils-meson/export-all-symbols')
|
subdir('build-utils-meson/export-all-symbols')
|
||||||
|
|
||||||
this_library = library(
|
this_library = library(
|
||||||
|
|
|
@ -27,6 +27,9 @@ subdir('build-utils-meson/subprojects')
|
||||||
|
|
||||||
subdir('build-utils-meson/export-all-symbols')
|
subdir('build-utils-meson/export-all-symbols')
|
||||||
|
|
||||||
|
sqlite = dependency('sqlite3', 'sqlite', version : '>=3.6.19')
|
||||||
|
deps_private += sqlite
|
||||||
|
|
||||||
rapidcheck = dependency('rapidcheck')
|
rapidcheck = dependency('rapidcheck')
|
||||||
deps_private += rapidcheck
|
deps_private += rapidcheck
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
, nix-store
|
, nix-store
|
||||||
, nix-store-c
|
, nix-store-c
|
||||||
, nix-store-test-support
|
, nix-store-test-support
|
||||||
|
, sqlite
|
||||||
|
|
||||||
, rapidcheck
|
, rapidcheck
|
||||||
, gtest
|
, gtest
|
||||||
|
@ -64,6 +65,7 @@ mkDerivation (finalAttrs: {
|
||||||
nix-store
|
nix-store
|
||||||
nix-store-c
|
nix-store-c
|
||||||
nix-store-test-support
|
nix-store-test-support
|
||||||
|
sqlite
|
||||||
rapidcheck
|
rapidcheck
|
||||||
gtest
|
gtest
|
||||||
];
|
];
|
||||||
|
@ -94,10 +96,15 @@ mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
tests = {
|
tests = {
|
||||||
run = runCommand "${finalAttrs.pname}-run" {
|
run = let
|
||||||
} ''
|
# Inline some drv files shared with the libexpr tests
|
||||||
|
data = runCommand "${finalAttrs.pname}-test-data" {} ''
|
||||||
|
cp -r --no-preserve=mode ${./data} $out
|
||||||
|
cp -r --remove-destination ${../../tests/functional/derivation}/* $out/derivation/
|
||||||
|
'';
|
||||||
|
in runCommand "${finalAttrs.pname}-run" {} ''
|
||||||
PATH="${lib.makeBinPath [ finalAttrs.finalPackage ]}:$PATH"
|
PATH="${lib.makeBinPath [ finalAttrs.finalPackage ]}:$PATH"
|
||||||
export _NIX_TEST_UNIT_DATA=${./data}
|
export _NIX_TEST_UNIT_DATA=${data}
|
||||||
nix-store-test
|
nix-store-test
|
||||||
touch $out
|
touch $out
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -57,6 +57,9 @@ headers = [config_h] + files(
|
||||||
'nix_api_util.h',
|
'nix_api_util.h',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# TODO don't install this once tests don't use it.
|
||||||
|
headers += files('nix_api_util_internal.h')
|
||||||
|
|
||||||
subdir('build-utils-meson/export-all-symbols')
|
subdir('build-utils-meson/export-all-symbols')
|
||||||
|
|
||||||
this_library = library(
|
this_library = library(
|
||||||
|
|
Loading…
Reference in a new issue