]> granicus.if.org Git - graphviz/commitdiff
tests: move 'is_cmake' helper into gvtest library
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 11 Mar 2022 05:20:18 +0000 (21:20 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 19 Mar 2022 20:29:59 +0000 (13:29 -0700)
ci/tests.py
rtest/gvtest.py

index 4b5820cf85292e5cb5acbd7b15d04a3093bc9e35..d5a5bb0ecfd0d02ca2d6e90aef2c45519e9b6458 100644 (file)
@@ -13,13 +13,7 @@ from typing import Dict
 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"
+from gvtest import dot, is_cmake #pylint: disable=C0413
 
 def _freedesktop_os_release() -> Dict[str, str]:
   """
index c725b577b08048e28904d5df3db27a1c73051afb..0b0de55d8c5298c169fd861f71a97d88793ab03e 100644 (file)
@@ -109,6 +109,10 @@ def gvpr(program: Path) -> str:
                                  stdin=subprocess.DEVNULL,
                                  universal_newlines=True)
 
+def is_cmake() -> bool:
+  """was the Graphviz under test built with CMake?"""
+  return os.getenv("build_system") == "cmake"
+
 def is_mingw() -> bool:
   """is the current platform MinGW?"""
   return "mingw" in sysconfig.get_platform()