aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
AgeCommit message (Collapse)AuthorFilesLines
2021-01-20unittests: Remove double install for case 10Fini Jastrow1-5/+2
[why] In test case 10 the project is installed twice. This has been introduced with commit 55abe16 unit tests: Test that relative install_rpath works correctly where the cxx tests where added by copy and paste. [how] First test all build rpaths, then after install all install rpaths. [note] The aforementioned commit is a bit strange in that it adds a tests with a relative rpath with cxx files but not with c files. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-01-20ninjabackend: Correct RPATH orderFini Jastrow1-0/+22
[why] If we build and test a library we need to make sure that we find the currently build library object first, before an older system installed one. This can be broken if the library in question is installed in a custom path, and another library we depend on also is installed there. [how] Just move the rpath to the current build artifacts to the front. Solves #8030. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-01-19Keep buildtype the same even if user changes debug and/or optimization.Jussi Pakkanen1-41/+3
2021-01-18Fix cases where text leaks to stdout in unit tests.Jussi Pakkanen1-2/+2
2021-01-14coredata: Add missing nopromote wrap_mode choiceXavier Claessens1-0/+6
2021-01-13Fix misspellsAntonin Décimo1-2/+2
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2021-01-12summary: align left, not align middleEli Schwartz1-12/+12
aligning along the left is, I think, what most projects want to do. Aligning along the middle looks subjectively ugly, and objectively prevents me from further indenting an element, e.g. Build information: prefix : /usr sysconfdir : /etc conf file : /etc/myprogram.conf
2021-01-12Allow '//' as project function id due to git bash path conversion.Luke Elliott1-2/+2
See https://stackoverflow.com/questions/54258996/git-bash-string-parameter-with-at-start-is-being-expanded-to-a-file-path
2021-01-11boost: default machine file properties to env var valuesDylan Baker1-1/+1
This both moves the env reading to configuration time, which is useful, and also simplifies the implementation of the boost dependency. The simplification comes from being able to delete basically duplicated code since the values will be in the Properties if they exist at all.
2021-01-11Move BinaryTable environment lookups to EnvironmentDylan Baker1-17/+16
This means that all the env lookups are done once, at initial configure time. This has all of the expected advantages.
2021-01-11pull env to program mappings out of BinaryType classDylan Baker1-4/+4
These really aren't pivotal to that class, and they're used outside of it. In a follow up patch they're not going to be used inside it at all.
2021-01-11rename cflags_mapping to CFLAGS_MAPPINGDylan Baker1-1/+1
This is PEP8 convention for a const variable. Also, make the type Mapping, which doesn't have mutation methods. This means mypy will warn us if someone tries to change this.
2021-01-11unittests: Clang on windows can use either ld or link.exeDylan Baker1-2/+4
it generally uses the ld style linkers with msys2 and link.exe style linkers otherwise, but anything's possible.
2021-01-10Merge pull request #8029 from bonzini/mtest-asyncio-nextJussi Pakkanen1-23/+23
mtest: asynchronous TAP parsing, improved progress report
2021-01-10Hotdoc: use template for Commands.md instead of generating the entire file ↵Eli Schwartz1-8/+4
(#8154) * doc: fix hotdoc misuse for dynamically generated content hotdoc has a native include feature for including files inline. Use this to generate one file for each dynamically generated code block, and include that file in Commands.md; see: https://hotdoc.github.io/syntax-extensions.html#smart-file-inclusion-syntax This permits us to move back to using the in-tree version of the hotdoc *.md sources, thus fixing the incorrect inclusion of "builddir/" in the "Edit on github" links which resulted from using copies as the source. Fixes #8061 * doc: call the dummy file a "stamp" as it is a better known term
2021-01-07mtest/TAPParser: use typing.NamedTuplePaolo Bonzini1-21/+21
It is cleaner than collections.namedtuple. It also catches that "count()" is a method on tuple, so rename the field to num_tests. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-06mtest: remove argument to the TAPParser constructorPaolo Bonzini1-2/+2
Pass the StringIO object to the parse method instead, because there will be no T.Iterator[str] to use in the asynchronous case. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-01-04Use a single coredata dictionary for optionsDylan Baker1-43/+44
This patches takes the options work to it's logical conclusion: A single flat dictionary of OptionKey: UserOptions. This allows us to simplify a large number of cases, as we don't need to check if an option is in this dict or that one (or any of 5 or 6, actually).
2021-01-04use OptionKey for builtin and base optionsDylan Baker1-35/+38
I would have prefered to do these seperatately, but they are combined in some cases, so it was much easier to convert them together. this eliminates the builtins_per_machine dict, as it's duplicated with the OptionKey's machine parameter.
2021-01-04move OptionKey to mesonlibDylan Baker1-2/+1
There's starting to be a lot of things including coredata that coredata needs to itself include. putting it in mesonlib makes more sense
2021-01-04use OptionKey for compiler_optionsDylan Baker1-23/+21
2021-01-04use OptionKey for coredata.user_optionsDylan Baker1-4/+5
2021-01-04use the OptionKey type for command line and machine filesDylan Baker1-1/+1
2021-01-04run_unittests: Add fatal-warnings to test_command_lineDylan Baker1-8/+9
Otherwise bugs like "option c_args is unknown" can slip through. that's bad.
2021-01-04run_unittests: make another test inprocess safeDylan Baker1-2/+6
2021-01-04run_unittests: Make test_command_line safe witn inprocessDylan Baker1-14/+27
This is pretty important to be able to debug the test, as it's huge and really should be a test split into subtests.
2020-12-14Merge pull request #8013 from mesonbuild/cppmodulesJussi Pakkanen1-0/+10
C++ module support
2020-12-13Support native tests in crossbuildOleg B1-0/+13
2020-12-13Add unit test.Jussi Pakkanen1-0/+10
2020-12-11unit tests: correctly skip c++20 checks if the compiler doesn't supportDylan Baker1-3/+12
them I can't find a supported version for AppleClang, and you need relatively recent versions of GCC and Clang for -std=c++20 to work.
2020-12-03Add prelinking support for static libraries.Jussi Pakkanen1-0/+26
2020-11-24Merge pull request #7982 from dcbaker/submit/unittest-fixupsJussi Pakkanen1-74/+55
Unittest fixups
2020-11-20use real pathlib moduleDylan Baker1-1/+1
We added the _pathlib module to work around defeciencies in python 3.5's implementation, since we now rely on 3.6 lets drop this
2020-11-20run_unittests: delete test for external syntax highlightingDylan Baker1-46/+0
It's a bit odd we have a test for an external project that's not even in the meson organization. Regardless, the json file was recently replaced by a cson file. There is an coffee-script-notation parser in pypi, but I couldn't get it to work. Just delete the test
2020-11-18unittests: ignore nix rpathsDylan Baker1-5/+12
As a necessity nix adds a bunch of rpaths to files, this is unavoidable do to the way nix package management works. Meson doesn't expect this however, and fails all rpath tests. To correct this we just ignore any rpath entries that start with `/nix`.
2020-11-16unittests: Simplify and make test_templates more reliableDylan Baker1-46/+8
env.detect_<lang>_compiler only checks that there is a binary called whatever that returns a version. There are several cases where the found binary doesn't work: 1) gcc for ojbc[pp], when support isn't compiled in. 2) the compiler is broken (rust in appveyor somtimes) Because of that we need to call compiler.sanity_check() as well, and if we get an EnvironmentException from that skip the language Also, instead of having a long line of try: ... except: pass, roll all of the checking up into a loop using getattr(), which is less code and makes adding a new language easier
2020-11-16run_unittests: correctly handle users setting init.defaultBranchDylan Baker1-2/+18
2020-11-16run_unittests: Don't assume things are in /usr/binDylan Baker1-21/+17
This is generally a safe assumption, except for some of the more exotic OSes/distros like nixos, where env is the only thing in /usr/bin
2020-11-15stabilize sets that are converted to listsPaolo Bonzini1-1/+1
The order of elements in sets cannot be relied upon, because the hash values are randomized by Python. Whenever sets are converted to lists we need to keep their order stable, or random changes in the command line cause ninja to rebuild a lot of files unnecessarily. To stabilize them, use either sort or OrderedSet. Sorting is not always applicable, but it can be faster because it's done in C and it can produce slightly nicer output.
2020-11-13environment: Fix detection of rust compilers, moreDylan Baker1-1/+2
2020-11-13run_unittests: use textwrap.dedentDylan Baker1-23/+28
So that editors that can fold code (vim, vscode, etc) can correctly fold functions, instead of getting confused by code that doesn't follow the current indention. Also, it makes the code easier to read.
2020-11-12Merge pull request #7965 from dcbaker/wip/2020-11/macos-github-actionsJussi Pakkanen1-0/+6
Migrate osx CI from travis to github actions
2020-11-12dependencies: Put pkgconfig options before operandsHaelwenn (lanodan) Monnier1-3/+3
This fixes building with meson when the POSIX behavior of getopt is used, such as when GNU libc is used with POSIXLY_CORRECT=1 defined
2020-11-11actions: Add unittests for macosDylan Baker1-0/+1
2020-11-10unittests: Don't try to set alternative linkers for apple-clangDylan Baker1-0/+5
2020-11-03Condense test directory names again.Jussi Pakkanen1-74/+74
2020-11-01interpreter: store correct files for project regenerationDylan Baker1-0/+14
Right now sub-sub projects are not correctly registered, because we don't have a way to pass up past the first level of subproject. This patch changes that by making the build_Def_files as defined in the Interpreter initializer accurate for translated dependencies, ie, cmake dependencies won't define a dependency on a non-existent meson.build. This means that it can always add the subi.build_def_files because they are always accurate.
2020-10-19Remove a status message that leaks to stdout.Jussi Pakkanen1-1/+3
2020-10-19In text, betterer grammer usings.Jussi Pakkanen1-1/+1
2020-10-19Add delays to test for timestamp issues on mac.Jussi Pakkanen1-0/+12