Fix bad line breaks
During the conversion of the kvm_runtest_2 to the kvm test, some
bad line breaks were introduced. Started using parenthesis
implicit line continuation instead of backslash continuation in
assignments that were using it.
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3254 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/tests/kvm/kvm_guest_wizard.py b/client/tests/kvm/kvm_guest_wizard.py
index 01aeb97..2dd9be5 100644
--- a/client/tests/kvm/kvm_guest_wizard.py
+++ b/client/tests/kvm/kvm_guest_wizard.py
@@ -105,8 +105,8 @@
time.sleep(sleep_duration)
# Failure
- message = "Barrier failed at step %s after %.2f seconds (%s)" % \
- (current_step_num, time.time() - start_time, failure_message)
+ message = ("Barrier failed at step %s after %.2f seconds (%s)" %
+ (current_step_num, time.time() - start_time, failure_message))
# What should we do with this failure?
if words[-1] == "optional":
@@ -201,9 +201,9 @@
logging.error("Variable not defined: %s" % words[1])
elif words[0] == "barrier_2":
if current_screendump:
- scrdump_filename = \
+ scrdump_filename = (
os.path.join(ppm_utils.get_data_dir(steps_filename),
- current_screendump)
+ current_screendump))
else:
scrdump_filename = None
if not barrier_2(vm, words, fail_if_stuck_for,
diff --git a/client/tests/kvm/kvm_tests.py b/client/tests/kvm/kvm_tests.py
index cccc48e..54d2a7a 100644
--- a/client/tests/kvm/kvm_tests.py
+++ b/client/tests/kvm/kvm_tests.py
@@ -321,8 +321,8 @@
status_fail = False
if result_list == []:
status_fail = True
- message_fail = "Test '%s' did not produce any recognizable"
- " results" % test_name
+ message_fail = ("Test '%s' did not produce any recognizable "
+ "results" % test_name)
for result in result_list:
logging.info(str(result))
if result[1] == "FAIL":
diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py
index 90de88f..e751150 100644
--- a/client/tests/kvm/kvm_utils.py
+++ b/client/tests/kvm/kvm_utils.py
@@ -753,8 +753,8 @@
@return: True on success and False on failure.
"""
- command = "scp -o UserKnownHostsFile=/dev/null -r -P %s %s %s@%s:%s" % \
- (port, local_path, username, host, remote_path)
+ command = ("scp -o UserKnownHostsFile=/dev/null -r -P %s %s %s@%s:%s" %
+ (port, local_path, username, host, remote_path))
return remote_scp(command, password, timeout)
@@ -773,8 +773,8 @@
@return: True on success and False on failure.
"""
- command = "scp -o UserKnownHostsFile=/dev/null -r -P %s %s@%s:%s %s" % \
- (port, username, host, remote_path, local_path)
+ command = ("scp -o UserKnownHostsFile=/dev/null -r -P %s %s@%s:%s %s" %
+ (port, username, host, remote_path, local_path))
return remote_scp(command, password, timeout)
@@ -790,8 +790,8 @@
@return: kvm_spawn object on success and None on failure.
"""
- command = "ssh -o UserKnownHostsFile=/dev/null -p %s %s@%s" % \
- (port, username, host)
+ command = ("ssh -o UserKnownHostsFile=/dev/null -p %s %s@%s" %
+ (port, username, host))
return remote_login(command, password, prompt, "\n", timeout)
diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index d7b0735..32ccf3b 100644
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -118,8 +118,8 @@
# Find available monitor filename
while True:
# The monitor filename should be unique
- self.instance = time.strftime("%Y%m%d-%H%M%S-") + \
- kvm_utils.generate_random_string(4)
+ self.instance = (time.strftime("%Y%m%d-%H%M%S-") +
+ kvm_utils.generate_random_string(4))
self.monitor_file_name = os.path.join("/tmp",
"monitor-" + self.instance)
if not os.path.exists(self.monitor_file_name):
diff --git a/client/tests/kvm/make_html_report.py b/client/tests/kvm/make_html_report.py
index e69367b..2c6bcc0 100755
--- a/client/tests/kvm/make_html_report.py
+++ b/client/tests/kvm/make_html_report.py
@@ -1443,10 +1443,8 @@
stat_str = 'No test cases executed'
if total_executed>0:
failed_perct = int(float(total_failed)/float(total_executed)*100)
- stat_str = 'From %d tests executed, '
- '%d have passed (%d%s)' % (total_executed, total_passed,failed_perct,
- '% failures')
-
+ stat_str = ('From %d tests executed, %d have passed (%d%% failures)' %
+ (total_executed, total_passed, failed_perct))
kvm_ver_str = metadata['kvmver']