Intellij-rust: Start single test in debugger runs all test in module

Created on 15 Mar 2018  路  3Comments  路  Source: intellij-rust/intellij-rust

I have tried to find if this issue already was reported but could not find it. If it was already a known issue, just let me know.

When I run a single test in CLion with the regular executor it will run a single test and all other tests in the module are marked as filtered out:
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 9 filtered out

But if I run this same test in debugmode, it will run all tests in the module:
test result: FAILED. 8 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out.
I expected it to behave the same as the regular run.

Side-note: It even appears to run everything in parallel.

bug debugger tests

Most helpful comment

Quick workaround if you need one -

  1. While debugging a single test, in the "configurations" drop-down choose "Save configuration" - this will create a persistent configuration for running just that single test.
  2. Then, in the "Edit configurations" dialog, modify the "Command" field to put the -- in the correct position as shown by @d10r above

You can then debug into this configuration, and you'll get only one test running.

All 3 comments

I see the same behavior, makes debugging modules with more than one test almost impossible to debug!

The reason for this seems to be wrong placement of the double dash which separates the commands.

This is an example command as created by the plugin:
test --package ethcore --lib engines::tendermint::tests::seal_submission -- --exact

And this is what it should look like:
test --package ethcore --lib -- engines::tendermint::tests::seal_submission --exact

Quick workaround if you need one -

  1. While debugging a single test, in the "configurations" drop-down choose "Save configuration" - this will create a persistent configuration for running just that single test.
  2. Then, in the "Edit configurations" dialog, modify the "Command" field to put the -- in the correct position as shown by @d10r above

You can then debug into this configuration, and you'll get only one test running.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

evanjpw picture evanjpw  路  3Comments

ragagno picture ragagno  路  3Comments

itmuckel picture itmuckel  路  3Comments

NamsooCho picture NamsooCho  路  3Comments

ralfbiedert picture ralfbiedert  路  3Comments