Age | Commit message (Collapse) | Author |
|
Apparently some upstream conventions use `test_${x}.py` instead of this
repo's standard of `${x}_(test|unittest).py`. Either seems fine, and
supporting both seems simple.
This includes some formatting updates from yapf.
BUG=None
TEST=`./run_tests_for.py llvm_tools/*.py`
TEST=Made a new test_foo.py script; saw that it was picked up.
Change-Id: I533a9395227d8342411cacfbd1bb6d5c63b8ec2a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3163797
Reviewed-by: Jordan R Abrahams <ajordanr@google.com>
Commit-Queue: George Burgess <gbiv@chromium.org>
Tested-by: George Burgess <gbiv@chromium.org>
|
|
This patch migrates all in-use projects left to python 3.
BUG=chromium:1011676
TEST=Passed unittests and launched scripts manually.
Change-Id: I7f2de4e1131c05bacfac80667f3064da8adaebfd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2051397
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Zhizhou Yang <zhizhouy@google.com>
Auto-Submit: Zhizhou Yang <zhizhouy@google.com>
|
|
This patch ports some still-in-use python scripts under root directory
of toolchain-utils to python 3.
BUG=chromium:1011676
TEST=Passed unittests and tested with manually launching.
Change-Id: Id6066944780a7204fe4746cd271f41ac20f2274d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2049103
Commit-Queue: Zhizhou Yang <zhizhouy@google.com>
Tested-by: Zhizhou Yang <zhizhouy@google.com>
Auto-Submit: Zhizhou Yang <zhizhouy@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
|
|
I forgot to do `base +`, so files ending in _unittest.py weren't being
properly detected + run.
While I'm in the area, unittests should probably count as their own
unittests.
Quote style fixes are enforced by `cros lint`, so this fixes those, too.
BUG=None
TEST=Ran on a _unittest file and a file with a _unittest
Change-Id: I7ef984afef2f66203f9d2236c3f5021aac5d9acf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1788666
Commit-Queue: George Burgess <gbiv@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Tested-by: George Burgess <gbiv@chromium.org>
|
|
(via go test) during presubmit and git hooks.
Will only warn when the go commands are not available
as go is not part of depot_tools.
BUG=chromium:976903
TEST=Tried with and without go/gofmt/golint in the path.
TEST=Tried on go and non go files.
TEST=Tried on go files with and without errors.
Change-Id: I8a6aa4227f0d8649f7c390ab59f187f14955293c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1669745
Reviewed-by: George Burgess <gbiv@chromium.org>
Commit-Queue: Tobias Bosch <tbosch@google.com>
Tested-by: Tobias Bosch <tbosch@google.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
|
|
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>
|