diff --git a/tests/ebuild/test_build_dir_resolution.py b/tests/ebuild/test_build_dir_resolution.py index 43f17e9..9cc3102 100644 --- a/tests/ebuild/test_build_dir_resolution.py +++ b/tests/ebuild/test_build_dir_resolution.py @@ -28,6 +28,7 @@ import os import shutil import subprocess +import shutil import textwrap from pathlib import Path from types import SimpleNamespace @@ -244,8 +245,8 @@ def test_configure_and_build_from_outside_agree_on_the_build_dir( @pytest.mark.skipif( - shutil.which("gcc") is None, - reason="needs gcc on PATH to link the executable", + shutil.which("gcc") is None, + reason="needs a working gcc to link the executable", ) def test_end_to_end_build_from_outside_produces_the_binary(tmp_path, monkeypatch): """No stubs: the real ninja run must produce the real executable.""" diff --git a/tests/unit/test_footprint.py b/tests/unit/test_footprint.py index 3e20168..74474b5 100644 --- a/tests/unit/test_footprint.py +++ b/tests/unit/test_footprint.py @@ -63,6 +63,9 @@ class TestMeasure: ) def test_measures_a_real_binary(self, tmp_path): + if shutil.which("gcc") is None: + pytest.skip("needs a working gcc to compile the test binary") + src = tmp_path / "m.c" src.write_text("static char buf[4096];\nint main(void){return buf[0];}\n") # gcc on Windows appends .exe when -o names no extension, so the