RFC: Add --files to allow running specific test files. #3091
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following are test runs for
test-amp-iframe.js
with the following command:gulp test
gulp test --files=extensions/amp-iframe/0.1/test/*.js
gulp test --files=extensions/amp-iframe/0.1/test/*.js
Even with no speed wins this also allows us to run tests that are in multiple files or multiple
describe
blocks in the same file - currently not possible, one would have to keep doing.only
on multiple describe blocks. Speed wins also gonna keep accumulate as we add more and more extensions.In general this hopefully could be very useful during development where one is just incrementally adding tests and testing functionality in general.
I general this can even be faster with more optimization to what needs to be built or compiled. For example, as far as I can tell one wouldn't need to run
compile
inbuild
step for running the unit tests, though not entirely sure (for example, thetest-amp-iframe
runs in 12s instead of 18s ifcompile
is dropped). One can also probably skip building examples during running these kind of tests (though the saves from examples might be insignificant - ~1s - another ~1s for droppingbuildAlp
when not needed).I think more importantly, this get rid of a lot of
.only
usage and forgetting it in source code to only realize the test failed after travis has ranpresubmit
- some usage still probably useful to run a singledescribe
orit
blocks.cc/ @cramforce @dvoytenko @jridgewell @sriramkrish85 @erwinmombay