Commit debe4683 by Jamie Madill Committed by Commit Bot

Test Runner: Accept Chromium args.

This change lets the test runner accept the same isolated script parameter syntax as Chromium. It keeps the old parameter names so the tests accept both. This will let us more easily integrate with the Chromium Android test_runner.py script. Also update the README which was missing a few flags. Bug: angleproject:3162 Change-Id: Ic22b289a095418ffdaa19a04caa1b45c6c657872 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2300530Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com> Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 5927706b
......@@ -13,15 +13,20 @@ The ANGLE test harness is a harness around GoogleTest that provides functionalit
The ANGLE test harness accepts all standard GoogleTest arguments. The harness also accepts the
following additional command-line arguments:
* `--shard-count` and `--shard-index` control the test sharding
* `--bot-mode` enables multi-process execution and test batching
* `--batch-size` limits the number of tests to run in each batch
* `--batch-timeout` limits the amount of time spent in each batch
* `--bot-mode` enables multi-process execution and test batching
* `--debug-test-groups` dumps the test config categories when using `bot-mode`
* `--filter-file` allows passing a larget `gtest_filter` via a file
* `--histogram-json-file` outputs a [formatted JSON file][HistogramSet] for perf dashboards
* `--max-processes` limits the number of simuntaneous processes
* `--test-timeout` limits the amount of time spent in each test
* `--results-file` specifies a location for the JSON test result output
* `--results-directory` specifies a directory to write test results to
* `--filter-file` allows passing a larget `gtest_filter` via a file
* `--results-file` specifies a location for the JSON test result output
* `--shard-count` and `--shard-index` control the test sharding
* `--test-timeout` limits the amount of time spent in each test
`--isolated-script-test-output` and `--isolated-script-perf-test-output` mirror `--results-file`
and `--histogram-json-file` respectively.
As well as the custom command-line arguments we support a few standard GoogleTest arguments:
......@@ -52,3 +57,4 @@ See the source code for more details: [TestSuite.h](TestSuite.h) and [TestSuite.
[BaseTest]: https://chromium.googlesource.com/chromium/src/+/refs/heads/master/base/test/
[JSONFormat]: https://chromium.googlesource.com/chromium/src/+/master/docs/testing/json_test_results_format.md
[HistogramSet]: https://chromium.googlesource.com/catapult/+/HEAD/docs/histogram-set-json-format.md
......@@ -954,6 +954,7 @@ TestSuite::~TestSuite()
bool TestSuite::parseSingleArg(const char *argument)
{
// Note: Flags should be documented in README.md.
return (ParseIntArg("--shard-count=", argument, &mShardCount) ||
ParseIntArg("--shard-index=", argument, &mShardIndex) ||
ParseIntArg("--batch-size=", argument, &mBatchSize) ||
......@@ -962,8 +963,10 @@ bool TestSuite::parseSingleArg(const char *argument)
ParseIntArg("--batch-timeout=", argument, &mBatchTimeout) ||
ParseStringArg("--results-directory=", argument, &mResultsDirectory) ||
ParseStringArg(kResultFileArg, argument, &mResultsFile) ||
ParseStringArg("--isolated-script-test-output", argument, &mResultsFile) ||
ParseStringArg(kFilterFileArg, argument, &mFilterFile) ||
ParseStringArg(kHistogramJsonFileArg, argument, &mHistogramJsonFile) ||
ParseStringArg("--isolated-script-perf-test-output", argument, &mHistogramJsonFile) ||
ParseFlag("--bot-mode", argument, &mBotMode) ||
ParseFlag("--debug-test-groups", argument, &mDebugTestGroups));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment