public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Goldish <mgoldish@redhat.com>
To: Lucas Meneghel Rodrigues <lmr@redhat.com>
Cc: kvm@vger.kernel.org, autotest@test.kernel.org
Subject: Re: [KVM-AUTOTEST PATCH 3/4] Fix bad line breaks
Date: Wed, 10 Jun 2009 08:32:46 -0400 (EDT)	[thread overview]
Message-ID: <863506656.1664711244637166016.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> (raw)
In-Reply-To: <1244565209-9132-3-git-send-email-lmr@redhat.com>

Looks fine to me.

----- Original Message -----
From: "Lucas Meneghel Rodrigues" <lmr@redhat.com>
To: autotest@test.kernel.org
Cc: kvm@vger.kernel.org, "Lucas Meneghel Rodrigues" <lmr@redhat.com>
Sent: Tuesday, June 9, 2009 7:33:28 PM (GMT+0200) Auto-Detected
Subject: [KVM-AUTOTEST PATCH 3/4] 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>
---
 client/tests/kvm/kvm_guest_wizard.py |    8 ++++----
 client/tests/kvm/kvm_tests.py        |    4 ++--
 client/tests/kvm/kvm_utils.py        |   12 ++++++------
 client/tests/kvm/kvm_vm.py           |    4 ++--
 client/tests/kvm/make_html_report.py |    6 ++----
 5 files changed, 16 insertions(+), 18 deletions(-)

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 @@ def barrier_2(vm, words, fail_if_stuck_for, stuck_detection_history,
         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 @@ def run_steps(test, params, env):
                 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 @@ def run_autotest(test, params, env):
     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 434190d..0f4c770 100644
--- a/client/tests/kvm/kvm_utils.py
+++ b/client/tests/kvm/kvm_utils.py
@@ -644,8 +644,8 @@ def scp_to_remote(host, port, username, password, local_path, remote_path,
 
     @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)
 
 
@@ -664,8 +664,8 @@ def scp_from_remote(host, port, username, password, remote_path, local_path,
 
     @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)
 
 
@@ -681,8 +681,8 @@ def ssh(host, port, username, password, prompt, timeout=10):
 
     @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 eb9717b..de21b2f 100644
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -118,8 +118,8 @@ class VM:
         # 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 6aed39e..7fb54e5 100755
--- a/client/tests/kvm/make_html_report.py
+++ b/client/tests/kvm/make_html_report.py
@@ -1442,10 +1442,8 @@ return true;
     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']
 
-- 
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2009-06-10 12:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-09 16:33 [KVM-AUTOTEST PATCH 1/4] Make all programs on kvm test use /usr/bin/python Lucas Meneghel Rodrigues
2009-06-09 16:33 ` [KVM-AUTOTEST PATCH 2/4] Make kvm_config.py to use internal/standard exeptions Lucas Meneghel Rodrigues
2009-06-09 16:33   ` [KVM-AUTOTEST PATCH 3/4] Fix bad line breaks Lucas Meneghel Rodrigues
2009-06-09 16:33     ` [KVM-AUTOTEST PATCH 4/4] Fix bad logging calls Lucas Meneghel Rodrigues
2009-06-10 12:32     ` Michael Goldish [this message]
2009-06-10 12:21   ` [Autotest] [KVM-AUTOTEST PATCH 2/4] Make kvm_config.py to use internal/standard exeptions Michael Goldish
2009-06-10 12:36     ` Michael Goldish
2009-06-09 17:00 ` [Autotest] [KVM-AUTOTEST PATCH 1/4] Make all programs on kvm test use /usr/bin/python Martin Bligh
2009-06-10  0:59   ` Lucas Meneghel Rodrigues
2009-06-10 11:01     ` Alexey Eromenko
2009-06-10 14:19       ` Martin Bligh
2009-06-15 13:35         ` Alexey Eromenko
2009-06-15 14:41           ` Lucas Meneghel Rodrigues
2009-06-15 15:58           ` Martin Bligh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=863506656.1664711244637166016.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com \
    --to=mgoldish@redhat.com \
    --cc=autotest@test.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=lmr@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox