Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

--test always shows no tests available #128

Closed
the-emerald opened this issue Jan 20, 2023 · 2 comments
Closed

--test always shows no tests available #128

the-emerald opened this issue Jan 20, 2023 · 2 comments

Comments

@the-emerald
Copy link

Try the following:

cargo new whatever --lib
cd whatever

The default library template comes with a test called tests::it_works.

cargo asm --test

shows "No tests available." Trying to specify the test:

cargo asm --test tests::it_works

doesn't work either, as it shows "no test target named tests::it_works."

@pacak
Copy link
Owner

pacak commented Jan 20, 2023

--test in cargo-show-asm behaves the same way --test works in cargo build - it builds integration test. To look at the assembly (llvm, mir, etc) of the test themselves you need to build a library with the test profile: cargo asm --profile test it_works 0 - this works for default library template for example.

@the-emerald
Copy link
Author

the-emerald commented Jan 20, 2023

Ah, I see! I thought the --test was for library tests. Looking at #1 I can now see that it's for tests in a test/ directory. Thanks!

Repository owner locked and limited conversation to collaborators Jan 20, 2023
@pacak pacak converted this issue into discussion #130 Jan 20, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants