test-restore-map-owner: accommodate python 3 and test there
authorRob Browning <rlb@defaultvalue.org>
Sat, 4 Jan 2020 18:41:34 +0000 (12:41 -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>
Makefile
t/test-restore-map-owner.sh

index 32f0a51d7f594e769610e9e26c9eae3a47977c13..3f709a545d332a0c956409afbc5933e212aa217d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -192,6 +192,7 @@ cmdline_tests := \
   t/test-packsizelimit \
   t/test-prune-older \
   t/test-redundant-saves.sh \
+  t/test-restore-map-owner.sh \
   t/test-restore-single-file.sh \
   t/test-rm.sh \
   t/test-rm-between-index-and-save.sh \
@@ -207,8 +208,7 @@ cmdline_tests := \
 
 ifeq "2" "$(bup_python_majver)"
   cmdline_tests += \
-    t/test-web.sh \
-    t/test-restore-map-owner.sh
+    t/test-web.sh
 endif
 
 tmp-target-run-test-get-%: all t/tmp
index bf9362e46dc39614e900ddf6df68875649d25d73..84f3b08a2cc145ff6eddb0b0c556f098a62e0fd1 100755 (executable)
@@ -87,10 +87,10 @@ import grp, pwd
 try:
   pwd.getpwuid(0)
   grp.getgrgid(0)
-  print 'yes'
-except KeyError, ex:
+  print('yes')
+except KeyError as ex:
   pass
-" 2>/dev/null) || exit $?
+") || exit $?
 if [ "$has_uid_gid_0" == yes ]
 then
     WVSTART "restore --map-user/group/uid/gid (zero uid/gid trumps all)"