mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
fileset for store unit test data
This commit is contained in:
parent
4d6bc61b8d
commit
11946817f0
1 changed files with 10 additions and 6 deletions
|
@ -86,14 +86,18 @@ mkMesonDerivation (finalAttrs: {
|
||||||
passthru = {
|
passthru = {
|
||||||
tests = {
|
tests = {
|
||||||
run = let
|
run = let
|
||||||
# Inline some drv files shared with the libexpr tests
|
# Some data is shared with the functional tests: they create it,
|
||||||
data = runCommand "${finalAttrs.pname}-test-data" {} ''
|
# we consume it.
|
||||||
cp -r --no-preserve=mode ${./data} $out
|
data = lib.fileset.toSource {
|
||||||
cp -r --remove-destination ${../../tests/functional/derivation}/* $out/derivation/
|
root = ../..;
|
||||||
'';
|
fileset = lib.fileset.unions [
|
||||||
|
./data
|
||||||
|
../../tests/functional/derivation
|
||||||
|
];
|
||||||
|
};
|
||||||
in runCommand "${finalAttrs.pname}-run" {} ''
|
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 + "/src/nix-store-test/data"}
|
||||||
nix-store-tests
|
nix-store-tests
|
||||||
touch $out
|
touch $out
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue