about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/binary-patching.nix2
-rw-r--r--tests/binary-patching.sh6
2 files changed, 7 insertions, 1 deletions
diff --git a/tests/binary-patching.nix b/tests/binary-patching.nix
index 781bd76eba60..afa0a0fb3f84 100644
--- a/tests/binary-patching.nix
+++ b/tests/binary-patching.nix
@@ -9,7 +9,7 @@ mkDerivation {
       mkdir $out
       seq 1 1000000 > $out/foo
       ${if version == 2 then ''
-        echo bla >> $out/foo
+        seq 1000000 1010000 >> $out/foo
       '' else ""}
     '';
 }
diff --git a/tests/binary-patching.sh b/tests/binary-patching.sh
index 8d7788fb614f..26a499727fae 100644
--- a/tests/binary-patching.sh
+++ b/tests/binary-patching.sh
@@ -1,5 +1,7 @@
 source common.sh
 
+clearManifests
+
 mkdir -p $TEST_ROOT/cache2 $TEST_ROOT/patches
 
 RESULT=$TEST_ROOT/result
@@ -29,5 +31,9 @@ $NIX_BIN_DIR/nix-pull file://$TEST_ROOT/manifest2
 # To make sure that we're using the patch, delete the full NARs.
 rm -f $TEST_ROOT/cache2/*
 
+# Make sure that the download size prediction uses the patch rather
+# than the full download.
+$nixbuild -o $RESULT binary-patching.nix --arg version 2 --dry-run 2>&1 | grep -q "0.01 MiB"
+
 # Now rebuild it.  This should use the patch generated above.
 $nixbuild -o $RESULT binary-patching.nix --arg version 2