anordal / shellharden

The corrective bash syntax highlighter
Mozilla Public License 2.0
4.63k stars 130 forks source link

Moduletest: Test only the executable for the right build #35

Closed anordal closed 4 years ago

anordal commented 4 years ago

The module test (aka. integration test) doesn't know if cargo test is invoked with --release or not.

That is the fundamental problem. Furthermore, it doesn't really want to concern itself with where the various debug and release executables are located.

Currently, it searches for executables named "shellharden" and just tests every one of them. Care is taken to search CARGO_TARGET_DIR if set.

Why this is wrong: When you think you are testing the debug build, you are implicitly also testing a stale release build if it exists, and vice versa.

Problem: https://github.com/rust-lang/cargo/issues/3670

Solution: https://github.com/rust-lang/cargo/pull/7697