aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
AgeCommit message (Collapse)AuthorFilesLines
2017-08-15Add a test for dirs with reserved target namesNirbheek Chauhan1-0/+13
And for dirs with the same name as run_target()s Reproduces https://github.com/mesonbuild/meson/issues/1644
2017-08-15run_unittests: Add a helper for asserting path existenceNirbheek Chauhan1-17/+25
It is useful to have a message displayed if the assert is fired.
2017-08-14Use "meson test" in test invocations so it will not print the deprecation ↔Jussi Pakkanen1-1/+1
warning.
2017-08-13unit tests: Select test cases inside run_unittests.pyNirbheek Chauhan1-2/+11
This allows people to directly run ./run_unittests.py without having to worry about selecting the right test cases for the platform they are on.
2017-08-02Print deprecation warnings on old style commands.Jussi Pakkanen1-2/+2
2017-07-24Ensure same compiler flags are used for compiling PCH as normal sourcesGabrĂ­el ArthĂșr PĂ©tursson1-0/+7
Precompiled headers should generally be compiled with the same flags as the sources that will include the header. Some deviations are safe, however, most will cause the compiler to reject the precompiled header or possibly lead to compiler crashes.
2017-07-23find_library: Ignore libs on MSVC properlyNirbheek Chauhan1-0/+17
In addition to filtering libs out while generating the command-line, we must also filter them out in find_library() otherwise these libs will be detected as "found" on Windows with MSVC. Closes https://github.com/mesonbuild/meson/issues/1509
2017-07-21Add build_rpath as new property allowing people to specify rpath entries ↔Jussi Pakkanen1-0/+11
that are used in the build tree but will be removed on install.
2017-07-20Add a mesonintrospect --dependencies testMartin Ejdestig1-0/+22
2017-07-17unittests: Don't pass /nologo to `cl` during detectionNirbheek Chauhan1-1/+1
This causes it to not output the version information to stderr, which we need to extract the version and the architecture. Found by Jussi.
2017-07-17unittests: Check value of cc.is_64 with MSVCNirbheek Chauhan1-0/+9
2017-07-17unittests: Ensure that the compiler version is not blankNirbheek Chauhan1-0/+4
2017-06-23Split out languages from compilers.pyAlistair Thomas1-1/+1
2017-06-22Split linkers out from compilers.pyAlistair Thomas1-3/+3
2017-06-21Merge pull request #1920 from QuLogic/hg-distJussi Pakkanen1-10/+36
Add Mercurial dist support
2017-06-18Handle both pkg-config and pkgconf argument order. Closes #1934.Jussi Pakkanen1-8/+14
2017-06-18Merge pull request #1951 from mesonbuild/dedupfixJussi Pakkanen1-0/+9
Preserve standalone -D arguments
2017-06-18Preserve standalone -D arguments always.Jussi Pakkanen1-3/+4
2017-06-17Failing test for -D dedupping.Jussi Pakkanen1-0/+8
2017-06-17Use the Windows proof dir deleter consistently.Jussi Pakkanen1-5/+5
2017-06-13Add test for Mercurial dist'ing.Elliott Sales de Andrade1-10/+36
2017-06-12tests/unit/8: Rename to 9 and add -l flagsNirbheek Chauhan1-2/+5
2017-06-12Created unit test to ensure linker arguments from consecutive dependencies ↔Jussi Pakkanen1-0/+16
are kept in order.
2017-06-12Preserve -L -l pairings fetched from external depsNirbheek Chauhan1-0/+10
While adding link args for external deps, sometimes different libraries come from different prefixes, and an older version of the same library might be present in other prefixes and we don't want to accidentally pick that up. For example: /usr/local/lib/libglib-2.0.so /usr/local/lib/pkgconfig/glib-2.0.pc /usr/local/lib/libz.so /usr/local/lib/pkgconfig/zlib.pc /home/mesonuser/.local/lib/libglib-2.0.so /home/mesonuser/.local/lib/pkgconfig/glib-2.0.pc PKG_CONFIG_PATH="/home/mesonuser/.local/lib/pkgconfig/:/usr/local/lib/pkgconfig/" If a target uses `dependencies : [glib_dep, zlib_dep]`, it will end up using /usr/local/lib/libglib-2.0.so instead of /home/mesonuser/.local/lib/libglib-2.0.so despite using the pkg-config file in /home/mesonuser/.local/lib/pkgconfig because we reorder the -L flag and separate it from the -l flag. With this change, external link arguments will be added to the compiler list without de-dup or reordering. Closes https://github.com/mesonbuild/meson/issues/1718
2017-06-10tests: Add Boost unit tests and project tests on WindowsNirbheek Chauhan1-0/+13
Boost tests are disabled on Windows for now because the detection is actually completely broken. Once that's fixed (after the release) we can enable it again.
2017-06-10tests: Increase dependencies coverage a bit moreNirbheek Chauhan1-5/+61
2017-06-09tests: Improve llvm dependency test coverageNirbheek Chauhan1-0/+4
2017-06-09unit tests: Add class to generate failing testsNirbheek Chauhan1-11/+72
It is not feasible to test all failure modes by creating projects in `test cases/failing` that would be an explosion of files, and that mechanism is too coarse anyway. We have no way to ensure that the expected error is being raised. See FailureTests.test_dependency for an example.
2017-06-08Do not use context managers. Because Windows.Jussi Pakkanen1-9/+16
2017-06-07Merged needs_exe_wrapper branch.Jussi Pakkanen1-0/+30
2017-06-05unit tests: Skip tests if no readelf foundNirbheek Chauhan1-2/+6
2017-06-05unit tests: Also check RUNPATH when fetching RPATHNirbheek Chauhan1-2/+2
2017-06-05Use absolute RPATHs while linking due to a binutils bugNirbheek Chauhan1-0/+22
Use -rpath-link with the absolute paths to the respective build dirs to work around a binutils bug that causes $ORIGIN to not be used while linking. Includes a unit test that manually checks the RPATH value written out to ensure that it uses $ORIGIN. See: https://sourceware.org/bugzilla/show_bug.cgi?id=16936 Closes https://github.com/mesonbuild/meson/issues/1897
2017-06-05unit tests: Use only implementation of get_sonameNirbheek Chauhan1-18/+13
2017-06-02ninja: Use shlex.quote for quoting on non-WindowsNirbheek Chauhan1-8/+8
This is more reliable, and more accurate. For instance, this means arguments in commands aren't surrounded by `'` on Linux unless that is actually needed by that specific argument. There is no equivalent helper for Windows, so we keep the old behaviour for that.
2017-06-02ninja: De-dup libraries and use --start/end-groupNirbheek Chauhan1-1/+14
Now we aggressively de-dup the list of libraries used while linking, and when linking with GNU ld we have to enclose all static libraries with -Wl,--start-group and -Wl,--end-group to force the linker to resolve all symbols recursively. This is needed when static libraries have circular deps on each other (see included test). The --start/end-group change is also needed for circular dependencies between static libraries because we no longer recursively list out all library dependencies. The size of build.ninja for GStreamer is now down to 6.1M from 20M, and yields a net reduction in configuration time of 10%
2017-05-29environment: Add needs_exe_wrapper for overriding auto-detection.Ole André Vadla RavnÄs1-0/+30
This is useful when build_machine appears to be compatible with host_machine, but actually isn't. For example when: - build_machine is macOS and host_machine is the iOS Simulator - the build_machine's libc is glibc but the host_machine libc is uClibc - code relies on kernel features not available on the build_machine
2017-05-21Fix cross environment pollution.Ole André Vadla RavnÄs1-0/+21
Environment variables like CFLAGS and LDFLAGS should not affect the cross environment. Fixes #1772
2017-05-18Merge pull request #1810 from QuLogic/pycharm-warningsJussi Pakkanen1-2/+7
Fix various warnings found in PyCharm
2017-05-18Skip unittests that request it rather than mark them as failed. Closes #1804.Jussi Pakkanen1-0/+4
2017-05-17Add missing asserts in unit tests.Elliott Sales de Andrade1-0/+3
2017-05-17Remove unused variables.Elliott Sales de Andrade1-1/+0
2017-05-17Remove unused imports.Elliott Sales de Andrade1-1/+4
2017-05-12Add test and release notes.Jussi Pakkanen1-0/+42
2017-05-11pkgconfig: add suppport for custom variables during generationPeter Hutterer1-0/+2
Usage: pkgconfig.generate( ... description : 'A library with custom variables.', variables : ['foo=bar', 'datadir=${prefix}/data'] ) The variables 'prefix', 'libdir' and 'includedir' are reserved, meson will fail with an error message. Variables can reference each other with the pkgconfig notation, e.g. variables : ['datadir=${prefix}/data', 'otherdatadir=${datadir}/other'] meson does not check this for correctness or that the referenced variable exists, we merely keep the same order as specified.
2017-05-09project tests: Also regen before buildingNirbheek Chauhan1-9/+3
This actually caught a cached-dependency related bug for me that the test-time regen did not. I also increased the ninja wait time to 1 second because that's actually how long you need to sleep to be guaranteed that a change will be detected. Must poke upstream about https://github.com/ninja-build/ninja/issues/371
2017-05-04Use American English: behaviour -> behaviorPeter Hutterer1-1/+1
2017-04-23Unset compiler envvars in unit tests.Jussi Pakkanen1-0/+10
2017-04-20unit tests: Add a test case for LTO + static librariesNirbheek Chauhan1-0/+11
Tests https://github.com/mesonbuild/meson/issues/1646
2017-04-17Do not obliterate old rpath because it might be used due to read only data ↔Jussi Pakkanen1-0/+22
sharing. Closes #1619.