Skip to content

cargo test --no-run should print the resulting binary name #9957

@matklad

Description

@matklad

Problem:

I am profiling my Rust application, so I want to compile the tests with --no-run and run the binary directly. However, the output doesn't say where the result is:

$ cargo test --no-run --release --package runtime-tester --features nearcore/no_cache --lib -- perf_cliff --exact --nocapture
   Compiling runtime-tester v0.1.0 (/home/matklad/projects/nearcore/test-utils/runtime-tester)
    Finished release [optimized] target(s) in 5.49s
$

I have to manually ls traget/release/deps to get the file name

Proposed solution:

The name is convenientl printed when you don't pass no-run:

$ cargo test --release --package runtime-tester --features nearcore/no_cache --lib -- perf_cliff --exact --nocapture
    Finished release [optimized] target(s) in 0.13s
     Running unittests (target/release/deps/runtime_tester-160c2544f9ae8411)

Would be great to add a message similar to Running target (path) to --no-run output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-console-outputArea: Terminal output, colors, progress bar, etc.C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`E-easyExperience: Easy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions