]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa: Print function python3 fixes
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 15 May 2016 09:23:25 +0000 (10:23 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 May 2016 07:12:15 +0000 (08:12 +0100)
Use print functions for comptibility with python3.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/connman.py
meta/lib/oeqa/runtime/parselogs.py
meta/lib/oeqa/selftest/esdk_prepare.py
meta/lib/oeqa/selftest/sstatetests.py

index bd9dba3bd0c6eead14c14b8addbd92153a1c5fbf..003fefe2ce1a6fc8c44173621ce9a8e7132c08c0 100644 (file)
@@ -27,5 +27,5 @@ class ConnmanTest(oeRuntimeTest):
     def test_connmand_running(self):
         (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand')
         if status != 0:
-            print self.service_status("connman")
+            print(self.service_status("connman"))
             self.fail("No connmand process running")
index dec9ebe87404b5eb7d93534a0a01531380a22638..a93660131d677292176568e1697b436b5e9b2109 100644 (file)
@@ -262,7 +262,7 @@ class ParseLogsTest(oeRuntimeTest):
         self.write_dmesg()
         log_list = self.get_local_log_list(self.log_locations)
         result = self.parse_logs(self.errors, self.ignore_errors, log_list)
-        print self.getHardwareInfo()
+        print(self.getHardwareInfo())
         errcount = 0
         for log in result:
             self.msg += "Log: "+log+"\n"
index 1b36a0d682bd6345aa0e42ad4c5e688ba5c99684..406089787d635068d3444d28e656ff8c843c58d1 100755 (executable)
@@ -28,8 +28,8 @@ class ExtSdkPrepareTest(unittest.TestCase):
             # load module under test
             self.test_mod = imp.load_source("", module_dest_path)
         except:
-            print "error: unable to copy or load %s [src: %s, dst: %s]" % \
-                    (module_file_name, module_path, module_dest_path)
+            print("error: unable to copy or load %s [src: %s, dst: %s]" % \
+                    (module_file_name, module_path, module_dest_path))
             sys.exit(1)
 
     def test_prepare_unexpected(self):
@@ -66,8 +66,8 @@ if __name__ == '__main__':
         unittest.TextTestRunner().run(suite)
     else:
         progname = os.path.basename(sys.argv[0])
-        print "%s: missing directory path" % progname
-        print "usage: %s /path/to/directory-of(ext-sdk-prepare.py)" % progname
+        print("%s: missing directory path" % progname)
+        print("usage: %s /path/to/directory-of(ext-sdk-prepare.py)" % progname)
         sys.exit(1)
 else:
     # running under oe-selftest
index ad591469d3e3f4229ce89b0d02c5fdf537e95bbf..a1e5d33580351e4711b1b910cd48e38a0c7a9977 100644 (file)
@@ -454,14 +454,14 @@ http_proxy = "http://example.com/"
 
         for k in files1.viewkeys() | files2.viewkeys():
             if k in files1 and k in files2:
-                print "%s differs:" % k
-                print subprocess.check_output(("bitbake-diffsigs",
+                print("%s differs:" % k)
+                print(subprocess.check_output(("bitbake-diffsigs",
                                                topdir + "/tmp-sstatesamehash/stamps/" + k + "." + files1[k],
-                                               topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + files2[k]))
+                                               topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + files2[k])))
             elif k in files1 and k not in files2:
-                print "%s in files1" % k
+                print("%s in files1" % k)
             elif k not in files1 and k in files2:
-                print "%s in files2" % k
+                print("%s in files2" % k)
             else:
                 assert "shouldn't reach here"
         self.fail("sstate hashes not identical.")