fix full_test.py syntax for python3 Change-Id: Id0d14e6f81134958d5ed29b9f06df0c04603ab35 Reviewed-on: https://gn-review.googlesource.com/c/gn/+/13402 Reviewed-by: Brett Wilson <brettw@chromium.org> Commit-Queue: Takuto Ikuta <tikuta@google.com>
diff --git a/build/full_test.py b/build/full_test.py index 46ba2de..79b4ac4 100755 --- a/build/full_test.py +++ b/build/full_test.py
@@ -33,7 +33,7 @@ def main(): if len(sys.argv) < 3 or len(sys.argv) > 4: - print 'Usage: full_test.py /chrome/tree/at/762a25542878 rel_gn_path [clean]' + print('Usage: full_test.py /chrome/tree/at/762a25542878 rel_gn_path [clean]') return 1 if len(sys.argv) == 4: @@ -57,7 +57,7 @@ # First, do a comparison to make sure the output between the two gn binaries # actually matches. - print 'Confirming output matches...' + print('Confirming output matches...') dir_a = os.path.join('out', 'a') dir_b = os.path.join('out', 'b') Trial(in_chrome_tree_gn, dir_a) @@ -66,13 +66,13 @@ # Then, some time trials. TRIALS = 5 - print 'Comparing performance... (takes a while)' + print('Comparing performance... (takes a while)') time_a = timeit.timeit('Trial("%s")' % in_chrome_tree_gn, number=TRIALS, setup='from __main__ import Trial') time_b = timeit.timeit('Trial("%s")' % our_gn, number=TRIALS, setup='from __main__ import Trial') - print 'In-tree gn avg: %.3fs' % (time_a / TRIALS) - print 'Our gn avg: %.3fs' % (time_b / TRIALS) + print('In-tree gn avg: %.3fs' % (time_a / TRIALS)) + print('Our gn avg: %.3fs' % (time_b / TRIALS)) return 0