Fix gating tests
This commit is contained in:
parent
04960e2a1e
commit
c8a7f0ad3e
@ -1223,10 +1223,10 @@ def main():
|
||||
cache_clean(args)
|
||||
|
||||
if not TC.tend():
|
||||
print "FAIL: test failed"
|
||||
print("FAIL: test failed")
|
||||
sys.exit(1)
|
||||
|
||||
print "PASS: Test pass"
|
||||
print("PASS: Test pass")
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
|
@ -23,6 +23,9 @@ import sys, os
|
||||
import subprocess
|
||||
import time
|
||||
import fileinput
|
||||
# TODO: Is this really necessary? Unlikely we will run into python2 in rawhide
|
||||
# again...
|
||||
from __future__ import print_function
|
||||
|
||||
|
||||
def _print(string):
|
||||
@ -1042,7 +1045,7 @@ class LoopDev:
|
||||
_print("WARN: Could not create loop device image file")
|
||||
return ret_fail
|
||||
except OSError as e:
|
||||
print >> sys.err, "command failed: ", e
|
||||
print("command failed: ", e, file=sys.err)
|
||||
return ret_fail
|
||||
|
||||
loop_path = self._get_loop_path(name)
|
||||
@ -1125,7 +1128,7 @@ class LoopDev:
|
||||
name = self._standardize_name(name)
|
||||
|
||||
# Just try to detach if device is connected, otherwise ignore
|
||||
# print "INFO: Checking if ", loop_path, " exists, to be detached"
|
||||
# print("INFO: Checking if ", loop_path, " exists, to be detached")
|
||||
dev_path = self._get_loop_path(name)
|
||||
if dev_path in devs:
|
||||
cmd = "losetup -d %s" % dev_path
|
||||
@ -1514,7 +1517,7 @@ class DMPD:
|
||||
_print("WARN: Could not create file to %s metadata to." % command_message)
|
||||
return False
|
||||
except OSError as e:
|
||||
print >> sys.err, "command failed: ", e
|
||||
print("command failed: ", e, file=sys.err)
|
||||
return False
|
||||
return True
|
||||
|
||||
|
@ -20,13 +20,13 @@ import sys
|
||||
import re
|
||||
|
||||
def run(cmd):
|
||||
print "INFO: Running '%s'..." % cmd
|
||||
print("INFO: Running '%s'..." % cmd)
|
||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
||||
stdout, stderr = p.communicate()
|
||||
|
||||
retcode = p.returncode
|
||||
output = stdout + stderr
|
||||
print output
|
||||
print(output)
|
||||
return retcode, output
|
||||
|
||||
def start_test():
|
||||
@ -54,7 +54,7 @@ def start_test():
|
||||
continue
|
||||
tool_error = 0
|
||||
for lib_path in lib_paths:
|
||||
print "INFO: Checking if %s is not linked to libraries at %s" % (tool, lib_path)
|
||||
print("INFO: Checking if %s is not linked to libraries at %s" % (tool, lib_path))
|
||||
ret, linked_lib = run("ldd %s" % tool)
|
||||
if ret != 0:
|
||||
print("FAIL: Could not list dynamically libraries for %s" % (tool))
|
||||
@ -83,10 +83,10 @@ def start_test():
|
||||
def main():
|
||||
|
||||
if not start_test():
|
||||
print "FAIL: test failed"
|
||||
print("FAIL: test failed")
|
||||
sys.exit(1)
|
||||
|
||||
print "PASS: Test pass"
|
||||
print("PASS: Test pass")
|
||||
sys.exit(0)
|
||||
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user