aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
AgeCommit message (Collapse)AuthorFilesLines
2021-04-19pkgconfig: Add support for CustomTarget objects in generatorXavier Claessens1-0/+7
Fixes: #8618.
2021-04-17msetup: Restore .gitignore after wipeXavier Claessens1-0/+1
2021-04-06environment: don't load project options from a native file in a cross buildDylan Baker1-1/+17
2021-04-03Merge pull request #8606 from dcbaker/submit/fix-for-build-env-variablesJussi Pakkanen1-3/+28
Fix _FOR_BUILD env variables
2021-04-01interpreter: Move to its own folder and split itXavier Claessens1-2/+2
2021-04-01tests: Add a test for the _FOR_BUILD env varsDylan Baker1-0/+20
2021-04-01unittests: extend machine file override tests for CFLAGS (and friends)Dylan Baker1-5/+10
They behave slightly differently than other env vars, so have a test for them as well.
2021-03-30Split environment variable and command line cflagsDylan Baker1-0/+22
They are supposed to have different behavior. The environment variables apply to both the compiler and linker when the compiler acts as a linker, but the command line ones do not. Fixes #8345
2021-03-29Do not add custom target dir automatically when implicit false.Jussi Pakkanen1-0/+17
2021-03-26pkgconfig: Allow setting prefix in dataonly pc fileXavier Claessens1-0/+1
Some variables are reserved because meson set them automatically. But we are not setting them for dataonly pc files, so there is no reason to reserve them. Fixes: #8583.
2021-03-24Merge pull request #8568 from dcbaker/submit/qt-dependency-factoryJussi Pakkanen1-4/+4
QT: use a proper dependency factory
2021-03-23Refactor Qt Dependency into proper split classes with factoriesDylan Baker1-4/+4
Currently the Qt Dependencies still use the old "combined" method for dependencies with multiple ways to be found. This is problematic as it means that `get_variable()` and friends don't work, as the dependency can't implement any of those methods. The correct solution is to make use of multiple Dependency instances, and a factory to tie them together. This does that. To handle QMake, I've leveraged the existing config-tool mechanism, which allows us to save a good deal of code, and use well tested code instead of rolling more of our own code. The one thing this doesn't do, but we probably should, is expose the macOS ExtraFrameworks directly, instead of forcing them to be found through QMake. That is a problem for another series, and someone who cares more about macOS than I do.
2021-03-23environment(): Allow stacking append() and prepend() (#8547)Xavier Claessens1-11/+0
* environment(): Allow stacking append() and prepend() * Update docs/markdown/Reference-manual.md Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com> Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
2021-03-22mlog: Add a space after 'subproject|'Xavier Claessens1-3/+3
2021-03-19split program related classes and functions out of dependenciesDylan Baker1-1/+2
Dependencies is already a large and complicated package without adding programs to the list. This also allows us to untangle a bit of spaghetti that we have.
2021-03-18add test case for installed targets uninstalling a single directoryEli Schwartz1-0/+2
2021-03-18Allow add_dist_script() in subprojectsXavier Claessens1-0/+4
Fixes: #8440.
2021-03-16clangformat: Add clang-format-check targetXavier Claessens1-0/+13
2021-03-16clangformat: Add include and ignore filesXavier Claessens1-0/+16
2021-03-16Update VS module version check.Jussi Pakkanen1-1/+1
2021-03-16Delete leftover files from some tests.Jussi Pakkanen1-2/+6
2021-03-16msetup: do not print bogus "Option ... is:" messagesPaolo Bonzini1-1/+2
get_non_matching_default_options is checking a string from project_default_options against a validated value from coredata.options. Passing the string to validate_value ensures that the comparison is sound; otherwise, "false" might be compared against False and a bogus difference is printed.
2021-03-16Add `meson devenv` command and meson.add_devenv()Xavier Claessens1-0/+11
2021-03-14Fix run_targets running scripts from different subdirs.Jussi Pakkanen1-0/+9
2021-03-12Fix duplicate pkg_config_path entriesTristan Partin1-0/+12
Previously builds would *potentially* get sammed with messaging at configure time that duplicate entries in an array would be an error in the future, and the cause was because the same entries were getting added over and over to pkg_config_path.p
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz1-105/+105
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04various python neatness cleanupsEli Schwartz1-31/+31
All changes were created by running "pyupgrade --py3-only --keep-percent-format" and committing the results. I have not touched string formatting for now. - use set literals - simplify .format() parameter naming - remove __future__ - remove default "r" mode for open() - use OSError rather than compatibility aliases - remove stray parentheses in function(generator) scopes
2021-03-04raw string literals are next to godlinessEli Schwartz1-1/+1
Invalid escape sequences are deprecated and will be removed from a future version of python. Use r"" to define them so they remain readable.
2021-03-04mintro: include the correct target filenames for flat layoutPaolo Bonzini1-0/+13
Fixes: #8408
2021-03-02mtest: create separate runners for multiple repeatsPaolo Bonzini1-0/+6
Reusing the runners for multiple repeats of the test run gets in the way of the progress report, which stores runners in an OrderedSet. Instead, create a separate SingleTestRunner object for each repeat. While at it, fix the "duplicate suite" assertion as it can fire with TAP tests and --repeat=N. Fixes: #8405
2021-02-26interpreter: correctly track whether a subproject is initializedDylan Baker1-0/+7
The way the tracking is currently done it works if no new subprojects are added to a configured build directory. For cases where we want to add a new subproject, it fails because we don't initialize builtins for that subproject. This corrects that by checking to see if the subproject already exists, and if it doesn't initializes the bultins for it. Fixes: #8421
2021-02-26Allow printing UserOptions in the summaryStephen Gregoratto1-0/+1
2021-02-25Support multiple args in error()Xavier Claessens1-0/+5
Seems it got forgotten when that was added to warnings() and message(). Fixes: #8414.
2021-02-22minstall: Add --skip-subprojects optionXavier Claessens1-0/+47
By default all subprojects are installed. If --skip-subprojects is given with no value only the main project is installed. If --skip-subprojects is given with a value, it should be a coma separated list of subprojects to skip and all others will be installed. Fixes: #2550.
2021-02-18allow build.b_* optionsDylan Baker1-0/+5
These continue to be ignored as they always have, but no longer raise an error. Fixes: #8354
2021-02-18Disable failing Cygwin GIR test.Jussi Pakkanen1-0/+2
2021-02-17ci: Fix failure in unit tests with vs backendXavier Claessens1-1/+1
2021-02-17unittests: expect mtest logs to be utf-8Paolo Bonzini1-7/+7
2021-02-17compilers: Only insert -flto-jobs in clang's link argumentsDylan Baker1-5/+9
Clang has a hand `-Wunused-command-line-argument` switch, which when turned to an error, gets very grump about `-flto-jobs=0` being set in the compiler arguments (although `-flto=` belongs there). We'll refactor a bit to put that only in the link arguments. GCC doesn't have this probably because, a) it doesn't have an equivalent warning, and b) it uses `-flto=<$numthreads. Fixes: #8347
2021-02-17Substitute @CURRENT_SOURCE_DIR@ in run_target() and custom_target()Xavier Claessens1-0/+1
run_target() does some variable substitutions since 0.57.0. This is a new behavior, and undocumented, caused by sharing more code with custom_target(). More consistency is better, so document it now. custom_target() was doing variable substitution in the past, because it shared some code with generator(), but that was undocumented. Some refactoring in 0.57.0 caused it to not replace @CURRENT_SOURCE_DIR@, @SOURCE_DIR@, and @BUILD_DIR@ anymore. This patch adds back @CURRENT_SOURCE_DIR@ and document it. It does not add back @SOURCE_DIR@ because it is duplicate with @SOURCE_ROOT@ that has a better name. Also do not add back @BUILD_DIR@ which is duplicate of @PRIVATE_DIR@, and not @BUILD_ROOT@ surprisingly, adding to the confusion.
2021-02-17Environment: Fix passing envrionment variables CPPFLAGS and CFLAGSDylan Baker1-0/+8
Or other language flags that use CPPFLAGS (like CXXFLAGS). The problem here is actually rather simple, `dict.setdefault()` doesn't work like I thought it did, I thought it created a weak entry, but it actually is equivalent to: ```python if k not in dict: dict[k] = v ``` Instead we'll use an intermediate dictionary (a default dictionary actually, since that makes things a little cleaner) and then add the keys from that dict to self.options as applicable. Test case written by Jussi, Fix by Dylan Co-authored-by: Jussi Pakkanen Fixes: #8361 Fixes: #8345
2021-02-16Small patch to unittests to initialize CUDA compiler correctly.Olexa Bilaniuk1-1/+1
Suggested by Dylan Baker.
2021-02-09mtest: TestSetup can have [] as an exe_wrapperPaolo Bonzini1-0/+2
Fix "meson test --wrapper foo --setup bar", it should work just fine if the setup does not define a wrapper. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-02-09Condense test directory names in preparation for rc1.Jussi Pakkanen1-3/+3
2021-02-08Fix exe wrapper detection for run targets.Jussi Pakkanen1-2/+1
2021-02-07Add Qt6 moduleLuca Weiss1-0/+20
2021-02-07Make installing non-existing subdirs a supported featurePeter Hutterer1-0/+1
install_subdir() with a non-existing subdir creates the directory in the target directory. This seems like an implementation detail but is quite useful to create new directories for e.g. configuration or plugins in the installed locations. git bisect says this started with 8fe816101467e66792251b4f57e0ddddb537764a. Let's add a test for it and document it to make this behavior official. Limitation: it can only create at the install_dir location, trying to create nested subdirectories does not work and indeed creates the wrong directory structure. That is a bug that should be fixed separately: install_subdir('blah', install_dir: get_option('prefix')) install_subdir('sub/foobar', install_dir: get_option('prefix')) install_subdir('foo/baz', install_dir: get_option('prefix')) $ tree ../_inst ../_inst β”œβ”€β”€ baz β”œβ”€β”€ blah └── foobar Fixes #2904
2021-02-07Merge pull request #8288 from bonzini/test-setup-exclude-suitesJussi Pakkanen1-0/+10
introduce add_test_setup(exclude suites: ...) keyword argument
2021-02-07Merge pull request #8305 from xclaesse/run-target-envJussi Pakkanen1-0/+1
run_target: Add env kwarg
2021-02-06interpreterbase: Add support for optional arguments to typed_pos_argsDylan Baker1-0/+60
This allows representing functions like assert(), which take optional positional arguments, which are not variadic. More importnatly you can represent a function like (* means optional, but possitional): ```txt func(str, *int, *str) ``` typed_pos_args will check that all of your types are correct, and if not provide None, which allow simplifying a number of implementation details