aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
AgeCommit message (Collapse)AuthorFilesLines
2022-02-14run_unittests: check for pytest and pytest-xdist separatelyEli Schwartz1-7/+10
Do not quit from using pytest at all, when pytest is present, simply because xdist isn't available. Even without xdist, pytest is still useful. There doesn't seem to be any particular reason to require xdist. It just happens to have been implemented that way, back in commit 4200afc74d1e6ba6d117e900799d0d82a85bae8a when we originally added a check to avoid pytest erroring out with unknown options when xdist options are passed and xdist is not installed.
2021-10-26remove unused importsEli Schwartz1-2/+0
2021-10-10Add --vsenv command line option and active VS only when neededXavier Claessens1-5/+1
2021-09-21Add platform agnostic testsXavier Claessens1-1/+2
This adds a new category of tests that does not need to run on all platforms during CI. For now only run them on Linux runners because they are not the bottleneck.
2021-07-26Split run_unittests.py fileXavier Claessens1-10209/+14
2021-07-26coredata: throw a MesonException on unknown optionsFlorian Schmaus1-5/+5
Fixes #7288.
2021-07-25ast: Add dummy "support" for fstrings in the ast packageDaniel Mensinger1-0/+1
2021-07-22Merge pull request #8992 from dcbaker/submit/modernize-python-module-dependencyJussi Pakkanen1-18/+0
Cleanup the python module
2021-07-18Merge pull request #8972 from bonzini/C-symlinkJussi Pakkanen1-0/+12
resolve symlinks passed to -C
2021-07-15Condense test directory names for next release.Jussi Pakkanen1-4/+4
2021-07-13modules/pkgconfig: remove handling of .pcdepDylan Baker1-18/+0
Nothing uses this anymore, so don't check for it.
2021-07-13run_unittests: add test for passing symlinks to setup and testPaolo Bonzini1-0/+12
2021-07-03Delete redirected wrap files in subprojects purgeTristan Partin1-3/+33
We need to store the original filename as well as whether the wrap was redirected in order to properly purge the redirected wrap.
2021-07-02Flatten test suite valueTristan Partin1-1/+1
This behavior is more inline with the rest of Meson
2021-06-29fix: Always explicitly set encoding for text files (fixes #8263)Daniel Mensinger1-86/+77
2021-06-29pathlib: Patch pathlib to work around some bugs (fixes #7295)Daniel Mensinger1-1/+5
2021-06-25Split compiler detection from EnvironmentDaniel Mensinger1-78/+78
This moves all the compiler detection logic into the new compilers.detect module. This dramatically reduces the size and complexity of Environment.
2021-06-23Merge pull request #8884 from dcbaker/submit/type-and-annotate-install-functionsJussi Pakkanen1-0/+12
Add annotations for the various install_* functions
2021-06-22coverage: Enable coverage reportsDaniel Mensinger1-0/+7
2021-06-22interpreterbase: Add evolve to KwargInfoDylan Baker1-0/+12
This works just like OptionKey.evolve, pass new keyword arguments to override old ones, otherwise the original versions are copied to the new one.
2021-06-18holders: remove unholderDaniel Mensinger1-11/+0
2021-06-18holders: Introduce HoldableObjectDaniel Mensinger1-3/+18
2021-06-18tests: Always enable the traceback in run_project_tests.pyDaniel Mensinger1-1/+1
2021-06-17doc: Add missing modules to dropdown listXavier Claessens1-0/+16
2021-06-16interpreter: Extract dependency() logic into its own helper classXavier Claessens1-1/+1
The dependency lookup is a lot of complex code. This refactor it all into a single file/class outside of interpreter main class. This new design allows adding more fallbacks candidates in the future (e.g. using cc.find_library()) but does not yet add any extra API.
2021-06-15docs: Use an include for the qt modulesDylan Baker1-1/+1
Insteadf of qt4 referencing the Qt5 page, include the same content in both.
2021-06-14interpreterbase: Add deprecated_values and since_values to KwargInfoDylan Baker1-0/+39
This allows checking specific values that are added or deprecated, which we do a surprising amount of. This works with both containers and scalar values
2021-06-14run_unittests: mock meson global before changingDylan Baker1-0/+1
For safety
2021-06-09tests: Force colorize CI outputDaniel Mensinger1-0/+3
2021-06-08Merge pull request #8512 from bonzini/feature-methodsJussi Pakkanen1-1/+1
Utility methods for feature objects
2021-06-08intperperterbase: Add a convertor keyword argumentDylan Baker1-0/+10
This is meant to allow simple type conversions to happen before the interpreter function is called. This should simplify some cases like the "native" keyword arugment that are booleans in the Meson DSL, but an Enum in the implementation
2021-06-08interpreterbase: Add validator keyword argument to typed_kwargsDylan Baker1-0/+15
This attribute is a callable that returns a string if the value is invalid, otherwise None. This intended for cases like the `install_*` function's `install_mode` paramater, which is either an int or the string "preserve", which allows us to do nice things like: ```python class Kwargs(TypedDict): install_mode: T.Union[int, T.Literal['preserve']] @typed_kwargs( 'foo', KwargInfo('install_mode', ..., validator=lambda x: None if isinstance(x, int) or x == 'preserve' else 'must be the literal "preserve"), ) def install_data(self, node, args, kwargs: 'Kwargs'): ... ``` In this case mypy *knows* that the string is preserve, as do we, and we can simply do tests like: ```python if kwargs['install_mode'] == 'preserve': ... else: # this is an int ```
2021-06-08run_unittests.py: Use mock for monkey patchingDylan Baker1-22/+20
it's what mock is for afterall
2021-06-08run_unittests.sh: fix Python DeprecationWarningPaolo Bonzini1-1/+1
Fix the following Python error: D:\a\1\s\run_unittests.py:6654: DeprecationWarning: invalid escape sequence \ self.assertEqual(libhello_nolib.get_pkgconfig_variable(escaped_var, {}), hello world) Use a raw string literal.
2021-06-04interpreterbase: Allow safely using mutable default values with typed_kwargsDylan Baker1-0/+11
It's really inconvenient to want a thing that is always a list, but not be able to provide a default value of a list because of mutation. To that end the typed_kwargs method now makes a shallow copy of the default when using a `ContainerTypeInfo` as the type. This mean that using a default of `[]` is perfectly safe.
2021-06-03deps: Split dependencies.baseDaniel Mensinger1-2/+4
Split the Factory and dependency classes out of the base.py script to improve maintainability.
2021-06-01typed_kwargs: Add since and deprecated annotationsXavier Claessens1-0/+32
2021-05-30interpreterbase: Add a function for type checking keyword argumentsDylan Baker1-0/+103
2021-05-23Fix text used to validate test output.Jussi Pakkanen1-1/+1
2021-05-23Merge pull request #8786 from jon-turney/cygwin-tests-reenableJussi Pakkanen1-2/+0
Re-enable various tests on Cygwin
2021-05-23Disable D test on macOS as it fails mysteriously.Jussi Pakkanen1-0/+5
2021-05-23It seems ld64 is the default linker name on macOS now.Jussi Pakkanen1-1/+5
2021-05-21Fix LTO test on CygwinJon Turney1-2/+0
This partially reverts commit add502c6483bde9dc6a0ba80b3c79163304465a4. In 'linkshared' test, annotate cppfunc() as imported, so an indirection through an import stub is generated, avoiding a relocation size error when building using gcc for Cygwin with LTO on. Align with the example of how to write this portably in [1]. The 'c' language part of that test already gets this right. [1] http://gcc.gnu.org/wiki/Visibility
2021-05-18pkgconfig: Do not escape custom variablesXavier Claessens1-0/+2
We need to escape space in variables that gets into cflags or libs because otherwise we cannot split compiler args when paths contains spaces. But custom variables are unlikely to be path that gets used in cflags/libs, and escaping them cause regression in GStreamer that use space as separator in a list variable.
2021-05-13Set up VS environment automatically when run.Jussi Pakkanen1-2/+3
2021-05-11Make objective C use C standard version. Closes #5495.Jussi Pakkanen1-0/+15
2021-05-08Set unittest backend with an argument rather than an envvar.Jussi Pakkanen1-3/+17
2021-05-03Clarify incorrect configuration format messageNellie Zhang1-1/+1
Print the path and line where the problem occurred to make it more clear what the error message means.
2021-05-01Do not accidentally format files when only checking if they are formatted.Jussi Pakkanen1-3/+4
2021-04-26Condense test directory names.Jussi Pakkanen1-102/+102