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
5 changes: 3 additions & 2 deletions tests/ebuild/test_build_dir_resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from __future__ import annotations

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


@pytest.mark.skipif(
subprocess.run(["gcc", "--version"], capture_output=True).returncode != 0,
reason="needs a working gcc to link the executable",
shutil.which("gcc") is None,
reason="needs gcc on PATH 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."""
Expand Down
7 changes: 6 additions & 1 deletion 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 @@ -55,8 +56,12 @@ def test_a_pure_bss_buffer_costs_ram_but_not_flash(self):
assert fp.flash == 100
assert fp.ram == 8192


class TestMeasure:
@pytest.mark.skipif(
shutil.which("gcc") is None or find_size_tool() is None,
reason="needs gcc and a size tool",
)

def test_measures_a_real_binary(self, tmp_path):
src = tmp_path / "m.c"
src.write_text("static char buf[4096];\nint main(void){return buf[0];}\n")
Expand Down