Commit Graph

132 Commits

Author SHA1 Message Date
Ari Vuollet 5ee2fb6ede d: Fix linker errors with shared libraries on Windows 2019-04-03 19:59:24 +03:00
John Ericson f53f58f54e Always initialize compiler_options before sanity_check
This is because sanity checking wants to use CFLAGS and friends.
2019-03-27 10:54:56 -04:00
Jussi Pakkanen ed5992a10d
Merge pull request #5031 from bonzini/kconfig
Kconfig Module
2019-03-20 22:03:47 +02:00
Paolo Bonzini 7a02b76e70 interpreterbase: protect string division with FeatureNew
Meson is not warning if you join paths with / but you are requesting a
version older than 0.49.0; fix this before adding more features to the
division operator.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-03-18 10:51:44 -07:00
Mark Schulte 647bd2839e [modules] Add kconfig module
Add a kconfig module to allow meson to integrate with existing projects
that use kconfig.
2019-03-15 11:42:36 +01:00
Dylan Baker e7c4601fe3 tests: disable Dlang tests on windows
These don't work and no one has fixed them. When I've tried to
download dmd for windows I can't get a valid installer from their
website. Let's at least turn the CI green.
2019-03-13 23:18:09 +02:00
Michael Hirsch, Ph.D 71cffa67fa add NetCDF 2019-02-28 22:13:38 +02:00
Jussi Pakkanen a81207881b Disable D tests if dmd install is broken. 2019-02-26 01:26:54 +02:00
Dylan Baker 097faee83b run_project_tests: add support for loading cross files 2019-02-04 14:42:55 -08:00
Dylan Baker 30cf4f9c3a run_project_tests: Add support for loading a native file in tests
The file must be called nativefile.txt
2019-02-04 14:42:55 -08:00
Nirbheek Chauhan 042f5638bf project tests: qt is available on the macOS CI 2019-02-01 00:14:09 +05:30
Jussi Pakkanen 8eca221aac More tests and pic. 2019-01-21 23:35:38 +02:00
Dylan Baker 978e6fb88f tests: Add tests for the python module
This doesn't touch everything as it's just based on the python3 module
tests, ported to the python module. It's still better than the one very
basic test in the unit test module.
2018-12-12 12:23:37 -08:00
Jon Turney 94cdb68a3a
Deal with clang-cl generating empty implibs
Deal with clang-cl doing the sane (but different to MSVC) thing, of
generating an empty import library, rather than silently ignoring
/IMPLIB when there are no exports.
2018-11-06 13:19:44 +00:00
Jon Turney 5d51329d27
Extend test to when both name_{suf,pre}fix: are used 2018-11-06 13:17:21 +00:00
Jon Turney b17f6dae54
Add a test of installed library names when name_{suf,pre}fix: is used
Extend platform_fix_name() to handle this case

We avoid using library(version:), so we don't have to teach
platform_fix_name() all the platform details of versioned shared library
naming.  Hopefully that's exercised by platform-specific tests...
2018-11-06 13:17:12 +00:00
Jon Turney 3c38e46774
Use compiler detector in detect_system_compiler()
Use the compiler detector in detect_system_compiler(), rather than trying to
guess based on what it is the PATH (which could utterly fail e.g when CC env
var is set)

Note that this detection is only used by platform_fix_name() to interpret
installed_files.txt
2018-11-04 15:42:06 +00:00
Jussi Pakkanen 252bf6c52e
Merge pull request #4340 from jon-turney/azure-pipelines
Add Azure pipelines CI
2018-10-14 23:16:46 +03:00
Jon Turney 459b81de46
Use 'CI' environment variable to detect CI environment
Use the 'CI' environment variable to detect CI environment, rather than a
collection of CI-specific ones.
2018-10-14 16:01:36 +01:00
Niklas Claesson d964da79e7 tests: Merge backend guessing into one function 2018-10-10 21:32:02 +02:00
Niklas Claesson 4911a51aa2 Add option to fail fast in tests 2018-10-10 21:19:06 +02:00
Xavier Claessens 37067a53c4 Use a single ArgumentParser for all subcommands
This has the adventage that "meson --help" shows a list of all commands,
making them discoverable. This also reduce the manual parsing of
arguments to the strict minimum needed for backward compatibility.
2018-10-04 09:40:21 -04:00
Guillermo Ignacio Enriquez Gutierrez 5262aac977 Skip all dot files/directories when running tests 2018-09-25 01:14:48 +09:00
Guillermo Ignacio Enriquez Gutierrez b8581b7b67 Fix test script to be able to run in local macos 2018-09-22 22:45:34 +09:00
Marco Trevisan (Treviño) 0fc9a60189 run_proect_tests: add cygwin as platform fix name 2018-09-14 22:35:46 +02:00
Marco Trevisan (Treviño) 81e7a0981b run_project_tests: remove pdb workaround, just use filters
And ignore .dll.a files in non cygwin gcc instances
2018-09-14 20:19:35 +02:00
Marco Trevisan (Treviño) c677925dc1 run_projects_tests: Fail if we install extra files even if not in cl
As per commit 2340fd3, unexpected installed files are not reported anymore when
using compilers other than 'cl', this regression was introduced in the attempt
of not reporting extra .pdb files, but actually caused any non extra .pdb file
in other compilers to be ignored.

