Skip to content
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

yarn test #100

Merged
merged 2 commits into from Mar 14, 2018
Merged

yarn test #100

merged 2 commits into from Mar 14, 2018

Conversation

@garrettr
Copy link
Contributor

garrettr commented Mar 14, 2018

Adds a yarn test command to build and run unit tests. Requires a <suite> argument with the name of the test target to build and run.

This PR accompanies brave/brave-core#57 and is meant to provide a convenient wrapper for building and running the tests, in the manner of yarn build, yarn start, etc.

Example (using brave/brave-core#57):

$ yarn test brave_unit_tests
yarn run v1.5.1
$ node ./scripts/commands.js test brave_unit_tests
ninja -C /Users/garrettr/brave/src/out/Release brave_unit_tests
ninja: Entering directory `/Users/garrettr/brave/src/out/Release'
[30/30] LINK ./brave_unit_tests
/Users/garrettr/brave/src/out/Release/brave_unit_tests --enable-logging --v=0
IMPORTANT DEBUGGING NOTE: batches of tests are run inside their
own process. For debugging a test inside a debugger, use the
--gtest_filter=<your_test_name> flag along with
--single-process-tests.
Using sharding settings from environment. This is shard 0/1
Using 8 parallel jobs.
0 tests run
Tests took 0 seconds.
✨  Done in 185.18s.

Remaining work

  • Implement --gtest-filter.

Some of the Chromium test suites are enormous (e.g. unit_tests) and it is very helpful to have --gtest-filter when working with them. Support for --gtest-filter could be added in this PR or in a follow-up.

@garrettr garrettr requested a review from bbondy Mar 14, 2018
@bbondy
bbondy approved these changes Mar 14, 2018
@bbondy
Copy link
Member

bbondy commented Mar 14, 2018

++, thanks!

@bbondy bbondy merged commit 97f891e into master Mar 14, 2018
@bsclifton bsclifton deleted the yarn-test branch Mar 15, 2018
@bsclifton
Copy link
Member

bsclifton commented Mar 15, 2018

<3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.