[tools] Retain python2 compatibility with divisions in test runner

Bug: v8:9871
Change-Id: Ib2042002c1eba72b81fcd15811a627b13e7e3281
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1866770
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64408}
This commit is contained in:
Michael Achenbach 2019-10-17 16:12:45 +02:00 committed by Commit Bot
parent d7793c0684
commit 09d4a426ba
2 changed files with 3 additions and 3 deletions

View File

@ -205,7 +205,7 @@ class GcIntervalAnalyzer(Analyzer):
class GcIntervalFuzzer(Fuzzer): class GcIntervalFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value): def create_flags_generator(self, rng, test, analysis_value):
if analysis_value: if analysis_value:
value = analysis_value / 10 value = analysis_value // 10
else: else:
value = 10000 value = 10000
while True: while True:
@ -260,7 +260,7 @@ class DeoptFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value): def create_flags_generator(self, rng, test, analysis_value):
while True: while True:
if analysis_value: if analysis_value:
value = analysis_value / 2 value = analysis_value // 2
else: else:
value = 10000 value = 10000
interval = rng.randint(self._min, max(value, self._min)) interval = rng.randint(self._min, max(value, self._min))

View File

@ -268,7 +268,7 @@ class CompactProgressIndicator(ProgressIndicator):
'progress': progress, 'progress': progress,
'failed': self._failed, 'failed': self._failed,
'test': name, 'test': name,
'mins': int(elapsed) / 60, 'mins': int(elapsed) // 60,
'secs': int(elapsed) % 60 'secs': int(elapsed) % 60
} }
status = self._truncate(status, 78) status = self._truncate(status, 78)