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

Use --exact flag when generating run configuration for a single test #943

Closed
matklad opened this issue Jan 17, 2017 · 11 comments
Closed

Use --exact flag when generating run configuration for a single test #943

matklad opened this issue Jan 17, 2017 · 11 comments
Labels
E-easy Issue required minimal knowledge about platform and project codebase help wanted

Comments

@matklad
Copy link
Member

matklad commented Jan 17, 2017

rust-lang/rust#38181

@matklad matklad added E-easy Issue required minimal knowledge about platform and project codebase help wanted labels May 29, 2017
@maraisr
Copy link
Contributor

maraisr commented Sep 28, 2017

@matklad this issue still up for grabs, and if so, are you able to point me in the right direction?

@vlad20012
Copy link
Member

vlad20012 commented Sep 28, 2017

The issue is still actual and up for grab. If you try to run a single test named test in this setup:

mod test {
    #[test]
    fn test(){
        println!("test");
    }
    #[test]
    fn test321(){
        println!("test321");
    }
}

both test will be run instead.

I think it's located here.

@maraisr
Copy link
Contributor

maraisr commented Sep 29, 2017

@vlad20012 do you think you can assign this job to me - happy to take it on!

Few questions though. What is the development workflow for this? Or is it pretty standard dev workflow for Intellij plugins?

@vlad20012
Copy link
Member

vlad20012 commented Sep 29, 2017

I'm sorry, I could not understand the question. Could you please clarify it? However, perhaps you can find the answer in the CONTRIBUTING.md :)

@vlad20012
Copy link
Member

@maraisr And yes, you can grab the issue anytime :)

@maraisr
Copy link
Contributor

maraisr commented Oct 2, 2017

Doesn't look like --exact is a flag anymore?

Using the above code block and running:

$ cargo test ::test321
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running target/debug/deps/rust-9d6b4d08e5c8e0ac

running 1 test
test test::test321 ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out

Only executes the one test anyway?

@vlad20012
Copy link
Member

vlad20012 commented Oct 2, 2017

@maraisr try to run test named test instead of test321

@maraisr
Copy link
Contributor

maraisr commented Oct 2, 2017

@vlad20012 I see!

$ cargo test ::test
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running target/debug/deps/rust-9d6b4d08e5c8e0ac

running 2 tests
test test::test ... ok
test test::test321 ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

but then why does this fail?

$ cargo test ::test --exact
error: Unknown flag: '--exact'

Usage:
    cargo test [options] [--] [<args>...]

My cargo version: cargo 0.22.0-nightly

@vlad20012
Copy link
Member

vlad20012 commented Oct 2, 2017

@maraisr,
test --package example_project --bin example_project test::test -- --exact ?
I did not really know that this stuff is so weird =D

@pasa
Copy link

pasa commented Oct 16, 2017

Hi! I've created pull request #1868 for this issue. Please, have a look.

@pasa
Copy link

pasa commented Oct 23, 2017

I guess this issue can be closed since the pull request #1868 has been merged.

@matklad matklad closed this as completed Oct 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Issue required minimal knowledge about platform and project codebase help wanted
Projects
None yet
Development

No branches or pull requests

4 participants