aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-02-09 01:47:31 -0500
committerNirbheek Chauhan <nirbheek@centricular.com>2023-02-19 02:55:58 +0530
commitce2b4a1dda160cab04df1f53146c2b41188da661 (patch)
tree5add072c373ff8b160a348e9e205badcbd676d58
parent530a07c545a931c1df37e6981b9ee8fd24965065 (diff)
downloadmeson-ce2b4a1dda160cab04df1f53146c2b41188da661.zip
meson-ce2b4a1dda160cab04df1f53146c2b41188da661.tar.gz
meson-ce2b4a1dda160cab04df1f53146c2b41188da661.tar.bz2
tests: do not run the deprecated python3 tests unless python is python3
It's broken in e.g. pypy, but that's okay because the module is utterly deprecated, and people should use the python module instead.
-rwxr-xr-xrun_project_tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/run_project_tests.py b/run_project_tests.py
index 8fb276c..5caedbe 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -1104,7 +1104,7 @@ def detect_tests_to_run(only: T.Dict[str, T.List[str]], use_tmp: bool) -> T.List
TestCategory('swift', 'swift', backend not in (Backend.ninja, Backend.xcode) or not shutil.which('swiftc')),
# CUDA tests on Windows: use Ninja backend: python run_project_tests.py --only cuda --backend ninja
TestCategory('cuda', 'cuda', backend not in (Backend.ninja, Backend.xcode) or not shutil.which('nvcc')),
- TestCategory('python3', 'python3', backend is not Backend.ninja),
+ TestCategory('python3', 'python3', backend is not Backend.ninja or 'python3' not in sys.executable),
TestCategory('python', 'python'),
TestCategory('fpga', 'fpga', shutil.which('yosys') is None),
TestCategory('frameworks', 'frameworks'),
@@ -1591,7 +1591,7 @@ if __name__ == '__main__':
clear_transitive_files()
print('Meson build system', meson_version, 'Project Tests')
- print('Using python', sys.version.split('\n')[0])
+ print('Using python', sys.version.split('\n')[0], f'({sys.executable!r})')
if 'VSCMD_VER' in os.environ:
print('VSCMD version', os.environ['VSCMD_VER'])
setup_commands(options.backend)