From 4e8445daee25e3c227edf005c3766d1dd8c30316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Sat, 7 Dec 2024 22:42:36 +0100 Subject: [PATCH] NO-JIRA: fix selftest, need to use gmake on macOS --- ci/cached-builds/gha_pr_changed_files.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/cached-builds/gha_pr_changed_files.py b/ci/cached-builds/gha_pr_changed_files.py index 17b754c03..b2bc5e0e9 100644 --- a/ci/cached-builds/gha_pr_changed_files.py +++ b/ci/cached-builds/gha_pr_changed_files.py @@ -2,10 +2,12 @@ import os import pathlib import re +import shutil import subprocess import unittest PROJECT_ROOT = pathlib.Path(__file__).parent.parent.parent.resolve() +MAKE = shutil.which("gmake") or shutil.which("make") def get_github_token() -> str: @@ -30,7 +32,7 @@ def analyze_build_directories(make_target) -> list[str]: pattern = re.compile(r"#\*# Image build directory: <(?P[^>]+)> #\(MACHINE-PARSED LINE\)#\*#\.\.\.") try: logging.debug(f"Running make in --just-print mode for target {make_target}") - for line in subprocess.check_output(["make", make_target, "--just-print"], encoding="utf-8", + for line in subprocess.check_output([MAKE, make_target, "--just-print"], encoding="utf-8", cwd=PROJECT_ROOT).splitlines(): if m := pattern.match(line): directories.append(m["dir"])