Files
fd-find-mirror/tests/testenv
Andreas Stergiopoulos b6af107ac6 tests/testenv/mod.rs: Change how fd binary executable is located
This commit changes the way that the binary executable of fd is located
during integration tests. Previously, the find_fd_exe function would just
navigate in the parent directory and try to find the binary here. This
method is not appropriate as it assumes that the test directory will have
the same layout as the build directory, which also leaks the build time
configuration.

With this patch, the location of the binary executable is read using the
CARGO_BIN_EXE_fd environment variable. The code at first tries to read
the variable at run time, and if it is not available it then uses the env!
macro which returns the value of the variable exposed at compile time.

This way of reading the binary location makes the code more flexible and
friendlier to cross compile.

This commit closes #1838 .

Signed-off-by: Andreas Stergiopoulos <andreas.stergiopoulos@smile.fr>
2025-11-18 10:25:35 +01:00
..