diff options
author | Craig Tiller <ctiller@google.com> | 2017-09-07 13:47:45 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-09-07 13:47:45 -0700 |
commit | 0b86d03611204ef3b4f445c489eb4d8f041f6479 (patch) | |
tree | 71671f92e11ae77a0f6c7cce9753a6989403fcd7 | |
parent | 9992bdb74ec2a39b7d8cd867ee4f3b3f96d151bb (diff) |
Better variable name
-rwxr-xr-x | tools/run_tests/run_tests.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 6bb61c0b70..8b3c629d5f 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -144,9 +144,9 @@ class Config(object): if not flaky and shortname and shortname in flaky_tests: print('Setting %s to flaky' % shortname) flaky = True - if shortname in test_times: - print('Update CPU cost for %s: %f -> %f' % (shortname, cpu_cost, test_times[shortname])) - cpu_cost = test_times[shortname] + if shortname in shortname_to_cpu: + print('Update CPU cost for %s: %f -> %f' % (shortname, cpu_cost, shortname_to_cpu[shortname])) + cpu_cost = shortname_to_cpu[shortname] return jobset.JobSpec(cmdline=self.tool_prefix + cmdline, shortname=shortname, environ=actual_environ, @@ -1260,12 +1260,12 @@ argp.add_argument('--disable_auto_set_flakes', default=False, const=True, action args = argp.parse_args() flaky_tests = set() -test_times = {} +shortname_to_cpu = {} if not args.disable_auto_set_flakes: try: for test in get_bqtest_data(): if test.flaky: flaky_tests.add(test.name) - if test.cpu > 0: test_times[test.name] = test.cpu + if test.cpu > 0: shortname_to_cpu[test.name] = test.cpu except: print("Unexpected error getting flaky tests:", sys.exc_info()[0]) |