aboutsummaryrefslogtreecommitdiff
path: root/run_project_tests.py
AgeCommit message (Collapse)AuthorFilesLines
2021-02-06ci: Add bindgen to CI imagesDylan Baker1-0/+4
2021-01-21mlog: add __str__ method to AnsiDecoratorPaolo Bonzini1-16/+1
Automatically colorize the text when printing the AnsiDecorator, based on the result of mlog.colorize_console(). This is how AnsiDecorator is used most of the time anyway.
2021-01-10cmake: add PATH logic to preliminary dep check (fixes #8133)Daniel Mensinger1-0/+1
2020-11-23Remove AutoDeletedDirChristoph Reiter1-16/+4
Replace the only usage with a simple try/finally and remove the class.
2020-11-23Replace various calls to AutoDeletedDir with TemporaryDirectoryWinProofChristoph Reiter1-6/+6
AutoDeletedDir was a workaround to TemporaryDirectory not using windows_proof_rmtree(). TemporaryDirectoryWinProof does now, so replace it.
2020-11-22Merge pull request #8011 from dcbaker/submit/post-python36-cleanupsJussi Pakkanen1-1/+1
Python 3.6 cleanups
2020-11-21run_project_tests: Use the test environment for install and cleanJason Ekstrand1-2/+2
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-13gnome: Handle libraries that are not in the current build dirSam Thursfield1-0/+4
The generate_gir() function previously assumed all library inputs were in the current build dir. This would fail if they weren't.
2020-10-30Bump minimum supported Python version to 3.6. Closes #6297.Jussi Pakkanen1-3/+2
2020-10-22depenencies/llvm: Handle llvm-config --shared-mode failing (#7379)Dylan Baker1-0/+6
* depenencies/llvm: Handle llvm-config --shared-mode failing Fixes: #7371 Fixes: #7878 * test cases/llvm: Refactor to use test.json Instead of trying to cover everything internally
2020-10-13cmake: Add cross testsDaniel Mensinger1-0/+1
2020-10-04pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger1-1/+1
2020-09-17project tests: Also check whether introspect worksNirbheek Chauhan1-0/+5
2020-09-17project tests: Rename a variable for clarityNirbheek Chauhan1-5/+5
2020-09-11Add build machine compilers to project tests compiler reportJon Turney1-5/+31
When cross-compiling, also report build machine compilers in the compiler report produced by run_project_tests.py
2020-09-10Split tests out from 'common' which require a native compilerJon Turney1-1/+2
Split out tests (and parts of tests) which require a native compiler from the 'common' suite to a new suite called 'native', so we can selectively avoid running those tests when only a cross-compiler is available. Also move test '211 cmake module' to 'cmake' suite, since it appears that the way we use cmake requires a native compiler.
2020-09-08typing: fix code reviewDaniel Mensinger1-1/+1
2020-08-27test: Add 'dir' support for installed files in test.jsonDaniel Mensinger1-4/+23
This is useful for automatically generated docs (doxygen, hotdoc) with a lot of generated files that may differ with different versions of the generator.
2020-07-23Merge pull request #7460 from mensinda/fixDeepcpyJussi Pakkanen1-9/+9
deps: Do not deepcopy internal libraries (fixes #7457)
2020-07-21Add boost_root support to properties files (#7210)cmcneish1-2/+26
* Add boost_root support to properties files This commit implements `boost_root`, `boost_includedir`, and `boost_librarydir` variable support to native and cross properties files. The search order is currently environment variables, then these variables, and finally a platform-dependent search. * Add preliminary boost_root / boost_includedir tests Each test contains a fake "version.hpp", as that's how boost detection is currently being done. We look for this file relative to the root directory, which probably shouldn't be allowed (it previously was for BOOST_LIBRARYDIR but not for BOOST_ROOT). It also cannot help with breakage detection in libraries, however it looks like this wasn't getting tested beforehand. I've given the two unique version numbers that shouldn't be present in any stock version of boost (001 and 002). * Add return type to detect_split_root * Return empty list when nothing found in BOOST_ROOT, rather than None * Update boost_root tests * Create nativefile.ini based on location of run_project_tests.py * Add fake libraries to ensure boost_librarydir is being used * Require all search paths for boost to be absolute * Redo boost search ordering To better match things like pkg-config, we now look through native/cross files, then environment variables, then system locations for boost installations. Path detection does not fall back from one method to the next for properties or environment variables--if boost_root, boost_librarydir, or boost_includedir is specified, they must be sufficient to find boost. Likewise for BOOST_ROOT and friends. pkg-config detection is still optional falling back to system-wide detection, for Conan. (Also, fix a typo in test 33's nativefile) * Correct return type for detect_roots * Correct boost dependency search order in documentation * Print debug information for boost library finding, to resolve CI issues * Handle native/cross file templates in a more consistent way All tests can now create a `nativefile.ini.in` if they need to use some parameter that the testing framework knows about but they can't. * Pass str--rather than PosixPath--to os.path.exists, for Python35 * Look for boost minor versions, rather than boost patch versions in test cases * Drop fake dylib versions of boost_regex * Prefer get_env_var to use of os.environ * Correct error reporting for relative BOOST_ROOT paths * Bump version this appears in. Also, change "properties file" to "machine file" as that appears to be the more common language.
2020-07-16Make virtualenv inside the project workDaniel Mensinger1-9/+9
2020-07-12remove redundant syntaxMichael Hirsch1-3/+2
2020-07-12some python test cases don't care about backend, so run them in any caseMichael Hirsch1-1/+1
2020-06-15run_*tests*.py: print Meson version at start of test suiteMichael Hirsch1-1/+2
on some systems, tests may take over an hour to run--only to find you might have used an unintended Meson version (e.g. release instead of dev). This change prints the Meson version at the start of the run_*tests*.py scripts. Also, raise SystemExit(main()) is preferred in general over sys.exit(main())
2020-06-15ci: Use test.json to skip VS2017 azure testsDaniel Mensinger1-5/+5
See also #7307 #7314 #7316 cc @nirbheek
2020-06-13tests: reset CMakeDependency.class_cmakeinfoDaniel Mensinger1-0/+3
2020-05-26Merge pull request #7197 from jon-turney/test-output-check-mandatoryJussi Pakkanen1-40/+45
Make the expected output check mandatory for failing-meson and warning-meson tests
2020-05-23Clear internal caches before running each test.Jussi Pakkanen1-0/+10
2020-05-23Make expected stdout mandatory for warning-meson and failing-meson testsJon Turney1-40/+45
Unify present or absent test.json file cases in gather_tests Make expected stdout mandatory in test.json for some test categories Use a trivial TestCategory class rather than a tuple, to make it easier to default category attributes
2020-05-23Remove stray print call.Jussi Pakkanen1-1/+0
2020-05-23Revert "Merge pull request #7172 from jon-turney/test-output-check-mandatory"Jussi Pakkanen1-45/+40
This reverts commit 0871b1032c53287a1ed3ce5108799fb0daccaec5, reversing changes made to 9dc3ca2c1c9fbb47e731551c6432df144f725261.
2020-05-22Merge pull request #7172 from jon-turney/test-output-check-mandatoryJussi Pakkanen1-40/+45
Make the expected output check mandatory for failing-meson and warning-meson tests
2020-05-15Make expected stdout mandatory for warning-meson and failing-meson testsJon Turney1-40/+45
Unify present or absent test.json file cases in gather_tests Make expected stdout mandatory in test.json for some test categories Use a trivial TestCategory class rather than a tuple, to make it easier to default category attributes
2020-05-14interpreterbase: Allow passing an extra message in feature/deprecation warningsDylan Baker1-0/+1
The intended use it to tell people the new thing to do.
2020-05-13Merge pull request #6620 from jon-turney/test-output-checkDylan Baker1-4/+63
Add a mechanism for validating meson output in tests
2020-05-08rename unstable-kconfig to unstable-keyvalPaolo Bonzini1-2/+2
Discussions in #6524 have shown that there are various possible uses of the kconfig module and even disagreements in the exact file format between Python-based kconfiglib and the tools in Linux. Instead of trying to reconcile them, just rename the module to something less suggestive and leave any policy to meson.build files. In the future it may be possible to add some kind of parsing through keyword arguments such as bool_true, quoted_strings, etc. and possibly creation of key-value lists too. For now, configuration_data objects provide an easy way to access quoted strings. Note that Kconfig stores false as "absent" so it was already necessary to write "x.has_key('abc')" rather than the more compact "x['abc']". Therefore, having to use configuration_data does not make things much more verbose.
2020-04-30Add a mechanism for validating meson output in testsJon Turney1-0/+59
Expected stdout lines must match lines from the actual stdout, in the same order. Lines with match type 're' are regex matched. v2: Ignore comment lines in expected_stdout v3: Automatically adjust path separators for location in expected output v4: Put expected stdout in test.json, rather than a separate file
2020-04-30Make colourize_console() a functionJon Turney1-4/+4
Currently, colourize_console is a constant, set at process initialization. To allow the actual stdout to be easily compared with the expected when running tests, we want to allow colourization to be on for the test driver, but not for the in-process configure done by run_configure, which has stdout redirected from a tty to a pipe. v2: Cache _colorize_console per file object v3: Reset cache on setup_console()
2020-04-28tests: Skip hotdoc test if hotdoc is not installedDaniel Mensinger1-0/+12
2020-04-28tests: Add support for specifying tool requirementsDaniel Mensinger1-2/+13
Adds the `tools` section to `tests.json` to specify requirements for the tools in the environment. All tests that fail at least one tool requirements check are skipped.
2020-04-17run_project_tests: Allow matrix tests to skipDylan Baker1-1/+5
Since they generate some tests that are only valid on specific operating systems.
2020-04-17run_project_tests: Add an option to put temprorary files in /tmpDylan Baker1-21/+22
I have an NVME drive, I really don't want to be thrashing it with temporary files. It's also annoying to watch vscode thrash about with files that are quickly created and deleted. I'd rather put them in /tmp, so I've added a non-default option to do so.
2020-03-20Merge pull request #6636 from jon-turney/machine-detection-problemsJussi Pakkanen1-21/+34
Redetect machines when languages change
2020-03-09project_tests: Add the option to the test format to mark the languageDylan Baker1-1/+9
This is needed when mixing D and C code, as it's possible to end up witha combination of linkers and compilres such that C produces pdb files but D does not.
2020-03-09run_project_tests: Sort importsDylan Baker1-14/+16
It was impossible to figure out what was coming from where before.
2020-03-09run_project_tests: fix argument typeDylan Baker1-1/+1
2020-03-09tests: Add pdb files for d testsDylan Baker1-1/+2
2020-03-09project_tests: Add "version" to "shared_lib" and "pdb" typesDylan Baker1-2/+27
This allows the harness to apply the version correctly, putting it in the right place, dropping the right amount of numbers, etc. pdb taking a version allows it to be more easily copied from the shared_lib type.
2020-03-06project_tests: Add a "shared_lib" typeDylan Baker1-0/+9
This allows fixing tests that produce .dylib's on macOS and .so's on elf Unices.