]> arthur.barton.de Git - bup.git/commitdiff
test-sparse-files: accommodate python 3 and test there
authorRob Browning <rlb@defaultvalue.org>
Wed, 1 Jan 2020 20:33:35 +0000 (14:33 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sun, 2 Feb 2020 19:30:12 +0000 (13:30 -0600)
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Makefile
t/test-sparse-files.sh

index 4a9204973a2e5d910473c43c60e6e6196af52f02..ed792848dd86bd792b4c3e8cd4071f75ea15a9ce 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -180,6 +180,7 @@ cmdline_tests := \
   t/test-ls-remote \
   t/test-meta.sh \
   t/test-packsizelimit \
+  t/test-sparse-files.sh \
   t/test-split-join.sh \
   t/test-tz.sh
 
@@ -200,7 +201,6 @@ ifeq "2" "$(bup_python_majver)"
     t/test-restore-single-file.sh \
     t/test-rm-between-index-and-save.sh \
     t/test-save-with-valid-parent.sh \
-    t/test-sparse-files.sh \
     t/test-redundant-saves.sh \
     t/test-save-creates-no-unrefs.sh \
     t/test-save-restore-excludes.sh \
index 40d25d02696659988625270b87ac746da27eb78a..fdbfa4bc210d5e75fd480ba14f4ada355808778e 100755 (executable)
@@ -19,7 +19,7 @@ WVPASS cd "$tmpdir"
 # The 3MB guess is semi-arbitrary, but we've been informed that
 # Lustre, for example, uses 1MB, so guess higher than that, at least.
 block_size=$(bup-python -c \
-  "import os; print getattr(os.stat('.'), 'st_blksize', 0) or $mb * 3") \
+  "import os; print(getattr(os.stat('.'), 'st_blksize', 0)) or $mb * 3") \
     || exit $?
 data_size=$((block_size * 10))
 readonly block_size data_size