summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/contrib/tts/toasteruitest/run_toastertests.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-09 14:05:09 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-11 10:34:30 +0100
commit3795f4d6a69dc4ba5208f1d05b89e65bc11d8a10 (patch)
tree363978673f3e06a03bc2f4a3cb629dd5011cf40a /bitbake/lib/toaster/contrib/tts/toasteruitest/run_toastertests.py
parenta9d90f74050e2129171da09ca3427720887f67ee (diff)
downloadpoky-3795f4d6a69dc4ba5208f1d05b89e65bc11d8a10.tar.gz
bitbake: bin, toaster: Fix print and exception syntax
This updates the print "" syntax to print() and fixes some exception handling syntax such that its compatible with python v2 and v3. (Bitbake rev: 58304fcce9727fd89564436771356c033ecd22a3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/contrib/tts/toasteruitest/run_toastertests.py')
-rwxr-xr-xbitbake/lib/toaster/contrib/tts/toasteruitest/run_toastertests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/contrib/tts/toasteruitest/run_toastertests.py b/bitbake/lib/toaster/contrib/tts/toasteruitest/run_toastertests.py
index 754636f0fa..8ca45a8136 100755
--- a/bitbake/lib/toaster/contrib/tts/toasteruitest/run_toastertests.py
+++ b/bitbake/lib/toaster/contrib/tts/toasteruitest/run_toastertests.py
@@ -74,7 +74,7 @@ def get_tests_from_cfg(suite=None):
74 try: 74 try:
75 tests_from_cfg = eval(config.get('toaster_test_' + target_suite, 'test_cases')) 75 tests_from_cfg = eval(config.get('toaster_test_' + target_suite, 'test_cases'))
76 except: 76 except:
77 print 'Failed to get test cases from cfg file. Make sure the format is correct.' 77 print('Failed to get test cases from cfg file. Make sure the format is correct.')
78 return None 78 return None
79 79
80 prefix = 'toaster_automation_test.toaster_cases.test_' 80 prefix = 'toaster_automation_test.toaster_cases.test_'
@@ -100,7 +100,7 @@ def main():
100 testslist = get_tests_from_cfg() 100 testslist = get_tests_from_cfg()
101 101
102 if not testslist: 102 if not testslist:
103 print 'Failed to get test cases.' 103 print('Failed to get test cases.')
104 exit(1) 104 exit(1)
105 105
106 suite = unittest.TestSuite() 106 suite = unittest.TestSuite()