Skip to content

Commit 893512e

Browse files
roxellbhcopeland
authored andcommitted
test: add back clang version check for test_hexagon
Older distros like Ubuntu 18.04 and Debian 10 ship clang < 10 that dont have hexagon support. The previous commit removed the version check so the test started failing on those images. Put the version check inside the skipif decorator instead so we dont crash during test collection when clang is missing. Fixes: 79df4a9 ("test: fix test collection failure when clang is not installed") Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
1 parent 43ef448 commit 893512e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/test_build.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,16 @@ def test_arc(self, linux):
467467
assert "uImage.gz" in [str(f.name) for f in result.output_dir.glob("*")]
468468

469469
@pytest.mark.skipif(shutil.which("ld.lld") is None, reason="requires lld")
470-
@pytest.mark.skipif(shutil.which("clang") is None, reason="requires clang")
470+
@pytest.mark.skipif(
471+
shutil.which("clang") is None
472+
or int(
473+
subprocess.check_output(["clang", "-dumpversion"], encoding="utf-8").split(
474+
"."
475+
)[0]
476+
)
477+
< 10,
478+
reason="requires clang 10+",
479+
)
471480
def test_hexagon(self, linux):
472481
result = build(tree=linux, target_arch="hexagon", toolchain="clang")
473482
assert result.passed

0 commit comments

Comments
 (0)