-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this block was copied twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, one of them is a benchmark run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with tiny nits.
testing/run_tests.py
Outdated
|
||
args = parser.parse_args() | ||
|
||
run_engine_tests = args.type == 'engine' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: args.type in ['engine', 'all']
to save 4 lines below :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Done.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.