From 7c120c98c4e33012a2feeac265a120dd19526ba9 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 9 Feb 2022 23:01:03 +1100 Subject: [PATCH] CI: [nfc] abstract check for CMake build system --- ci/tests.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ci/tests.py b/ci/tests.py index cd6626b99..1d2d9df6d 100644 --- a/ci/tests.py +++ b/ci/tests.py @@ -13,6 +13,12 @@ import pytest sys.path.append(os.path.join(os.path.dirname(__file__), "../rtest")) from gvtest import dot #pylint: disable=C0413 +def is_cmake() -> bool: + """ + is the current CI environment a CMake job? + """ + return os.getenv("build_system") == "cmake" + @pytest.mark.parametrize("binary", [ "acyclic", "bcomps", @@ -143,7 +149,7 @@ def check_that_tool_does_not_exist(tool, os_id): assert shutil.which(tool) is None, f"{tool} has been resurrected in the " \ f'{os.getenv("build_system")} build on {os_id}. Please remove skip.' -@pytest.mark.xfail(strict=os.getenv("build_system") == "cmake") # FIXME +@pytest.mark.xfail(strict=is_cmake()) # FIXME def test_1786(): """ png:gd format should be supported -- 2.40.0