[Testing] Python 3 conversion on Testing folder
Seeing failures from calibration waterfall (and fixed by crrev.com/c/3199782). Adding more conversion on the other files in the same folder.
Bug: chromium:1252452
Change-Id: I58a25872c8d997f0714a769fbf0d1bd79d6fb8d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3202582
Commit-Queue: Wenbin Zhang <[email protected]>
Reviewed-by: John Chen <[email protected]>
Cr-Commit-Position: refs/heads/main@{#927976}
diff --git a/testing/xvfb_test_script.py b/testing/xvfb_test_script.py
index 8a5b17cd..52dfead 100755
--- a/testing/xvfb_test_script.py
+++ b/testing/xvfb_test_script.py
@@ -9,6 +9,8 @@
to read and compare with expected output.
"""
+from __future__ import print_function
+
import os
import signal
import sys
@@ -16,7 +18,7 @@
def print_signal(sig, *_):
- print 'Signal :{}'.format(sig)
+ print('Signal :{}'.format(sig))
if __name__ == '__main__':
@@ -24,7 +26,7 @@
signal.signal(signal.SIGINT, print_signal)
# test the subprocess display number.
- print 'Display :{}'.format(os.environ.get('DISPLAY', 'None'))
+ print('Display :{}'.format(os.environ.get('DISPLAY', 'None')))
if len(sys.argv) > 1 and sys.argv[1] == '--sleep':
time.sleep(2) # gives process time to receive signal.