diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-21 12:25:02 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-21 22:26:32 +0100 |
| commit | ffe9604be2556b8b5c3f98bcc5283b00bf0c0dab (patch) | |
| tree | 67685ecaeb22f93d6a78f707b69170b0bbd270b8 /meta/lib/oeqa | |
| parent | 02986886fc40c0fcd33359a279ba9520fd5cac2a (diff) | |
| download | poky-ffe9604be2556b8b5c3f98bcc5283b00bf0c0dab.tar.gz | |
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]
(From OE-Core rev: ced1995694c394d92cb82fb9c25a33dc027a3b69)
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')
| -rw-r--r-- | meta/lib/oeqa/runtime/files/test.py | 2 | ||||
| -rw-r--r-- | meta/lib/oeqa/runtime/systemd.py | 6 | ||||
| -rw-r--r-- | meta/lib/oeqa/selftest/base.py | 2 |
3 files changed, 5 insertions, 5 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 | |||
| 3 | os.system('touch /tmp/testfile.python') | 3 | os.system('touch /tmp/testfile.python') |
| 4 | 4 | ||
| 5 | a = 9.01e+21 - 9.01e+21 + 0.01 | 5 | a = 9.01e+21 - 9.01e+21 + 0.01 |
| 6 | print "the value of a is %s" % a | 6 | 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): | |||
| 153 | if check_match: break | 153 | if check_match: break |
| 154 | # put the startup time in the test log | 154 | # put the startup time in the test log |
| 155 | if check_match: | 155 | if check_match: |
| 156 | print "%s" % check_match | 156 | print("%s" % check_match) |
| 157 | else: | 157 | else: |
| 158 | self.skipTest("Error at obtaining the boot time from journalctl") | 158 | self.skipTest("Error at obtaining the boot time from journalctl") |
| 159 | boot_time_sec = 0 | 159 | boot_time_sec = 0 |
| @@ -174,5 +174,5 @@ class SystemdJournalTests(SystemdTest): | |||
| 174 | self.skipTest("Error when parsing time from boot string") | 174 | self.skipTest("Error when parsing time from boot string") |
| 175 | #Assert the target boot time against systemd's unit start timeout | 175 | #Assert the target boot time against systemd's unit start timeout |
| 176 | if boot_time_sec > systemd_TimeoutStartSec: | 176 | if boot_time_sec > systemd_TimeoutStartSec: |
| 177 | print "Target boot time %s exceeds systemd's TimeoutStartSec %s"\ | 177 | print("Target boot time %s exceeds systemd's TimeoutStartSec %s"\ |
| 178 | %(boot_time_sec, systemd_TimeoutStartSec) | 178 | %(boot_time_sec, systemd_TimeoutStartSec)) |
diff --git a/meta/lib/oeqa/selftest/base.py b/meta/lib/oeqa/selftest/base.py index e10455edc1..b5a52fe57a 100644 --- a/meta/lib/oeqa/selftest/base.py +++ b/meta/lib/oeqa/selftest/base.py | |||
| @@ -67,7 +67,7 @@ class oeSelfTest(unittest.TestCase): | |||
| 67 | machine = custommachine | 67 | machine = custommachine |
| 68 | machine_conf = 'MACHINE ??= "%s"\n' % machine | 68 | machine_conf = 'MACHINE ??= "%s"\n' % machine |
| 69 | self.set_machine_config(machine_conf) | 69 | self.set_machine_config(machine_conf) |
| 70 | print 'MACHINE: %s' % machine | 70 | print('MACHINE: %s' % machine) |
| 71 | 71 | ||
| 72 | # tests might need their own setup | 72 | # tests might need their own setup |
| 73 | # but if they overwrite this one they have to call | 73 | # but if they overwrite this one they have to call |
