summaryrefslogtreecommitdiff
path: root/run_unittests.py
Commit message (Collapse)AuthorAgeFilesLines
* mtest: TAP: ignore empty linesMarc-André Lureau2019-09-231-0/+6
| | | | | | | | | | | | | According to http://testanything.org/tap-specification.html "Any output line that is not a version, a plan, a test line, a diagnostic or a bail out is considered an “unknown” line. A TAP parser is required to not consider an unknown line as an error but may optionally choose to capture said line and hand it to the test harness, which may have custom behavior attached [...] TAP::Harness reports TAP syntax errors at the end of a test run". (glib gtest can generate empty lines)
* pkgconfig: Fix ordering of public librariesXavier Claessens2019-09-171-0/+4
| | | | | | The main library must come before extra libraries, because they are likely to be dependencies of the main library that get promoted from private to public. This was causing static link issues with glib-2.0.pc.
* mconf: Fix meson configure crash (fixes #5909)Daniel Mensinger2019-09-131-0/+4
|
* unitests: dont assume cc exists or is validDylan Baker2019-09-091-20/+27
| | | | | | On illumos (and presumably Solaris, though I can't test) cc normally points to Sun CC, which we don't support. So ensure that gcc is used explicitly in that case.
* Fix static archives stripping (#5905)David Seifert2019-09-081-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | * Do not strip static archives Stripping static archives without more fine-grained options (e.g. `-g`) leads to failures such as ld: libfoo.a: error adding symbols: archive has no index; run ranlib to add one because GNU strip removes *every* symbol in a static archive by default. Given that static archives are not final build artifacts (unlike executables and shared libraries), stripping them gains little and only causes more edge case failures. * Gentoo's portage only strips debug information: https://github.com/gentoo/portage/blob/86f211e3a552753eb945670a39c1a3b14c3c3bd1/bin/estrip#L322 * Fedora also only strips debug information: https://github.com/rpm-software-management/rpm/blob/e9c13c6565cf4782d1f73255ee9144dd9bd2aca7/scripts/brp-strip-static-archive#L18 * Debian also only does some very light stripping: https://github.com/Debian/debhelper/blob/72ed1d3261730d56da6afde0ec7f52f32976e04d/dh_strip#L374 Fixes #4138 * Add test case for static archive stripping
* Rename 'rpath-link secondary' unit testDavid Seifert2019-09-081-1/+1
|
* Add `-Wl,-rpath-link` for secondary dependenciesDavid Seifert2019-09-061-0/+39
|
* mesonlib.split_args/quote_arg/join_argsAleksey Gurtovoy2019-09-051-10/+106
|
* compilers: Move the compiler argument to proxy linker flags to the compiler ↔Dylan Baker2019-08-301-1/+1
| | | | | | | | | | | | class Instead of the DynamicLinker returning a hardcoded value like `-Wl,-foo`, it now is passed a value that could be '-Wl,', or could be something '-Xlinker=' This makes a few things cleaner, and will make it possible to fix using clang (not clang-cl) on windows, where it invokes either link.exe or lld-link.exe instead of a gnu-ld compatible linker.
* Fix packaging. [skip ci]Jussi Pakkanen2019-08-261-0/+2
|
* unittests: Create a fake DynamicLinker when necessaryDylan Baker2019-08-141-1/+2
|
* environment: Detect dynamic linker classDylan Baker2019-08-141-1/+2
|
* unittests: add b_lundef=false to address sanitizer testDylan Baker2019-08-141-1/+1
| | | | | | | Clang doesn't really like having no-undefined plus the address sanitizer, but gcc doesn't mind. This all happens to work with clang + gnu ld, but with clang + apple ld this turns into a dumpster fire. Just add b_lundef=false to make everyone happy.
* run_unittests: extend binary wrapper creater for Wl,--versionDylan Baker2019-08-141-3/+4
| | | | which is needed by swift.
* Add is_disabler functionJames Hilliard2019-08-121-0/+10
| | | | | | This is useful if one needs to check if a variable is a disabler. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
* Made build. options alias basic ones when native building.Jussi Pakkanen2019-08-061-12/+16
|
* Made set_option kwargs named-only.Jussi Pakkanen2019-08-061-1/+1
|
* Condense test directory names.Jussi Pakkanen2019-08-031-68/+68
|
* unit tests: Convert unittest args to pytestNirbheek Chauhan2019-07-261-0/+16
| | | | Allows people to run specific tests and/or enable verbose mode.
* Create multiple different archive types with dist.Jussi Pakkanen2019-07-231-4/+12
|
* unit tests: Check whether pytest-xdist is availableNirbheek Chauhan2019-07-201-5/+4
| | | | | | | Also, always run pytest using the module format to ensure that we're always using the Python interpreter selected by the user. Fixes issue reported in https://github.com/mesonbuild/meson/pull/5621#issuecomment-513034198
* unit tests: Use a timeout for tests that use the networkNirbheek Chauhan2019-07-201-1/+7
| | | | It's better to quickly skip when the network is unavailable or slow.
* unit tests: Test more syntax highlighting dataNirbheek Chauhan2019-07-181-3/+38
| | | | | | | | | | @TingPing has a repository that contains a grammar for meson which is used by linguist (GitHub), and by many editors such as Atom, VS Code, TextMate, Sublime Text, etc. Add CI so that we notice that the function list in it is out of date, such as https://github.com/TingPing/language-meson/pull/3 It's harder to do this generically for other syntax such as the `in` keyword, but it's better than nothing.
* mintro: Fix section key in buildoptionsDaniel Mensinger2019-07-171-0/+9
| | | | | | | | | | This reverts the changes to the `section` key for the buildoptions and moves the machine choice into it's own `machine` key. With this commit the __undocumented__ breaking change to the introspection format (introduced in 0.51.0) is reverted and a new key is added instead.
* run_unittests: use sys.executable on Windows for pythonDylan Baker2019-07-151-4/+1
| | | | | | Instead of trying to guess whether we need py or python3, and then falling over when whatever we guessed isn't in the path or isn't right, just use sys.executable which should always work.
* Add test to catch `-Werror=unused-parameter` brittlenessDavid Seifert2019-07-141-2/+9
|
* unit tests: Don't keep builddirs inside source tree on CygwinNirbheek Chauhan2019-07-121-1/+9
| | | | | Seems to cause the umask tests to fail: https://github.com/mesonbuild/meson/pull/5546#issuecomment-509666523
* Merge pull request #5560 from scivision/cstd18_bugMichael Hirsch, Ph.D2019-07-111-10/+54
|\ | | | | add clang c_std=c18 alias and cleanup logic for compiler version unit tests
| * typoMichael Hirsch, Ph.D2019-07-081-3/+3
| |
| * cleanup clang version minimumMichael Hirsch, Ph.D2019-07-081-31/+51
| |
| * add clang c_std=c18 aliasMichael Hirsch, Ph.D2019-07-081-12/+36
| | | | | | | | | | | | | | | | | | | | fix unit test skips for clang c18 correct unittests clang minimum version cleanup unittest clang skip c_std finesse unittest vs. clang version
* | Merge pull request #5606 from xclaesse/alias_targetJussi Pakkanen2019-07-111-0/+13
|\ \ | | | | | | Add alias_target() function
| * | Add alias_target() functionXavier Claessens2019-07-101-0/+13
| | |
* | | Use pytest parallelisation if available.Jussi Pakkanen2019-07-091-1/+12
|/ /
* | unit tests: Fix CI failures in NativeFileTestsNirbheek Chauhan2019-07-091-1/+1
|/ | | | | We can't rely on 'py' always being available in PATH, use sys.executable which is the real path to Python 3.
* Hack envvar override when running tests in-process.Jussi Pakkanen2019-07-081-2/+8
|
* Use environment variable overrides.Jussi Pakkanen2019-07-081-80/+125
|
* Convert some methods to use mandatory named kwargs.Jussi Pakkanen2019-07-081-26/+26
|
* Fix unittests.fixed5483Jussi Pakkanen2019-07-051-6/+7
|
* mintro: Add installed subdirs introspection (fixes #5556)Daniel Mensinger2019-07-011-0/+28
|
* Fix failing test_find_program test (Windows-only)Aleksey Gurtovoy2019-06-271-5/+8
| | | | | Skip finding a .py script w/o extension on Windows if `.PY` isn't in PATHEXT; closes #4355
* Fix faling test_msvc_toolset_version testAleksey Gurtovoy2019-06-271-2/+6
| | | | | VCToolsVersion is not always set, and MS docs recommend getting the info from a file
* run_unitests: Skip the native_file_is_pipe test on cygwinDylan Baker2019-06-241-1/+2
| | | | Since it hangs and causes azure to time out.
* Keep all build dirs inside the source tree.Jussi Pakkanen2019-06-241-1/+1
| | | | | VS and virus scanners complain when generating executables in temporary directories.
* coredata: Correctly handle receiving a pipe for native/cross filesDylan Baker2019-06-231-2/+25
| | | | | | | | | | | | | | | | | | * coredata: Correctly handle receiving a pipe for native/cross files In some cases a cross/native file may be a pipe, such as when using bash process replacement `meson --native-file <([binaries]llvm-config='/opt/bin/llvm-config')`, for example. In this case we copy the contents of the pipe into a file in the meson-private directory so we can create a proper ninja dependency, and be able to reload the file on --wipe/--reconfigure. This requires some extra negotiation to preserve these native/cross files. Fixes #5505 * run_unitests: Add a unit test for native files that are pipes Using mkfifo.
* compilers: Fix bitcode and other options for objc codeNirbheek Chauhan2019-06-231-7/+10
| | | | | | | | | | | | We were setting the base options for the Objective-C compiler manually, due to which options such as b_bitcode and b_ndebug were not getting set at all. The base options here are the same as for C code with the Clang compiler, so just use the same inherited list. Also expand the bitcode test to ObjC and ObjC++ so this doesn't happen again.
* Make test for identityJohn Ericson2019-06-091-0/+12
| | | | (cherry picked from commit ae6426cd8acfe0ccc5d7958d55edb613b4a5bf01)
* Purge `is_cross` and friends without changing user interfacesJohn Ericson2019-06-091-43/+41
| | | | | | | | | | | | In most cases instead pass `for_machine`, the name of the relevant machines (what compilers target, what targets run on, etc). This allows us to use the cross code path in the native case, deduplicating the code. As one can see, environment got bigger as more information is kept structured there, while ninjabackend got a smaller. Overall a few amount of lines were added, but the hope is what's added is a lot simpler than what's removed.
* Add tests for std usage. Closes #5097.Jussi Pakkanen2019-06-051-0/+16
| | | | (cherry picked from commit 27ae70dfaaff1298e68df70098acaa96f7ca748a)
* Per machine do 'build.' and '' option prefixesJohn Ericson2019-06-051-4/+9
| | | | See the docs/ changes for details.