Commit Graph

16 Commits

Author SHA1 Message Date
Dylan Baker a2b0e665bb run_single_test.py: Fix for symlink changes 2024-11-05 17:41:38 -05:00
Andrew McNulty 191b801f1d run_single_test: Ensure symlinks exist and are cleaned up
The common test case "268 install functions and follow symlinks"
requires that certain symlinks exist in order to function.

If one clones a fresh repo and executes run_single_test.py with
the aforementioned test as the target it will fail as the required
symlinks are not part of the repo.

Normally these symlinks are created and cleaned up when the
overall testsuite is run but this is not the case for
run_single_test.py

This commit calls the necessary creation and cleanup functions
in the case of run_single_test.py.
2024-09-23 09:17:49 -07:00
Dylan Baker 8e89a38737
tests: rename poorly named function and add report argument
The poorly named `print_tool_versions()` doesn't just print the tools
versions, it finds them and populates a global table, without which some
tests will fail. Rename the function and add a `report` argument so that
calls can decide whether they want to have the printed message, because
the single runner doesn't in quick mode.
2024-07-12 15:37:24 -04:00
Dylan Baker e991c4d454 Use SPDX-License-Identifier consistently
This replaces all of the Apache blurbs at the start of each file with an
`# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing
uses to be consistent in capitalization, and to be placed above any
copyright notices.

This removes nearly 3000 lines of boilerplate from the project (only
python files), which no developer cares to look at.

SPDX is in common use, particularly in the Linux kernel, and is the
recommended format for Meson's own `project(license: )` field
2023-12-13 15:19:21 -05:00
Eli Schwartz 1fd70a2a00
tests: consolidate MESON_SKIP_TEST reporting and use it in unittests
Previously, we only reported the skip reason when running project tests.
2023-08-17 21:30:32 -04:00
Dylan Baker 0c45838b2f
run_single_test: add a --quick option to skip compiler/tool checking
This can be the longest part of the entire test process, often with no
benefit because we already know the environment is sane. So, let's have
an option save some time.
2023-05-25 13:52:04 -04:00
Dylan Baker 48709dd2ea run_single_test: Allow passing extra args like run_project_test
So you can do things like `run_single_test.py <path> --
-Ddefault_library=both`
2022-07-11 22:48:08 +03:00
Eli Schwartz 105bbaabdd
project tests: log the reason why a test is skipped
We expose a reason after the string 'MESON_SKIP_TEST', but it is
actually ignored when running the test, so it is only useful as
documentation and really might as well be a comment.

Make it even more useful by actually printing that string after the
'[SKIPPED]' message.

Also, sometimes a test can be skipped for multiple reasons, and it would
be useful to know which one occurred.
2022-04-03 16:06:33 -04:00
Dylan Baker d9b4904941 run_single_test: honor the --use-tmpdir flag 2021-11-22 11:07:36 -08:00
Dylan Baker ac137d4c42 run_single_test: fix running failing tests 2021-11-22 11:07:36 -08:00
Jon Turney 1c9698b107 Drop checking skippable() in run_single_test
Drop checking skippable() in run_single_test. It always returns True
unless we are under CI, so checking it here is pointless.
2021-07-07 20:08:12 +02:00
Daniel Mensinger b2112bc4f6 tests: Always enable the traceback in run_project_tests.py 2021-06-18 23:48:33 +02:00
Daniel Mensinger e1708d3de9 tests: Reduce complexity of the run_tests signature 2021-06-09 13:25:36 +02:00
Daniel Mensinger 7fc755b334 typing: Fully annotate run_project_tests.py 2021-06-09 13:25:36 +02:00
Dylan Baker adbfa12409 run_single_test: Handle MESON_SKIP_TEST correctly 2021-03-23 15:28:08 -07:00
Dylan Baker 44c836e0d9 add a script to run a single test
As a Meson developer it's often frustrating to have a single functional
test with a regression. These tests can be awkward to reproduce,
especially when they make use of a test.json file. This script provides
a simmple interface to call functional tests 1 at a time, regardless of
whether they use a test.json or not. If they do use a test.json, and
have a matrix, then the `--subtest` option can be used to select spcific
combinations, for example:
```sh
./run_single_test.py "test cases/frameworks/15 llvm" --subtest 1
```
will run only the second (zero indexed of course) subtest from the llvm
test cases.

This is not a super elegent script, but this is super useful.
2021-02-23 09:08:55 -08:00