-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object returned by executable() does not expand to full path when used as argument in test() #2681
Comments
The reason this happens is that we pass a relative path to the target. So if they are in a different directory then it expands to We try to avoid absolute paths when possible, since they have the tendency to break reproducible builds because paths get captured in the weirdest of ways. Maybe we should detect this case and then do |
In this case |
FWIW, I still see the same behaviour (just the name, not an absolute path and not ./foo) with meson-0.53.2-1.git88e40c7.fc32.noarch. |
mp3chop is so old that it didn't have very good tests. In the absence of exhaustive tests, let's add a few approval tests. The expected output files were generated using an older version of mp3chop and can be used to show that the behaviour hasn't changed. When we pass the mp3chop executable to our test script it is not passed as a full path (see mesonbuild/meson#2681 ) and the current directory won't be in our path so we need to take special action to ensure that we can run it.
http://mesonbuild.com/Reference-manual.html#build-target-object says
... so I'm filling this.
this expands to
i.e. it runs the system-installed binary instead of the one I want to test.
Using
exe.full_path()
works fine, but it will break dependency calculation when #1704 is resolved.The text was updated successfully, but these errors were encountered: