diff options
author | Bob Haarman <inglorion@chromium.org> | 2020-09-18 22:10:25 +0000 |
---|---|---|
committer | Bob Haarman <inglorion@chromium.org> | 2020-09-25 21:40:50 +0000 |
commit | 4f7eb71f9fa78f8710e1deb57d441f51fa74af3b (patch) | |
tree | cdf32ec9d3d7232f8bc23690c28293799635afeb | |
parent | 8a9125c6e22cd83cbccc41434780e953890adeb1 (diff) | |
download | toolchain-utils-4f7eb71f9fa78f8710e1deb57d441f51fa74af3b.tar.gz |
rephrase some language in code and comments
This rephrases some code and comments to avoid unclear and
non-inclusive wording. For the remaining terms in unblocked_terms.txt,
comments are added to explain why these terms are present in the code.
BUG=chromium:1099035
TEST=repo hooks
Change-Id: I985613d811836b6fb6351eadcf3e08a3290db97f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2419656
Tested-by: Bob Haarman <inglorion@chromium.org>
Reviewed-by: Manoj Gupta (OoO) <manojgupta@chromium.org>
Reviewed-by: George Burgess <gbiv@chromium.org>
-rwxr-xr-x | android_bench_suite/fix_skia_results.py | 3 | ||||
-rwxr-xr-x | auto_delete_nightly_test_data.py | 4 | ||||
-rwxr-xr-x | cros_utils/command_executer.py | 2 | ||||
-rw-r--r-- | crosperf/experiment_runner.py | 2 | ||||
-rwxr-xr-x | crosperf/generate_report_unittest.py | 6 | ||||
-rw-r--r-- | crosperf/results_report.py | 2 | ||||
-rwxr-xr-x | crosperf/results_report_unittest.py | 3 | ||||
-rw-r--r-- | unblocked_terms.txt | 7 |
8 files changed, 15 insertions, 14 deletions
diff --git a/android_bench_suite/fix_skia_results.py b/android_bench_suite/fix_skia_results.py index 8c919d35..bdab80a9 100755 --- a/android_bench_suite/fix_skia_results.py +++ b/android_bench_suite/fix_skia_results.py @@ -57,7 +57,8 @@ def _GetTimeMultiplier(label_name): def _GetTimeDenom(ms): - """Given a list of times (in milliseconds), find a sane time unit for them. + """Given a list of times (in milliseconds), find a time unit in which + they can all be expressed. Returns the unit name, and `ms` normalized to that time unit. diff --git a/auto_delete_nightly_test_data.py b/auto_delete_nightly_test_data.py index 03d59b28..884afce2 100755 --- a/auto_delete_nightly_test_data.py +++ b/auto_delete_nightly_test_data.py @@ -50,8 +50,8 @@ def CleanNumberedDir(s, dry_run=False): return False ## Now delete the numbered dir Before forcibly removing the directory, just - ## check 's' to make sure it is sane. A valid dir to be removed must be - ## '/usr/local/google/crostc/(SUN|MON|TUE...|SAT)'. + ## check 's' to make sure it matches the expected pattern. A valid dir to be + ## removed must be '/usr/local/google/crostc/(SUN|MON|TUE...|SAT)'. valid_dir_pattern = ( '^' + NIGHTLY_TESTS_WORKSPACE + '/(' + '|'.join(DIR_BY_WEEKDAY) + ')') if not re.search(valid_dir_pattern, s): diff --git a/cros_utils/command_executer.py b/cros_utils/command_executer.py index ee1df95c..aeedf3ea 100755 --- a/cros_utils/command_executer.py +++ b/cros_utils/command_executer.py @@ -387,7 +387,7 @@ class CommandExecuter(object): command_file = f.name os.chmod(command_file, 0o777) - # if return_output is set, run a dummy command first to make sure that + # if return_output is set, run a test command first to make sure that # the chroot already exists. We want the final returned output to skip # the output from chroot creation steps. if return_output: diff --git a/crosperf/experiment_runner.py b/crosperf/experiment_runner.py index 21fa3ea0..6a46adfc 100644 --- a/crosperf/experiment_runner.py +++ b/crosperf/experiment_runner.py @@ -173,7 +173,7 @@ class ExperimentRunner(object): try: # We should not lease machines if tests are launched via `skylab # create-test`. This is because leasing DUT in skylab will create a - # dummy task on the DUT and new test created will be hanging there. + # no-op task on the DUT and new test created will be hanging there. # TODO(zhizhouy): Need to check whether machine is ready or not before # assigning a test to it. if not experiment.skylab: diff --git a/crosperf/generate_report_unittest.py b/crosperf/generate_report_unittest.py index e19d4695..8c3510a9 100755 --- a/crosperf/generate_report_unittest.py +++ b/crosperf/generate_report_unittest.py @@ -109,9 +109,9 @@ class GenerateReportTests(unittest.TestCase): } results = generate_report.CutResultsInPlace( bench_data, max_keys=0, complain_on_update=False) - # Just reach into results assuming we know it otherwise outputs things - # sanely. If it doesn't, testCutResultsInPlace should give an indication as - # to what, exactly, is broken. + # Just reach into results assuming we know it otherwise outputs things in + # the expected way. If it doesn't, testCutResultsInPlace should give an + # indication as to what, exactly, is broken. self.assertEqual(list(results['foo'][0][0].items()), [('retval', 0)]) self.assertEqual(list(results['bar'][0][0].items()), [('retval', 1)]) self.assertEqual(list(results['baz'][0][0].items()), []) diff --git a/crosperf/results_report.py b/crosperf/results_report.py index ff6c4f96..ff8c119d 100644 --- a/crosperf/results_report.py +++ b/crosperf/results_report.py @@ -505,7 +505,7 @@ class HTMLResultsReport(ResultsReport): experiment_file = '' if self.experiment is not None: experiment_file = self.experiment.experiment_file - # Use kwargs for sanity, and so that testing is a bit easier. + # Use kwargs for code readability, and so that testing is a bit easier. return templates.GenerateHTMLPage( perf_table=perf_table, chart_js=chart_javascript, diff --git a/crosperf/results_report_unittest.py b/crosperf/results_report_unittest.py index e03ea431..1e96ef97 100755 --- a/crosperf/results_report_unittest.py +++ b/crosperf/results_report_unittest.py @@ -57,7 +57,8 @@ class FreeFunctionsTest(unittest.TestCase): ParseChromeosImage(os.path.dirname(buildbot_case)), ('', os.path.dirname(buildbot_img))) - # Ensure we don't act completely insanely given a few mildly insane paths. + # Ensure we do something reasonable when giving paths that don't quite + # match the expected pattern. fun_case = '/chromiumos_test_image.bin' self.assertEqual(ParseChromeosImage(fun_case), ('', fun_case)) diff --git a/unblocked_terms.txt b/unblocked_terms.txt index 5c51e40c..c961e667 100644 --- a/unblocked_terms.txt +++ b/unblocked_terms.txt @@ -1,6 +1,5 @@ -dummy -insane +# Code uses this in many cases to refer to git branches. master + +# A few paths in AOSP contain this term. native -sane -sanity |