aboutsummaryrefslogtreecommitdiff
path: root/.style.yapf
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2019-03-11 13:53:20 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-03-16 01:53:38 -0700
commit78eb66de4e69631c688e5c4e3f586623bb9452f6 (patch)
tree84d0fc269d4eaac91f396ea5c516ce378717586f /.style.yapf
parent1a5a3163b7fe75e053282e7d67148c5f4e409414 (diff)
downloadtoolchain-utils-78eb66de4e69631c688e5c4e3f586623bb9452f6.tar.gz
[githooks] Add a test runner
This CL adds a test-runner as ./run_tests_for.py. This can manually be invoked pretty easily; just hand it a few files, and it'll try to figure out what tests need to be run for that. If it finds any tests, they'll be run in parallel. This includes an incidental update to our yapf style, per reviewer comments. The intent is to use this script to run tests as part of a `repo upload` hook. Test discovery is kind of haphazard, and split into two phases. Basically, there's a set of directories where if you touch anything in that directory, all tests in that directory get run (see `_find_forced_subdir_tests`). Otherwise, this script just tries to find names of files similar to the ones it's given, but with _test/_unittest in them. I chose this method of discovery since `foo_unittest.py` and `foo_test.py` appear to be the two prevalent naming conventions here, and no one wants to keep a text file (or similar) up-to-date with all of the tests that exist. At the moment, this only supports Python. Adding support for auto-detecting other tests should hopefully be straightforward enough, if we want to add it. BUG=None TEST=Ran crosperf's tests. Observed failures. Change-Id: Ieeb3e5ad25011c6ef2f93908b051c4da1e776350 Reviewed-on: https://chromium-review.googlesource.com/1516414 Commit-Ready: George Burgess <gbiv@chromium.org> Tested-by: George Burgess <gbiv@chromium.org> Reviewed-by: Caroline Tice <cmtice@chromium.org>
Diffstat (limited to '.style.yapf')
-rw-r--r--.style.yapf1
1 files changed, 1 insertions, 0 deletions
diff --git a/.style.yapf b/.style.yapf
index de0c6a70..97f7d657 100644
--- a/.style.yapf
+++ b/.style.yapf
@@ -1,2 +1,3 @@
[style]
based_on_style = chromium
+blank_line_before_module_docstring = true