Get path to built executable programmatically

Hello

I started making a crate for the iperf3 library. The library and the executable are built from sources.
I am looking for a way to get the path to the iperf3 executable in my integration tests. The executable path looks like "./target/debug/build/iperf3-xxxxxxxxxxxxxxxx/out/bin/iperf3".
How can I obtain it programmatically?

The OUT_DIR environment variable is also available in tests.

I use this to run the executable from my tests and it works fine.
Please tell me if there is a better way.

1 Like

btw this is pre-packaged in assert_cmd

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.