Skip to content

Conversation

@SomeoneToIgnore
Copy link
Contributor

Based on the https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Runners.20for.20custom.20test.20annotations discussion.

Adds a test runner for every method that has an annotation that contains test word in it, allowing to run tests annotated with custom testing annotations such as #[tokio::test], #[test_case(...)] and others at costs of potentially emitting some false-positives.

@kjeremy
Copy link
Contributor

kjeremy commented Jan 23, 2020

Does anything special happen with these are are they all still invoked with cargo test?

@SomeoneToIgnore
Copy link
Contributor Author

SomeoneToIgnore commented Jan 23, 2020

Same cargo command is used to run them, yes.
This is enough to successfully run the #[tokio::test] and #[test_case(...)], but does not do anything meaningful to the methods annotated with #[wasm_bindgen_test], for example (0 tests are run).

@matklad
Copy link
Contributor

matklad commented Jan 25, 2020

bors r+

bors bot added a commit that referenced this pull request Jan 25, 2020
2899: Provide more runners for potential tests r=matklad a=SomeoneToIgnore

Based on the https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Runners.20for.20custom.20test.20annotations discussion.

Adds a test runner for every method that has an annotation that contains `test` word in it, allowing to run tests annotated with custom testing annotations such as `#[tokio::test]`, `#[test_case(...)]` and others at costs of potentially emitting some false-positives.

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
@bors
Copy link
Contributor

bors bot commented Jan 25, 2020

Build succeeded

  • Rust (macos-latest)
  • Rust (ubuntu-latest)
  • TypeScript

@bors bors bot merged commit 3137215 into rust-lang:master Jan 25, 2020
@SomeoneToIgnore SomeoneToIgnore deleted the more-tests-runners branch January 26, 2020 10:01
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.

3 participants