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

Updated rust_test docs #1098

Merged
merged 3 commits into from
Jan 21, 2022
Merged

Updated rust_test docs #1098

merged 3 commits into from
Jan 21, 2022

Conversation

UebelAndre
Copy link
Collaborator

@UebelAndre UebelAndre commented Jan 21, 2022

When using use_libtest_harness users can use --test_arg to run individual tests. I think this functionality should be documented. See below as an example

user@localhost rules_rust % bazel test //tools/runfiles:runfiles_test --test_output=all
INFO: Invocation ID: 96f54232-3330-4ca7-b127-25ee2e44bedd
INFO: Analyzed target //tools/runfiles:runfiles_test (0 packages loaded, 0 targets configured).
INFO: Found 1 test target...
INFO: From Testing //tools/runfiles:runfiles_test:
==================== Test output for //tools/runfiles:runfiles_test:

running 2 tests
test test::test_manifest_based_can_read_data_from_runfiles ... ok
test test::test_can_read_data_from_runfiles ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

================================================================================
Target //tools/runfiles:runfiles_test up-to-date:
  bazel-bin/tools/runfiles/runfiles_test
INFO: Elapsed time: 0.367s, Critical Path: 0.09s
INFO: 2 processes: 1 remote cache hit, 1 darwin-sandbox.
INFO: Build completed successfully, 2 total actions
//tools/runfiles:runfiles_test                                           PASSED in 0.1s

Executed 1 out of 1 test: 1 test passes.
INFO: Build completed successfully, 2 total actions
user@localhost rules_rust % bazel test //tools/runfiles:runfiles_test --test_output=all --test_arg=test::test_manifest_based_can_read_data_from_runfiles
INFO: Invocation ID: 03235fb8-fd9f-4872-bfa3-5d6c56c1821e
INFO: Analyzed target //tools/runfiles:runfiles_test (0 packages loaded, 0 targets configured).
INFO: Found 1 test target...
INFO: From Testing //tools/runfiles:runfiles_test:
==================== Test output for //tools/runfiles:runfiles_test:

running 1 test
test test::test_manifest_based_can_read_data_from_runfiles ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out; finished in 0.00s

================================================================================
Target //tools/runfiles:runfiles_test up-to-date:
  bazel-bin/tools/runfiles/runfiles_test
INFO: Elapsed time: 0.286s, Critical Path: 0.02s
INFO: 2 processes: 2 remote cache hit.
INFO: Build completed successfully, 2 total actions
//tools/runfiles:runfiles_test                                  (cached) PASSED in 0.0s

Executed 0 out of 1 test: 1 test passes.
INFO: Build completed successfully, 2 total actions

closes #417

@UebelAndre
Copy link
Collaborator Author

This documentation is probably a bit limited. Open to suggestions 😄

@UebelAndre UebelAndre merged commit 73507b8 into bazelbuild:main Jan 21, 2022
@UebelAndre UebelAndre deleted the test branch January 21, 2022 08:18
cfredric pushed a commit to cfredric/rules_rust that referenced this pull request Feb 16, 2022
* Updated rust_test docs

* Regenerate documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run individual tests
2 participants