summaryrefslogtreecommitdiff
path: root/run_project_tests.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove AutoDeletedDirChristoph Reiter2020-11-231-16/+4
| | | | Replace the only usage with a simple try/finally and remove the class.
* Replace various calls to AutoDeletedDir with TemporaryDirectoryWinProofChristoph Reiter2020-11-231-6/+6
| | | | | | AutoDeletedDir was a workaround to TemporaryDirectory not using windows_proof_rmtree(). TemporaryDirectoryWinProof does now, so replace it.
* Merge pull request #8011 from dcbaker/submit/post-python36-cleanupsJussi Pakkanen2020-11-221-1/+1
|\ | | | | Python 3.6 cleanups
| * use real pathlib moduleDylan Baker2020-11-201-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
* | run_project_tests: Use the test environment for install and cleanJason Ekstrand2020-11-211-2/+2
|/
* gnome: Handle libraries that are not in the current build dirSam Thursfield2020-11-131-0/+4
| | | | | | The generate_gir() function previously assumed all library inputs were in the current build dir. This would fail if they weren't.
* Bump minimum supported Python version to 3.6. Closes #6297.Jussi Pakkanen2020-10-301-3/+2
|
* depenencies/llvm: Handle llvm-config --shared-mode failing (#7379)Dylan Baker2020-10-221-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
* cmake: Add cross testsDaniel Mensinger2020-10-131-0/+1
|
* pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger2020-10-041-1/+1
|
* project tests: Also check whether introspect worksNirbheek Chauhan2020-09-171-0/+5
|
* project tests: Rename a variable for clarityNirbheek Chauhan2020-09-171-5/+5
|
* Add build machine compilers to project tests compiler reportJon Turney2020-09-111-5/+31
| | | | | When cross-compiling, also report build machine compilers in the compiler report produced by run_project_tests.py
* Split tests out from 'common' which require a native compilerJon Turney2020-09-101-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.
* typing: fix code reviewDaniel Mensinger2020-09-081-1/+1
|
* test: Add 'dir' support for installed files in test.jsonDaniel Mensinger2020-08-271-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.
* Merge pull request #7460 from mensinda/fixDeepcpyJussi Pakkanen2020-07-231-9/+9
|\ | | | | deps: Do not deepcopy internal libraries (fixes #7457)
| * Make virtualenv inside the project workDaniel Mensinger2020-07-161-9/+9
| |
* | Add boost_root support to properties files (#7210)cmcneish2020-07-211-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.
* remove redundant syntaxMichael Hirsch2020-07-121-3/+2
|
* some python test cases don't care about backend, so run them in any caseMichael Hirsch2020-07-121-1/+1
|
* run_*tests*.py: print Meson version at start of test suiteMichael Hirsch2020-06-151-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())
* ci: Use test.json to skip VS2017 azure testsDaniel Mensinger2020-06-151-5/+5
| | | | | | See also #7307 #7314 #7316 cc @nirbheek
* tests: reset CMakeDependency.class_cmakeinfoDaniel Mensinger2020-06-131-0/+3
|
* Merge pull request #7197 from jon-turney/test-output-check-mandatoryJussi Pakkanen2020-05-261-40/+45
|\ | | | | Make the expected output check mandatory for failing-meson and warning-meson tests
| * Make expected stdout mandatory for warning-meson and failing-meson testsJon Turney2020-05-231-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
* | Clear internal caches before running each test.Jussi Pakkanen2020-05-231-0/+10
|/
* Remove stray print call.Jussi Pakkanen2020-05-231-1/+0
|
* Revert "Merge pull request #7172 from jon-turney/test-output-check-mandatory"Jussi Pakkanen2020-05-231-45/+40
| | | | | This reverts commit 0871b1032c53287a1ed3ce5108799fb0daccaec5, reversing changes made to 9dc3ca2c1c9fbb47e731551c6432df144f725261.
* Merge pull request #7172 from jon-turney/test-output-check-mandatoryJussi Pakkanen2020-05-221-40/+45
|\ | | | | Make the expected output check mandatory for failing-meson and warning-meson tests
| * Make expected stdout mandatory for warning-meson and failing-meson testsJon Turney2020-05-151-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
* | interpreterbase: Allow passing an extra message in feature/deprecation warningsDylan Baker2020-05-141-0/+1
|/ | | | The intended use it to tell people the new thing to do.
* Merge pull request #6620 from jon-turney/test-output-checkDylan Baker2020-05-131-4/+63
|\ | | | | Add a mechanism for validating meson output in tests
| * Add a mechanism for validating meson output in testsJon Turney2020-04-301-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
| * Make colourize_console() a functionJon Turney2020-04-301-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()
* | rename unstable-kconfig to unstable-keyvalPaolo Bonzini2020-05-081-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.
* tests: Skip hotdoc test if hotdoc is not installedDaniel Mensinger2020-04-281-0/+12
|
* tests: Add support for specifying tool requirementsDaniel Mensinger2020-04-281-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.
* run_project_tests: Allow matrix tests to skipDylan Baker2020-04-171-1/+5
| | | | | Since they generate some tests that are only valid on specific operating systems.
* run_project_tests: Add an option to put temprorary files in /tmpDylan Baker2020-04-171-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.
* Merge pull request #6636 from jon-turney/machine-detection-problemsJussi Pakkanen2020-03-201-21/+34
|\ | | | | Redetect machines when languages change
| * Extend _run_test to test build without regenerateJon Turney2020-02-291-21/+34
| | | | | | | | | | | | | | | | | | Add coverage of a simple 'configure then build' sequence, to catch bugs which occur with that. Also, to simplify returning results from functions called by _run_test(), allow it also throw TestResult objects, which run_test() catches and returns.
* | project_tests: Add the option to the test format to mark the languageDylan Baker2020-03-091-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.
* | run_project_tests: Sort importsDylan Baker2020-03-091-14/+16
| | | | | | | | It was impossible to figure out what was coming from where before.
* | run_project_tests: fix argument typeDylan Baker2020-03-091-1/+1
| |
* | tests: Add pdb files for d testsDylan Baker2020-03-091-1/+2
| |
* | project_tests: Add "version" to "shared_lib" and "pdb" typesDylan Baker2020-03-091-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.
* | project_tests: Add a "shared_lib" typeDylan Baker2020-03-061-0/+9
|/ | | | | This allows fixing tests that produce .dylib's on macOS and .so's on elf Unices.
* test: replace pass_* functions with a test.json entryDaniel Mensinger2020-02-261-19/+10
|
* test: merge installed_files.txt into test.jsonDaniel Mensinger2020-02-251-76/+77
|