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

How to run a single test from a package / file? #422

Closed
dlsniper opened this issue Feb 16, 2016 · 1 comment
Closed

How to run a single test from a package / file? #422

dlsniper opened this issue Feb 16, 2016 · 1 comment

Comments

@dlsniper
Copy link
Contributor

How should the command to run a single test via delve be like? I've tried both:

  • dlv --build-flags="-run ^TestHello$" test github.com/dlsniper/u/tmp/mypack --
  • dlv test github.com/dlsniper/u/tmp/mypack -- -run ^TestHello$
    but without luck (all the tests in the package run for both of them).

I can upload the test example if needed.
Thank you!

@dlsniper
Copy link
Contributor Author

Nevermind, I've finally figured it out, I need to run something like this:

dlv test --build-flags='github.com/dlsniper/u/tmp/mypack' -- -test.run ^TestHello$

Sorry for noise

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

No branches or pull requests

1 participant