Instead, return the values of the test and benchmark setup data files so
that the ninja/osx/vs backends can use those filenames instead of
hard-coding them.
When a CustomTarget is run with a command that is an executable built
by the project which also has a DLL built in the same project as a
dependency, the EXE can't run on Windows because the DLL can't be found.
On UNIX-like systems, we set the RPATH using the linker so these
dependencies can be found, but on Windows the only way is to set the
PATH environment variable.
The same problem exists for tests, so we reuse that infrastructure by
creating a new meson_exe.py script that can be used as a wrapper to run
CustomTarget commands on Windows. This can later also be extended to add
support for setting an environment while calling the command needed to
generate a CustomTarget: https://github.com/mesonbuild/meson/issues/266
Without any -O options, gcc does not generate properly debuggable code.
> With no -O option at all, some compiler passes that collect information useful
> for debugging do not run at all
gcc recommends -Og, but that isn't supported by clang, so we use -O0
See https://github.com/mesonbuild/meson/pull/509 for more discussion
Print status on single line
only print a single line for succeeded tests and two lines for failed
tests. This makes it easier to scan the output for failed tests.
We now use .links() to detect if a C compiler function is available
or not, that way the user doesn't need to specify all the possible
includes for the check, which simplifies things considerably.
Also detect glibc stub functions that will never work and return
false for them.
Closes#437
shutil.rmtree, which is used by tempfile.TemporaryDirectory, randomly fails
on Windows, because the directory is not empty although it should be,
because all files were deleted by shutil.rmtree internals before trying to
remove the directory.
A simple retry approach fixes the issue.
The _run_test method uses several global variables (unity_flags,
backend_flags, compile_commands, install_commands) which are
not set when the method is run by the executor (at least on Windows).
To resolve this, pass the variables as method parameters.