Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/ebuild/test_build_dir_resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import os
import subprocess
import shutil
import textwrap
from pathlib import Path
from types import SimpleNamespace
Expand Down Expand Up @@ -243,7 +244,7 @@ def test_configure_and_build_from_outside_agree_on_the_build_dir(


@pytest.mark.skipif(
subprocess.run(["gcc", "--version"], capture_output=True).returncode != 0,
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):
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/test_footprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"""

import os
import shutil
import subprocess
from pathlib import Path

Expand Down Expand Up @@ -58,6 +59,9 @@ def test_a_pure_bss_buffer_costs_ram_but_not_flash(self):

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
Expand Down