summaryrefslogtreecommitdiff
path: root/meta/lib/oeqa/runtime
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-21 12:25:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-21 22:26:25 +0100
commitced1995694c394d92cb82fb9c25a33dc027a3b69 (patch)
tree62b8b8e2d79afc893f1a09b076811d49930e80bf /meta/lib/oeqa/runtime
parent7a4c9c96fee4fb514c2b69b52e811c4f896a16f1 (diff)
downloadopenembedded-core-ced1995694c394d92cb82fb9c25a33dc027a3b69.tar.gz
openembedded-core-ced1995694c394d92cb82fb9c25a33dc027a3b69.tar.bz2
openembedded-core-ced1995694c394d92cb82fb9c25a33dc027a3b69.zip
meta/selftest/scripts: Use print function for python3 compatibility
Used print function instead of print statement to make the code work in python 3. [Changes from both Ed and Richard] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r--meta/lib/oeqa/runtime/files/test.py2
-rw-r--r--meta/lib/oeqa/runtime/systemd.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/meta/lib/oeqa/runtime/files/test.py b/meta/lib/oeqa/runtime/files/test.py
index f3a2273c52..f389225d72 100644
--- a/meta/lib/oeqa/runtime/files/test.py
+++ b/meta/lib/oeqa/runtime/files/test.py
@@ -3,4 +3,4 @@ import os
os.system('touch /tmp/testfile.python')
a = 9.01e+21 - 9.01e+21 + 0.01
-print "the value of a is %s" % a
+print("the value of a is %s" % a)
diff --git a/meta/lib/oeqa/runtime/systemd.py b/meta/lib/oeqa/runtime/systemd.py
index 2b2f10d71c..a96efa28dc 100644
--- a/meta/lib/oeqa/runtime/systemd.py
+++ b/meta/lib/oeqa/runtime/systemd.py
@@ -153,7 +153,7 @@ class SystemdJournalTests(SystemdTest):
if check_match: break
# put the startup time in the test log
if check_match:
- print "%s" % check_match
+ print("%s" % check_match)
else:
self.skipTest("Error at obtaining the boot time from journalctl")
boot_time_sec = 0
@@ -174,5 +174,5 @@ class SystemdJournalTests(SystemdTest):
self.skipTest("Error when parsing time from boot string")
#Assert the target boot time against systemd's unit start timeout
if boot_time_sec > systemd_TimeoutStartSec:
- print "Target boot time %s exceeds systemd's TimeoutStartSec %s"\
- %(boot_time_sec, systemd_TimeoutStartSec)
+ print("Target boot time %s exceeds systemd's TimeoutStartSec %s"\
+ %(boot_time_sec, systemd_TimeoutStartSec))