Convert run_tests to python, allow running on Mac/Windows and allow filters for tests.#9818
Conversation
…lters for tests. Sample usage: To run only the embedder_unittests in the engine with the profile variant, the command would be ``` ./flutter/testing/run_tests.py —variant host_profile_unopt —type engine —filter embedder_unittests `` To run only the geometry in Dart with the debug variant, the command would be ``` ./flutter/testing/run_tests.py —variant host_debug_unopt —type dart —filter geometry_test `` Without any argument, the behavior is identical to `run_tests.sh`. In a subsequent patch, I will enable running unit-tests on Windows in the tryjobs. The lack of compatibility of the shell script on Windows made it so that we never ran any Windows unit-tests in the tryjobs.
|
No change in functionality from the current version of the shell script. I will patch the tryjobs and remove the script next. |
| if IsLinux(): | ||
| RunEngineExecutable(build_dir, 'txt_benchmarks', filter, [ fonts_dir_flag ]) | ||
|
|
||
| if IsLinux(): |
There was a problem hiding this comment.
Looks like this block was copied twice
There was a problem hiding this comment.
Oh, one of them is a benchmark run.
testing/run_tests.py
Outdated
|
|
||
| args = parser.parse_args() | ||
|
|
||
| run_engine_tests = args.type == 'engine' |
There was a problem hiding this comment.
Nit: args.type in ['engine', 'all'] to save 4 lines below :)
testing/run_tests.py
Outdated
|
|
||
| def RunTests(build_dir, filter, run_engine_tests, run_dart_tests, run_benchmarks): | ||
| if run_engine_tests: | ||
| RunEngineTests(build_dir, filter) |
There was a problem hiding this comment.
Nit: the dart tests seem to be also engine tests. Shall we call this RunGtests, RunCppTests, RunCcTests, or just RunUnitTests?
There was a problem hiding this comment.
Done. Used RunCCTests
|
BTW, I changed |
… allow filters for tests. (flutter/engine#9818)
… allow filters for tests. (flutter/engine#9818)
Sample usage:
To run only the embedder_unittests in the engine with the profile variant, the command would be
To run only the geometry in Dart with the debug variant, the command would be
Without any arguments, the behavior is identical to
run_tests.sh.In a subsequent patch, I will enable running unit-tests on Windows in the tryjobs. The lack of compatibility of the shell script on Windows made it so that we never ran any Windows unit-tests in the tryjobs.