summaryrefslogtreecommitdiff
path: root/run_unittests.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix various small test failures on macOSnirbheek/fix-dependency-exceptionNirbheek Chauhan2018-08-201-1/+10
| | | | | | These weren't caught by the CI because we have pkg-config on it, and these were testing non-pkg-config codepaths. The unity build on macOS now doesn't have pkg-config to ensure that the codepath is tested.
* Condense test dirs.Jussi Pakkanen2018-08-191-43/+43
|
* Merge pull request #4030 from 3v1n0/broken-symlink-install-with-mode-fixJussi Pakkanen2018-08-181-6/+16
|\ | | | | Fix broken symlinks install when using install_umask or install_mode
| * unittests: test_install_subdir_symlinks_with_default_umaskMarco Trevisan (TreviƱo)2018-08-171-6/+16
| | | | | | | | | | | | | | | | Add test to verify the installation of broken symlinks when a default_umask is set. Reusing the same code of other test, thus sharing the actual test code in a single function.
* | Convert buildtype to optimization and debug options (#3489)Jussi Pakkanen2018-08-181-0/+35
| |
* | wraptool: fix manual selection of wrap file to promoteDaniel Pirch2018-08-171-0/+17
|/ | | | | | | | | | | Fixed manually promoting wrap files with a full path, e.g. `meson wrap promote subprojects/s1/subprojects/projname.wrap`, which resulted in an error before (new test added: `./run_unittests.py AllPlatformTests.test_subproject_promotion_wrap`). Additionally, running promote with an invalid subproject path now fails properly. Before, it just silently did nothing (added to test: `./run_unittests.py AllPlatformTests.test_subproject_promotion`).
* install_subdir: Also copy dangling symlinksNirbheek Chauhan2018-08-151-0/+26
| | | | Fixes https://github.com/mesonbuild/meson/issues/3914
* Merge pull request #4001 from mikezackles/cpp2aJussi Pakkanen2018-08-111-1/+7
|\ | | | | Add support for c++2a and gnu++2a (closes #3997)
| * Try appleclang 9.1 for both c++17 and c++2aZachary Michaels2018-08-091-2/+2
| |
| * Don't test for c++2a on gcc versions that don't support itZachary Michaels2018-08-091-0/+2
| |
| * Add support for c++2a and gnu++2aZachary Michaels2018-08-091-0/+4
| |
* | Fix FeatureNew false positive in vcs_tagNirbheek Chauhan2018-08-111-0/+10
| | | | | | | | Fixes https://github.com/mesonbuild/meson/issues/3904
* | Merge pull request #3657 from jon-turney/consolidate-dependency-check-reportNirbheek Chauhan2018-08-111-7/+7
|\ \ | | | | | | Consolidate reporting the result of a dependency check
| * | Update a unit test which relies on specific dependency check outputJon Turney2018-08-011-7/+7
| | |
* | | PkgConfigDependency: Don't try to resolve internal compiler libsNirbheek Chauhan2018-08-111-2/+23
| |/ |/| | | | | | | | | | | -lc -lm -ldl -lrt -lpthread are special linker arguments that should never be resolved to on-disk libraries. Closes https://github.com/mesonbuild/meson/issues/3879
* | PkgConfigDependency: Fix library path search orderNirbheek Chauhan2018-08-081-0/+44
| | | | | | | | | | | | | | We were searching the library paths in the reverse order, which meant that we'd pick libraries from the wrong prefix. Closes https://github.com/mesonbuild/meson/issues/3951
* | Test that vim syntax highlighting is up-to-dateNirbheek Chauhan2018-08-071-74/+95
| | | | | | | | | | | | | | Needs a `mock` kwarg to Interpreter to not do any parsing of build files, but only setup the builtins and functions. Also consolidate the documentation and data tests into one class.
* | Merge pull request #3945 from mesonbuild/dircondenserJussi Pakkanen2018-08-041-47/+47
|\ \ | |/ |/| Condense directory names with script.
| * Condense test dirs.Jussi Pakkanen2018-07-311-47/+47
| |
* | Merge pull request #3850 from mesonbuild/nirbheek/exe-wrapper-compiler-fallbacksJussi Pakkanen2018-07-311-7/+58
|\ \ | |/ |/| Be more permissive about not-found exe_wrapper
| * cross: Be more permissive about not-found exe_wrappernirbheek/exe-wrapper-compiler-fallbacksNirbheek Chauhan2018-07-091-7/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to immediately try to use whatever exe_wrapper was defined in the cross file, but some people generate the cross file once and use it for several projects, most of which do not even need an exe wrapper to build. Now we're a bit more resilient. We quietly fall back to using non-exe-wrapper paths for compiler checks and skip the sanity check. However, if some code needs the exe wrapper, f.ex., if you run a built executable using custom_target() or run_target(), we will error out during setup. Tests will, of course, continue to error out when you run them if the exe wrapper was not found. We don't want people's tests to silently "pass" (aka skip) because of a bad CI setup. Closes https://github.com/mesonbuild/meson/issues/3562 This commit also adds a test for the behaviour of exe_wrapper in these cases, and refactors the unit tests a bit for it.
* | Move test from common to unit.Rafael Ɓvila de Espƭndola2018-07-271-1/+1
| | | | | | | | | | When I initially added the test the intention was to use it from run_unittests.py only, but I placed it in the wrong directory.
* | Make the rpath order deterministic. (#3932)Rafael Ɓvila de Espƭndola2018-07-251-0/+19
| |
* | Make the dependency order deterministic. (#3927)Rafael Ɓvila de Espƭndola2018-07-221-0/+13
| | | | | | | | | | | | | | We were using sets to store the dependencies. Just switch to OrderedSet. Fixes #3922.
* | Merge pull request #3814 from behlec/configure-file-outputJussi Pakkanen2018-07-191-0/+4
|\ \ | | | | | | Check if calls to configure_file write to the same output file.
| * | Fix regexp for warningChristoph Behle2018-07-091-2/+2
| | |
| * | Add tests for warnings in configure_file()Christoph Behle2018-07-081-0/+4
| |/ | | | | | | | | Add tests to run_unittests.py to assert warnings are printed and not printed where appropriate.
* | find_library: Validate and sort globbed shared library filesNirbheek Chauhan2018-07-101-4/+20
| | | | | | | | | | | | | | We need to pick the library with the highest version, which is what the OpenBSD linker also does. https://github.com/mesonbuild/meson/issues/3570#issuecomment-403638752
* | Fix directory verification. Closes #3857.Jussi Pakkanen2018-07-091-0/+18
| |
* | Fix searching of shared libraries on OpenBSD (#3851)Nirbheek Chauhan2018-07-091-1/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * get_library_naming: Use templates instead of suffix/prefix pairs This commit does not change functionality, and merely sets the groundwork for a more flexibly naming implementation. * find_library: Fix manual searching on OpenBSD On OpenBSD, shared libraries are called libfoo.so.X.Y where X is the major version and Y is the minor version. We were assuming that it's libfoo.so and not finding shared libraries at all while doing manual searching, which meant we'd link statically instead. See: https://www.openbsd.org/faq/ports/specialtopics.html#SharedLibs Now we use file globbing to do searching, and pick the first one that's a real file. Closes https://github.com/mesonbuild/meson/issues/3844 * find_library: Fix priority of library search in OpenBSD Also add unit tests for the library naming function so that it's absolutely clear what the priority list of naming is. Testing is done with mocking on Linux to ensure that local testing is easy
* | Document options for mesonChristoph Behle2018-07-081-0/+15
|/ | | | | | | | | | | | | | | | | | | Document what waring_level 1,2,3 means. Test if markdown files are in sitemap Add Builtin-options.md to sitemap.txt Builtin-options.md: Fix tables in Builtin-options.md Add documentation for warning options Added more options to doc General documentation: Add link to Builtin-options Remove obsolete file Testing: Add function test_markdown_files_in_sitemap. Checks if each markdown file is contained in sitemap.txt
* Raise a MesonException when substituting an invalid valueNirbheek Chauhan2018-07-071-0/+1
| | | | Avoids throwing a traceback. Also, warn when setting such a value.
* run_unittests.py: Test that empty cdata subst are actually doneNirbheek Chauhan2018-07-051-0/+4
| | | | Improved test for https://github.com/mesonbuild/meson/issues/3826
* configure_file: Don't optimize away substitutionsNirbheek Chauhan2018-07-041-1/+12
| | | | | | | | | | | It's possible that the configuration data object has components added conditionally, and that sometimes an empty configuration data object is passed on purpose. Instead, we do the substitution and also warn if no tokens were found that could've been substituted. Closes https://github.com/mesonbuild/meson/issues/3826
* FeatureNew: Make all checks subproject-specificNirbheek Chauhan2018-07-021-0/+20
| | | | | | | | | | | | We now pass the current subproject to every FeatureNew and FeatureDeprecated call. This requires a bunch of rework to: 1. Ensure that we have access to the subproject in the list of arguments when used as a decorator (see _get_callee_args). 2. Pass the subproject to .use() when it's called manually. 3. We also can't do feature checks for new features in meson_options.txt because that's parsed before we know the meson_version from project()
* Add some tests for FeatureNewMathieu Duponchelle2018-07-021-8/+33
|
* Don't let build_always take precedence over build_by_default (#3816)Andrei Alexeyev2018-07-011-5/+11
| | | | | | | | * Don't let build_always take precedence over build_by_default * Test for proper interaction of build_by_default with build_always Fixes #3815
* Allow command lists for find_program cross file overridesNirbheek Chauhan2018-07-011-2/+3
| | | | | | | | This is accepted by all other binaries in the cross file. With this change, we also don't check whether the specified command exists at configure time, but that's probably a feature anyway. Fixes https://github.com/mesonbuild/meson/issues/3737
* Options: treat array option -Dopt= and -Dopt=[] as equivalentDylan Baker2018-06-291-0/+20
| | | | | | | Currently the former will be parsed as [''], while the latter is parsed as [] in python. This makes for some obnoxious special handling depending on what the user passes. This is even more obnoxious since for string type arguments this doesn't require special handling.
* Validate cpu_family (#3753)Ross Burton2018-06-201-0/+19
| | | | | | | | | | | | | | | | | | * environment: validate cpu_family in cross file * run_unittests: add unittest to ensure CPU family list in docs and environment matches * run_unittests: skip compiler options test if not in a git repository * environment: validate the detected cpu_family * docs: add 32-bit PowerPC and 32/64-bit MIPS to CPU Families table Names gathered by booting Linux in Qemu and running: $ python3 import platform; platform.machine() Partial fix for #3751
* Downgrade unknown option from exception to warningXavier Claessens2018-06-191-5/+3
| | | | | | | It used to be non-fatal warnings but recent command line refactor made it fatal. It looks like GNOME continuous would break with this change. To avoid delaying upcoming 0.47.0 release adoption, let's downgrade this back to warning for now and reconsider after the release.
* meson_install: Don't add DESTDIR to install_nameNirbheek Chauhan2018-06-181-2/+15
| | | | | | | This was added accidentally. Includes a test for it. Also fix a rebase error. The variable was defined incorrectly and was overwritten with the correct value immediately afterwards.
* unittests: Assert that we have pkg-config on all CINirbheek Chauhan2018-06-181-5/+12
| | | | | | | Our appveyor configuration provides pkg-config when building for mingw, cygwin, msvc, etc. Of course, people manually running the tests won't require pkg-config.
* macos: Rewrite install_name for dependent built libraries on installNirbheek Chauhan2018-06-181-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | On macOS, we set the install_name for built libraries to @rpath/libfoo.dylib, and when linking to the library, we set the RPATH to its path in the build directory. This allows all built binaries to be run as-is from the build directory (uninstalled). However, on install, we have to strip all the RPATHs because they point to the build directory, and we change the install_name of all built libraries to the absolute path to the library. This causes the install name in binaries to be out of date. We now change that install name to point to the absolute path to each built library after installation. Fixes https://github.com/mesonbuild/meson/issues/3038 Fixes https://github.com/mesonbuild/meson/issues/3077 With this, the default workflow on macOS matches what everyone seems to do, including Autotools and CMake. The next step is providing a way for build files to override the install_name that is used after installation for use with, f.ex., private libraries when combined with the install_rpath: kwarg on targets.
* Test that binaries that use external libraries workNirbheek Chauhan2018-06-181-13/+52
| | | | | | | | | | | When we link to an external library either with find_library() without any dirs:, or with dependency(), we should be able to run uninstalled out of the box without having to set any environment variables or other shenanigans. This is especially important on macOS because only the system frameworks directory is in the default runtime path, and all other frameworks and libraries need to be found with RPATH or absolute path to the dylib.
* Fix options being reset to default on reconfigureXavier Claessens2018-06-091-0/+5
| | | | Closes: #3712
* Add a unit test for `meson introspect --installed`Nirbheek Chauhan2018-06-081-0/+3
|
* More clearly explain portability issues with linking to a moduleJon Turney2018-06-071-2/+5
| | | | | | | | | | | | | | | | | | | | | Refine #3277 According to what I read on the internet, on OSX, both MH_BUNDLE (module) and MH_DYLIB (shared library) can be dynamically loaded using dlopen(), but it is not possible to link against MH_BUNDLE as if they were shared libraries. Metion this as an issue in the documentation. Emitting a warning, and then going on to fail during the build with mysterious errors in symbolextractor isn't very helpful, so make attempting this an error on OSX. Add a test for that. See also: https://docstore.mik.ua/orelly/unix3/mac/ch05_03.htm https://stackoverflow.com/questions/2339679/what-are-the-differences-between-so-and-dylib-on-osx
* Add unit test for option precedenceXavier Claessens2018-06-061-1/+27
| | | | Closes #3456.
* Convert args.projectoptions into a dictXavier Claessens2018-06-061-19/+41
| | | | | | | | | | | | | | | | | This simplifies a lot of code, and centralize "key=value" parsing in a single place. Unknown command line options becomes an hard error instead of merely printing warning message. It has been warning it would become an hard error for a while now. This has exceptions though, any unknown option starting with "<lang>_" or "b_" are ignored because they depend on which languages gets added and which compiler gets selected. Also any option for unknown subproject are ignored because they depend on which subproject actually gets built. Also write more command line parsing tests. "19 bad command line options" is removed because bad cmd line option became hard error and it's covered with new tests in "30 command line".