* 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^@xsltproc\@^$(xsltproc)^g" \
-e "s^@aterm_bin\@^$(aterm_bin)^g" \ -e "s^@aterm_bin\@^$(aterm_bin)^g" \
-e "s^@version\@^$(VERSION)^g" \ -e "s^@version\@^$(VERSION)^g" \
-e "s^@testPath\@^$(coreutils):$$(dirname $$(type -P expr))^g" \
< $< > $@ || rm $@ < $< > $@ || rm $@
if test -x $<; then chmod +x $@; fi if test -x $<; then chmod +x $@; fi

View file

@ -5,6 +5,7 @@ let {
system = "@system@"; system = "@system@";
builder = "@shell@"; builder = "@shell@";
args = ["-e" "-x" ./dependencies.builder1.sh]; args = ["-e" "-x" ./dependencies.builder1.sh];
PATH = "@testPath@";
}; };
input2 = derivation { input2 = derivation {
@ -12,6 +13,7 @@ let {
system = "@system@"; system = "@system@";
builder = "@shell@"; builder = "@shell@";
args = ["-e" "-x" ./dependencies.builder2.sh]; args = ["-e" "-x" ./dependencies.builder2.sh];
PATH = "@testPath@";
}; };
body = derivation { body = derivation {
@ -19,6 +21,7 @@ let {
system = "@system@"; system = "@system@";
builder = "@shell@"; builder = "@shell@";
args = ["-e" "-x" ./dependencies.builder0.sh]; args = ["-e" "-x" ./dependencies.builder0.sh];
PATH = "@testPath@";
inherit input1 input2; inherit input1 input2;
}; };

View file

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

View file

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

View file

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

View file

@ -5,6 +5,7 @@ let {
system = "@system@"; system = "@system@";
builder = "@shell@"; builder = "@shell@";
args = ["-e" "-x" ./dependencies.builder1.sh]; args = ["-e" "-x" ./dependencies.builder1.sh];
PATH = "@testPath@";
}; };
input2 = derivation { input2 = derivation {
@ -12,6 +13,7 @@ let {
system = "@system@"; system = "@system@";
builder = "@shell@"; builder = "@shell@";
args = ["-e" "-x" ./dependencies.builder2.sh]; args = ["-e" "-x" ./dependencies.builder2.sh];
PATH = "@testPath@";
}; };
body = derivation { body = derivation {
@ -19,6 +21,7 @@ let {
system = "@system@"; system = "@system@";
builder = "@shell@"; builder = "@shell@";
args = ["-e" "-x" (./dependencies.builder0.sh + "/FOOBAR/../.")]; args = ["-e" "-x" (./dependencies.builder0.sh + "/FOOBAR/../.")];
PATH = "@testPath@";
input1 = input1 + "/."; input1 = input1 + "/.";
inherit input2; inherit input2;
}; };

1
tests/dummy Normal file
View file

@ -0,0 +1 @@
Hello World

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -5,6 +5,7 @@ let {
system = "@system@"; system = "@system@";
builder = "@shell@"; builder = "@shell@";
args = ["-e" "-x" ./dependencies.builder1.sh]; args = ["-e" "-x" ./dependencies.builder1.sh];
PATH = "@testPath@";
}; };
input2 = derivation { input2 = derivation {
@ -12,6 +13,7 @@ let {
system = "@system@"; system = "@system@";
builder = "@shell@"; builder = "@shell@";
args = ["-e" "-x" ./dependencies.builder2.sh]; args = ["-e" "-x" ./dependencies.builder2.sh];
PATH = "@testPath@";
}; };
body = derivation { body = derivation {
@ -19,6 +21,7 @@ let {
system = "@system@"; system = "@system@";
builder = "@shell@"; builder = "@shell@";
args = ["-e" "-x" ./gc-concurrent.builder.sh]; args = ["-e" "-x" ./gc-concurrent.builder.sh];
PATH = "@testPath@";
inherit input1 input2; inherit input1 input2;
}; };

View file

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

View file

@ -5,6 +5,7 @@ let {
system = "@system@"; system = "@system@";
builder = "@shell@"; builder = "@shell@";
args = ["-e" "-x" ./dependencies.builder1.sh]; args = ["-e" "-x" ./dependencies.builder1.sh];
PATH = "@testPath@";
}; };
input2 = derivation { input2 = derivation {
@ -12,6 +13,7 @@ let {
system = "@system@"; system = "@system@";
builder = "@shell@"; builder = "@shell@";
args = ["-e" "-x" ./dependencies.builder2.sh]; args = ["-e" "-x" ./dependencies.builder2.sh];
PATH = "@testPath@";
}; };
body = derivation { body = derivation {
@ -19,6 +21,7 @@ let {
system = "@system@"; system = "@system@";
builder = "@shell@"; builder = "@shell@";
args = ["-e" "-x" ./gc-concurrent2.builder.sh]; args = ["-e" "-x" ./gc-concurrent2.builder.sh];
PATH = "@testPath@";
inherit input1 input2; inherit input1 input2;
}; };

View file

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

View file

@ -4,14 +4,14 @@ let {
name = "dependencies-input-1"; name = "dependencies-input-1";
system = "i086-msdos"; system = "i086-msdos";
builder = "/bar/sh"; builder = "/bar/sh";
args = ["-e" "-x" ./dependencies.builder1.sh]; args = ["-e" "-x" ./dummy];
}; };
input2 = derivation { input2 = derivation {
name = "dependencies-input-2"; name = "dependencies-input-2";
system = "i086-msdos"; system = "i086-msdos";
builder = "/bar/sh"; builder = "/bar/sh";
args = ["-e" "-x" ./dependencies.builder2.sh]; args = ["-e" "-x" ./dummy];
outputHashMode = "recursive"; outputHashMode = "recursive";
outputHashAlgo = "md5"; outputHashAlgo = "md5";
outputHash = "ffffffffffffffffffffffffffffffff"; outputHash = "ffffffffffffffffffffffffffffffff";
@ -21,7 +21,7 @@ let {
name = "dependencies"; name = "dependencies";
system = "i086-msdos"; system = "i086-msdos";
builder = "/bar/sh"; builder = "/bar/sh";
args = ["-e" "-x" (./dependencies.builder0.sh + "/FOOBAR/../.")]; args = ["-e" "-x" (./dummy + "/FOOBAR/../.")];
input1 = input1 + "/."; input1 = input1 + "/.";
inherit input2; inherit input2;
}; };

View file

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

View file

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

View file

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

View file

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

View file

@ -4,7 +4,7 @@ echo "PATH=$PATH"
if mkdir foo; then exit 1; fi if mkdir foo; then exit 1; fi
# Set a PATH (!!! impure). # Set a PATH (!!! impure).
export PATH=/bin:/usr/bin:$PATH export PATH=$goodPath
mkdir $out mkdir $out

View file

@ -3,4 +3,5 @@ derivation {
system = "@system@"; system = "@system@";
builder = "@shell@"; builder = "@shell@";
args = ["-e" "-x" ./simple.builder.sh]; 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 $nixstore --delete $outPath
if test -e $outPath/hello; then false; fi 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" echo "hashDerivationModulo appears broken"
fi fi

View file

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

View file

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