forked from lix-project/lix
Merge pull request #82 from tweag/failing-test
Add a couple of currently failing tests
This commit is contained in:
commit
74389370c6
1 changed files with 26 additions and 0 deletions
|
@ -59,6 +59,25 @@ EOF
|
|||
git -C $flake2 add flake.nix
|
||||
git -C $flake2 commit -m 'Initial'
|
||||
|
||||
cat > $flake3/flake.nix <<EOF
|
||||
{
|
||||
name = "flake3";
|
||||
|
||||
epoch = 2019;
|
||||
|
||||
requires = [ "flake2" ];
|
||||
|
||||
description = "Fnord";
|
||||
|
||||
provides = deps: rec {
|
||||
packages.xyzzy = deps.flake2.provides.packages.bar;
|
||||
};
|
||||
}
|
||||
EOF
|
||||
|
||||
git -C $flake3 add flake.nix
|
||||
git -C $flake3 commit -m 'Initial'
|
||||
|
||||
cat > $registry <<EOF
|
||||
{
|
||||
"flakes": {
|
||||
|
@ -110,8 +129,15 @@ nix build -o $TEST_ROOT/result --flake-registry $registry $flake2:bar
|
|||
[[ -e $flake2/flake.lock ]]
|
||||
git -C $flake2 commit flake.lock -m 'Add flake.lock'
|
||||
|
||||
# Rerunning the build should not change the lockfile.
|
||||
nix build -o $TEST_ROOT/result --flake-registry $registry $flake2:bar
|
||||
[[ -z $(git -C $flake2 diff) ]]
|
||||
|
||||
# Now we should be able to build the flake in pure mode.
|
||||
nix build -o $TEST_ROOT/result --flake-registry $registry flake2:bar
|
||||
|
||||
# Or without a registry.
|
||||
nix build -o $TEST_ROOT/result file://$flake2:bar
|
||||
|
||||
# Test whether indirect dependencies work.
|
||||
nix build -o $TEST_ROOT/result --flake-registry $registry $flake3:xyzzy
|
||||
|
|
Loading…
Reference in a new issue