forked from lix-project/lix
* Purify `make check'.
This commit is contained in:
parent
7adaa6d446
commit
9c3099d328
|
@ -23,5 +23,6 @@
|
|||
-e "s^@xsltproc\@^$(xsltproc)^g" \
|
||||
-e "s^@aterm_bin\@^$(aterm_bin)^g" \
|
||||
-e "s^@version\@^$(VERSION)^g" \
|
||||
-e "s^@testPath\@^$(coreutils):$$(dirname $$(type -P expr))^g" \
|
||||
< $< > $@ || rm $@
|
||||
if test -x $<; then chmod +x $@; fi
|
||||
|
|
|
@ -5,6 +5,7 @@ let {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" ./dependencies.builder1.sh];
|
||||
PATH = "@testPath@";
|
||||
};
|
||||
|
||||
input2 = derivation {
|
||||
|
@ -12,6 +13,7 @@ let {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" ./dependencies.builder2.sh];
|
||||
PATH = "@testPath@";
|
||||
};
|
||||
|
||||
body = derivation {
|
||||
|
@ -19,6 +21,7 @@ let {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" ./dependencies.builder0.sh];
|
||||
PATH = "@testPath@";
|
||||
inherit input1 input2;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
export PATH=/bin:/usr/bin:$PATH
|
||||
|
||||
mkdir $out
|
||||
echo $(cat $input1/foo)$(cat $input2/bar) > $out/foobar
|
||||
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
export PATH=/bin:/usr/bin:$PATH
|
||||
|
||||
mkdir $out
|
||||
echo FOO > $out/foo
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
export PATH=/bin:/usr/bin:$PATH
|
||||
|
||||
mkdir $out
|
||||
echo BAR > $out/bar
|
||||
|
|
|
@ -5,6 +5,7 @@ let {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" ./dependencies.builder1.sh];
|
||||
PATH = "@testPath@";
|
||||
};
|
||||
|
||||
input2 = derivation {
|
||||
|
@ -12,6 +13,7 @@ let {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" ./dependencies.builder2.sh];
|
||||
PATH = "@testPath@";
|
||||
};
|
||||
|
||||
body = derivation {
|
||||
|
@ -19,6 +21,7 @@ let {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" (./dependencies.builder0.sh + "/FOOBAR/../.")];
|
||||
PATH = "@testPath@";
|
||||
input1 = input1 + "/.";
|
||||
inherit input2;
|
||||
};
|
||||
|
|
1
tests/dummy
Normal file
1
tests/dummy
Normal file
|
@ -0,0 +1 @@
|
|||
Hello World
|
|
@ -3,4 +3,5 @@ derivation {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" ./simple.builder.sh];
|
||||
goodPath = "@testPath@";
|
||||
}
|
|
@ -1,3 +1 @@
|
|||
export PATH=/bin:/usr/bin:$PATH
|
||||
|
||||
echo "Hello World!" > $out
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
export PATH=/bin:/usr/bin:$PATH
|
||||
|
||||
mkdir $out
|
||||
mkdir $out/bla
|
||||
echo "Hello World!" > $out/foo
|
||||
|
|
|
@ -8,6 +8,7 @@ rec {
|
|||
outputHashMode = mode;
|
||||
outputHashAlgo = algo;
|
||||
outputHash = hash;
|
||||
PATH = "@testPath@";
|
||||
};
|
||||
|
||||
good = [
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
export PATH=/bin:/usr/bin:$PATH
|
||||
|
||||
mkdir $out
|
||||
echo $(cat $input1/foo)$(cat $input2/bar) > $out/foobar
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ let {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" ./dependencies.builder1.sh];
|
||||
PATH = "@testPath@";
|
||||
};
|
||||
|
||||
input2 = derivation {
|
||||
|
@ -12,6 +13,7 @@ let {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" ./dependencies.builder2.sh];
|
||||
PATH = "@testPath@";
|
||||
};
|
||||
|
||||
body = derivation {
|
||||
|
@ -19,6 +21,7 @@ let {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" ./gc-concurrent.builder.sh];
|
||||
PATH = "@testPath@";
|
||||
inherit input1 input2;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
export PATH=/bin:/usr/bin:$PATH
|
||||
|
||||
mkdir $out
|
||||
echo $(cat $input1/foo)$(cat $input2/bar)xyzzy > $out/foobar
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ let {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" ./dependencies.builder1.sh];
|
||||
PATH = "@testPath@";
|
||||
};
|
||||
|
||||
input2 = derivation {
|
||||
|
@ -12,6 +13,7 @@ let {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" ./dependencies.builder2.sh];
|
||||
PATH = "@testPath@";
|
||||
};
|
||||
|
||||
body = derivation {
|
||||
|
@ -19,6 +21,7 @@ let {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" ./gc-concurrent2.builder.sh];
|
||||
PATH = "@testPath@";
|
||||
inherit input1 input2;
|
||||
};
|
||||
|
||||
|
|
|
@ -3,5 +3,5 @@ derivation {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" ./gc-runtime.builder.sh];
|
||||
PATH = "@coreutils@";
|
||||
PATH = "@testPath@";
|
||||
}
|
||||
|
|
|
@ -4,14 +4,14 @@ let {
|
|||
name = "dependencies-input-1";
|
||||
system = "i086-msdos";
|
||||
builder = "/bar/sh";
|
||||
args = ["-e" "-x" ./dependencies.builder1.sh];
|
||||
args = ["-e" "-x" ./dummy];
|
||||
};
|
||||
|
||||
input2 = derivation {
|
||||
name = "dependencies-input-2";
|
||||
system = "i086-msdos";
|
||||
builder = "/bar/sh";
|
||||
args = ["-e" "-x" ./dependencies.builder2.sh];
|
||||
args = ["-e" "-x" ./dummy];
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "md5";
|
||||
outputHash = "ffffffffffffffffffffffffffffffff";
|
||||
|
@ -21,7 +21,7 @@ let {
|
|||
name = "dependencies";
|
||||
system = "i086-msdos";
|
||||
builder = "/bar/sh";
|
||||
args = ["-e" "-x" (./dependencies.builder0.sh + "/FOOBAR/../.")];
|
||||
args = ["-e" "-x" (./dummy + "/FOOBAR/../.")];
|
||||
input1 = input1 + "/.";
|
||||
inherit input2;
|
||||
};
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
export PATH=/bin:/usr/bin:$PATH
|
||||
|
||||
sleep 3
|
||||
|
||||
touch $out
|
||||
|
|
|
@ -5,6 +5,7 @@ let {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" ./locking.builder.sh];
|
||||
PATH = "@testPath@";
|
||||
inherit text inputs;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
echo "DOING $text"
|
||||
|
||||
|
||||
export PATH=/bin:/usr/bin:$PATH
|
||||
|
||||
|
||||
# increase counter
|
||||
while ! ln -s x $shared.lock; do
|
||||
sleep 1
|
||||
|
|
|
@ -5,6 +5,7 @@ let {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" ./parallel.builder.sh];
|
||||
PATH = "@testPath@";
|
||||
shared = "@extra1@";
|
||||
inherit text inputs;
|
||||
};
|
||||
|
|
|
@ -4,7 +4,7 @@ echo "PATH=$PATH"
|
|||
if mkdir foo; then exit 1; fi
|
||||
|
||||
# Set a PATH (!!! impure).
|
||||
export PATH=/bin:/usr/bin:$PATH
|
||||
export PATH=$goodPath
|
||||
|
||||
mkdir $out
|
||||
|
||||
|
|
|
@ -3,4 +3,5 @@ derivation {
|
|||
system = "@system@";
|
||||
builder = "@shell@";
|
||||
args = ["-e" "-x" ./simple.builder.sh];
|
||||
goodPath = "@testPath@";
|
||||
}
|
|
@ -18,6 +18,6 @@ if test "$text" != "Hello World!"; then exit 1; fi
|
|||
$nixstore --delete $outPath
|
||||
if test -e $outPath/hello; then false; fi
|
||||
|
||||
if test "$(NIX_STORE_DIR=/foo $nixinstantiate --readonly-mode hash-check.nix)" != "/foo/4hgkkq63lp8x5kmh9cmsyqimq5v42zzl-dependencies.drv"; then
|
||||
if test "$(NIX_STORE_DIR=/foo $nixinstantiate --readonly-mode hash-check.nix)" != "/foo/bbfambd3ksry4ylik1772pn2qyw1k296-dependencies.drv"; then
|
||||
echo "hashDerivationModulo appears broken"
|
||||
fi
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
export PATH=/bin:/usr/bin:$PATH
|
||||
|
||||
mkdir $out
|
||||
mkdir $out/bin
|
||||
echo "#! $shell" > $out/bin/$progName
|
||||
|
|
|
@ -12,6 +12,7 @@ let {
|
|||
builder = "@shell@";
|
||||
shell = "@shell@";
|
||||
args = ["-e" "-x" ./user-envs.builder.sh];
|
||||
PATH = "@testPath@";
|
||||
} // {
|
||||
meta = {
|
||||
description = "A silly test package";
|
||||
|
|
Loading…
Reference in a new issue