Fix boolean test, by reporting any extra file a part '.pdb' ones under non 'cl'
compiler, while anyone under 'cl'.
2018-09-12 21:31:26 -05:00
Jussi Pakkanen e8932adb14 Do not scan test logs. Closes #4046. 2018-08-19 14:00:40 +03:00
Jussi Pakkanen 11b520feda Scan markdown files for tabs. 2018-08-19 14:00:40 +03:00
Jussi Pakkanen 972535a6ac Condense test dirs. 2018-08-19 12:39:46 +03:00
Jussi Pakkanen b400cbe058 Kill tabs dead! For good! 2018-08-15 22:28:42 +03:00
Jussi Pakkanen 17bfbb99e5 Condense test dirs. 2018-07-31 19:22:24 +03:00
Jussi Pakkanen 2bc0f56b21 Write full directory name in files so script will change them. 2018-07-31 19:17:49 +03:00
Xavier Claessens f4d60acaa9 Remove had_argument_for() it is not used anymore
This also means we don't need to keep original command line arguments
anymore.
2018-06-06 20:02:37 +00:00
Filipe Brandenburger 862e1dd838 Add test case for 'install_mode'
This is a simple test case, checking for installed_files.txt, which just
makes sure the syntax is accepted.

Manual tests confirmed the permissions were set correctly.

A follow up commit adds a unit test based on this directory.
2018-06-02 04:50:32 +00:00
Nirbheek Chauhan 0a035dea6d Set the meson command to use when we know what it is
Instead of using fragile guessing to figure out how to invoke meson,
set the value when meson is run. Also rework how we pass of
meson_script_launcher to regenchecker.py -- it wasn't even being used

With this change, we only need to guess the meson path when running
the tests, and in that case:

1. If MESON_EXE is set in the env, we know how to run meson
   for project tests.
2. MESON_EXE is not set, which means we run the configure in-process
   for project tests and need to guess what meson to run, so either
   - meson.py is found next to run_tests.py, or
   - meson, meson.py, or meson.exe is in PATH

Otherwise, you can invoke meson in the following ways:

1. meson is installed, and mesonbuild is available in PYTHONPATH:
   - meson, meson.py, meson.exe from PATH
   - python3 -m mesonbuild.mesonmain
   - python3 /path/to/meson.py
   - meson is a shell wrapper to meson.real
2. meson is not installed, and is run from git:
   - Absolute path to meson.py
   - Relative path to meson.py
   - Symlink to meson.py

All these are tested in test_meson_commands.py, except meson.exe since
that involves building the meson msi and installing it.
2018-06-01 19:20:04 +00:00
Mathieu Duponchelle 14750b50ea configure_file: Add output_format kwarg (#3636)
* configure_file: Add output_format kwarg

* docs: Reference-manual.md output_format was added in 0.47 [skip ci]
2018-06-01 17:53:07 +00:00
Nirbheek Chauhan f56b402a5b Revert "mesonlib: handle meson exe wrappers"
This reverts commit 0627e9d616.

Breaks installation: https://github.com/mesonbuild/meson/issues/3647

Will be restored once that can be fixed.
2018-05-31 15:40:10 +05:30
Martin Kelly 0627e9d616 mesonlib: handle meson exe wrappers
There are cases when it is useful to wrap the main meson executable with
a script that sets up environment variables, passes --cross-file, etc.
For example, in a Yocto SDK, we need to point to the right meson.cross
so that everything "just works", and we need to alter CC, CXX, etc. In
such cases, it can happen that the "meson" found in the path is actually
a wrapper script that invokes the real meson, which may be in another
location (e.g. "meson.real" or similar).

Currently, in such a situation, meson gets confused because it tries to
invoke itself using the "meson" executable (which points to the wrapper
script) instead of the actual meson (which may be called "meson.real" or
similar). In fact, the wrapper script is not necessarily even Python, so
the whole thing fails.

Fix this by using Python imports to directly find mesonmain.py instead
of trying to detect it heuristically. In addition to fixing the wrapper
issue, this should make the detection logic much more robust.
2018-05-30 18:29:16 +00:00
Niklas Claesson ecbeae565b Enable running tests that fail at 'meson test' 2018-05-23 23:30:07 +03:00
Niklas Claesson ceeae58225 Prettifying some output with pathlib 2018-04-26 23:14:58 +03:00
Jussi Pakkanen 824650411e Final encoding fix.
I sincerely hope sufficient amounts of goats have now been sacrificed
at the altar of Debian Locales so things will actually work and I
can get to sleep.
2018-04-23 01:40:20 +03:00
Jussi Pakkanen c7e2549e59 If printing debug printing fails, try again in pure ASCII. 2018-04-23 00:02:17 +03:00
Jussi Pakkanen 166ed40097 Explicitly open log files in utf-8. 2018-04-22 21:53:22 +03:00
Elliott Sales de Andrade 8dd6b8c7ed Fix install checks when cross-compiling.
It checks the build machine for the correct extensions of resulting
binaries, but it should be checking the host machine.
2018-04-21 16:58:55 +03:00
Jukka Laurila 31df4ae164 Default run_project_tests backend to ninja instead of xcode on OS X.
The xcode backend is still incomplete and fails many tests.
2018-03-09 00:26:14 +02:00
Jon Turney 16f80b4c50 Enable 'test cases/frameworks/10 gtk-doc' for gtkdoc >= 1.26
Enable 'test cases/frameworks/10 gtk-doc' if gtkdoc version is 1.26 or
later.

Old versions of gtkdoc-scan also output the version to stdout rather than
stderr, so be sure to handle that...
2018-02-27 20:43:51 +02:00
Jussi Pakkanen 67f3f80362 Determining whether to run C# tests is so difficult it deserves its own function. 2018-02-25 12:15:59 +02:00
Thibault Saunier c48b9594ff Add support for Visual Studio csc c# compiler 2018-02-25 01:10:52 +02:00
Jon Turney 0097ce4c4e Always run all framework tests on all platforms
Always run all framework tests on all platforms, but allow them to be
skipped when not running under CI for linux.
2018-02-21 17:11:25 +00:00