So I have no idea what could be causing this. I've used cargo test in the past and it's worked fine.
I've tried it with both cargo --version 1.82.0, and cargo --version 1.84.1
lennart@Tumxedo:~/Desktop/sus-compiler$ cargo test fifo_use
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.06s
Running unittests src/main.rs (target/debug/deps/sus_compiler-1b71e2b3f6ebb086)
running 2 tests
error: invalid value 'fifo_use' for '[files]...': File does not exist
For more information, try '--help'.
error: test failed, to rerun pass `--bin sus_compiler`
Caused by:
process didn't exit successfully: `/home/lennart/Desktop/sus-compiler/target/debug/deps/sus_compiler-1b71e2b3f6ebb086 fifo_use` (exit status: 2)
note: test exited abnormally; to see the full output pass --nocapture to the harness.
Likewise, trying to run them from VSCode, by clicking "Debug" or "Run" in the editor gives me a different error:
Executing task: cargo test --package sus_compiler --bin sus_compiler --all-features -- latency::latency_algorithm::tests::minimal_fifo_use --exact --show-output
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.07s
Running unittests src/main.rs (target/debug/deps/sus_compiler-6bb83a2f9d1856c2)
running 1 test
error: unexpected argument '--exact' found
tip: to pass '--exact' as a value, use '-- --exact'
Usage: sus_compiler-6bb83a2f9d1856c2 <files>...
For more information, try '--help'.
error: test failed, to rerun pass `-p sus_compiler --bin sus_compiler`
Caused by:
process didn't exit successfully: `/home/lennart/Desktop/sus-compiler/target/debug/deps/sus_compiler-6bb83a2f9d1856c2 'latency::latency_algorithm::tests::minimal_fifo_use' --exact --show-output` (exit status: 2)
note: test exited abnormally; to see the full output pass --nocapture to the harness.
* The terminal process "cargo 'test', '--package', 'sus_compiler', '--bin', 'sus_compiler', '--all-features', '--', 'latency::latency_algorithm::tests::minimal_fifo_use', '--exact', '--show-output'" failed to launch (exit code: 2).
* Terminal will be reused by tasks, press any key to close it.
So there are two tests that match fifo_use
:
latency::latency_algorithm::tests::fifo_use
and latency::latency_algorithm::tests::minimal_fifo_use
Weirdly, it does find them, yet still errors saying fifo_use is an invalid value for [Files...]?
I've been able to continue working for the time being by commenting out all other tests