diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-15 10:23:25 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-16 08:13:11 +0100 |
commit | ca2edae7c3585204a11f6d9d69351d37880bf761 (patch) | |
tree | 4324fe3bac47a19bae2f4a178d5da9279d251f66 /meta/lib/oeqa/selftest | |
parent | 52b3cc90667d692f9c69816146349261a38c3a69 (diff) | |
download | poky-ca2edae7c3585204a11f6d9d69351d37880bf761.tar.gz |
oeqa: Print function python3 fixes
Use print functions for comptibility with python3.
(From OE-Core rev: 0c89a8a276b67a9292ee3100003c789126bd9ea9)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest')
-rwxr-xr-x | meta/lib/oeqa/selftest/esdk_prepare.py | 8 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/sstatetests.py | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/meta/lib/oeqa/selftest/esdk_prepare.py b/meta/lib/oeqa/selftest/esdk_prepare.py index 1b36a0d682..406089787d 100755 --- a/meta/lib/oeqa/selftest/esdk_prepare.py +++ b/meta/lib/oeqa/selftest/esdk_prepare.py | |||
@@ -28,8 +28,8 @@ class ExtSdkPrepareTest(unittest.TestCase): | |||
28 | # load module under test | 28 | # load module under test |
29 | self.test_mod = imp.load_source("", module_dest_path) | 29 | self.test_mod = imp.load_source("", module_dest_path) |
30 | except: | 30 | except: |
31 | print "error: unable to copy or load %s [src: %s, dst: %s]" % \ | 31 | print("error: unable to copy or load %s [src: %s, dst: %s]" % \ |
32 | (module_file_name, module_path, module_dest_path) | 32 | (module_file_name, module_path, module_dest_path)) |
33 | sys.exit(1) | 33 | sys.exit(1) |
34 | 34 | ||
35 | def test_prepare_unexpected(self): | 35 | def test_prepare_unexpected(self): |
@@ -66,8 +66,8 @@ if __name__ == '__main__': | |||
66 | unittest.TextTestRunner().run(suite) | 66 | unittest.TextTestRunner().run(suite) |
67 | else: | 67 | else: |
68 | progname = os.path.basename(sys.argv[0]) | 68 | progname = os.path.basename(sys.argv[0]) |
69 | print "%s: missing directory path" % progname | 69 | print("%s: missing directory path" % progname) |
70 | print "usage: %s /path/to/directory-of(ext-sdk-prepare.py)" % progname | 70 | print("usage: %s /path/to/directory-of(ext-sdk-prepare.py)" % progname) |
71 | sys.exit(1) | 71 | sys.exit(1) |
72 | else: | 72 | else: |
73 | # running under oe-selftest | 73 | # running under oe-selftest |
diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py index ad591469d3..a1e5d33580 100644 --- a/meta/lib/oeqa/selftest/sstatetests.py +++ b/meta/lib/oeqa/selftest/sstatetests.py | |||
@@ -454,14 +454,14 @@ http_proxy = "http://example.com/" | |||
454 | 454 | ||
455 | for k in files1.viewkeys() | files2.viewkeys(): | 455 | for k in files1.viewkeys() | files2.viewkeys(): |
456 | if k in files1 and k in files2: | 456 | if k in files1 and k in files2: |
457 | print "%s differs:" % k | 457 | print("%s differs:" % k) |
458 | print subprocess.check_output(("bitbake-diffsigs", | 458 | print(subprocess.check_output(("bitbake-diffsigs", |
459 | topdir + "/tmp-sstatesamehash/stamps/" + k + "." + files1[k], | 459 | topdir + "/tmp-sstatesamehash/stamps/" + k + "." + files1[k], |
460 | topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + files2[k])) | 460 | topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + files2[k]))) |
461 | elif k in files1 and k not in files2: | 461 | elif k in files1 and k not in files2: |
462 | print "%s in files1" % k | 462 | print("%s in files1" % k) |
463 | elif k not in files1 and k in files2: | 463 | elif k not in files1 and k in files2: |
464 | print "%s in files2" % k | 464 | print("%s in files2" % k) |
465 | else: | 465 | else: |
466 | assert "shouldn't reach here" | 466 | assert "shouldn't reach here" |
467 | self.fail("sstate hashes not identical.") | 467 | self.fail("sstate hashes not identical.") |