* Purify `make check'.

This commit is contained in:
Eelco Dolstra 2006-07-21 13:21:43 +00:00
parent 7adaa6d446
commit 9c3099d328
26 changed files with 28 additions and 29 deletions

View File

@ -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

View File

@ -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;
};

View File

@ -1,5 +1,3 @@
export PATH=/bin:/usr/bin:$PATH
mkdir $out
echo $(cat $input1/foo)$(cat $input2/bar) > $out/foobar

View File

@ -1,4 +1,2 @@
export PATH=/bin:/usr/bin:$PATH
mkdir $out
echo FOO > $out/foo

View File

@ -1,4 +1,2 @@
export PATH=/bin:/usr/bin:$PATH
mkdir $out
echo BAR > $out/bar

View File

@ -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
View File

@ -0,0 +1 @@
Hello World

View File

@ -3,4 +3,5 @@ derivation {
system = "@system@";
builder = "@shell@";
args = ["-e" "-x" ./simple.builder.sh];
}
goodPath = "@testPath@";
}

View File

@ -1,3 +1 @@
export PATH=/bin:/usr/bin:$PATH
echo "Hello World!" > $out

View File

@ -1,5 +1,3 @@
export PATH=/bin:/usr/bin:$PATH
mkdir $out
mkdir $out/bla
echo "Hello World!" > $out/foo

View File

@ -8,6 +8,7 @@ rec {
outputHashMode = mode;
outputHashAlgo = algo;
outputHash = hash;
PATH = "@testPath@";
};
good = [

View File

@ -1,5 +1,3 @@
export PATH=/bin:/usr/bin:$PATH
mkdir $out
echo $(cat $input1/foo)$(cat $input2/bar) > $out/foobar

View File

@ -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;
};

View File

@ -1,5 +1,3 @@
export PATH=/bin:/usr/bin:$PATH
mkdir $out
echo $(cat $input1/foo)$(cat $input2/bar)xyzzy > $out/foobar

View File

@ -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;
};

View File

@ -3,5 +3,5 @@ derivation {
system = "@system@";
builder = "@shell@";
args = ["-e" "-x" ./gc-runtime.builder.sh];
PATH = "@coreutils@";
PATH = "@testPath@";
}

View File

@ -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;
};

View File

@ -1,5 +1,3 @@
export PATH=/bin:/usr/bin:$PATH
sleep 3
touch $out

View File

@ -5,6 +5,7 @@ let {
system = "@system@";
builder = "@shell@";
args = ["-e" "-x" ./locking.builder.sh];
PATH = "@testPath@";
inherit text inputs;
};

View File

@ -1,9 +1,6 @@
echo "DOING $text"
export PATH=/bin:/usr/bin:$PATH
# increase counter
while ! ln -s x $shared.lock; do
sleep 1

View File

@ -5,6 +5,7 @@ let {
system = "@system@";
builder = "@shell@";
args = ["-e" "-x" ./parallel.builder.sh];
PATH = "@testPath@";
shared = "@extra1@";
inherit text inputs;
};

View File

@ -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

View File

@ -3,4 +3,5 @@ derivation {
system = "@system@";
builder = "@shell@";
args = ["-e" "-x" ./simple.builder.sh];
}
goodPath = "@testPath@";
}

View File

@ -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

View File

@ -1,5 +1,3 @@
export PATH=/bin:/usr/bin:$PATH
mkdir $out
mkdir $out/bin
echo "#! $shell" > $out/bin/$progName

View File

@ -12,6 +12,7 @@ let {
builder = "@shell@";
shell = "@shell@";
args = ["-e" "-x" ./user-envs.builder.sh];
PATH = "@testPath@";
} // {
meta = {
description = "A silly test package";