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

Passing --nocapture to test-unit doesn't work #20280

Open
jdm opened this issue Mar 12, 2018 · 7 comments
Open

Passing --nocapture to test-unit doesn't work #20280

jdm opened this issue Mar 12, 2018 · 7 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Mar 12, 2018

./mach test-unit -p profile --nocapture yields:

error: Unknown flag: '--nocapture'

Usage:
    cargo test [options] [TESTNAME] [--] [<args>...]
@highfive
Copy link

@highfive highfive commented Mar 12, 2018

@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented Mar 12, 2018

Try adding -- to separate test-program args from cargo args. Or maybe twice to also separate cargo args from mach args.

@jdm
Copy link
Member Author

@jdm jdm commented Mar 12, 2018

Neither ./mach test-unit -p profile -- --nocapture nor ./mach test-unit -p profile -- -- --nocapture made a difference.

@jdm
Copy link
Member Author

@jdm jdm commented Mar 12, 2018

Although maybe that's a change that needs to be made to the invocation of cargo from the mach command instead.

@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented Mar 12, 2018

I’ve just looked at the code, test-unit does not accept arbitrary arguments or pass them through to cargo. Maybe it should, but in the meantime you can probably use ./mach cargo test or even cargo test.

@jdm
Copy link
Member Author

@jdm jdm commented Mar 12, 2018

Sure, but test-unit does accept an explicit --nocapture argument, so it's surprising that it's broken.

@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented Mar 13, 2018

Oh I missed that, sorry.

It does appear to work for me though:

$ ./mach test-unit -p profile --nocapture -v
[…]
     Running `/home/simon/servo/target/debug/deps/profile_tests-131711d7e4e31353 --nocapture`
[…]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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