]> granicus.if.org Git - graphviz/commitdiff
CI: remove the use of '$OS_ID' during testing
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 19 Feb 2022 06:48:51 +0000 (22:48 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 20 Feb 2022 02:05:18 +0000 (18:05 -0800)
This commit alters the CI tests to now pull OS information from /etc/os-release
instead of from an ad hoc environment variable. This makes test case execution
independent from which/whether environment variables have been exported. The
intent with this is to reduce the likelihood of an issue like that fixed in
50db0c5e8da293d816d8b5c4620f2fa2d311d37a being reintroduced.

ci/tests.py

index 5a2327a86b8f97163643c3300adea953ecbe4533..221b30067e478cde3b2729ba0af851d093b4628e 100644 (file)
@@ -128,7 +128,7 @@ def test_existence(binary: str):
     "smyrna",
   ]
 
-  os_id = os.getenv("OS_ID")
+  os_id = _freedesktop_os_release().get("ID")
 
   # FIXME: Remove skip when
   # https://gitlab.com/graphviz/graphviz/-/issues/1835 is fixed