Skip to content

Commit cc4098a

Browse files
Merge pull request #819 from jiridanek/jd_gmake
NO-JIRA: chore(tests): use gmake on macOS
2 parents d57ab12 + dfb516c commit cc4098a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import os
44
import logging
55
import pathlib
6+
import shutil
67
import subprocess
78
import tomllib
89
from typing import TYPE_CHECKING
@@ -11,7 +12,7 @@
1112
import pytest_subtests
1213

1314
PROJECT_ROOT = pathlib.Path(__file__).parent.parent
14-
15+
MAKE = shutil.which("gmake") or shutil.which("make")
1516

1617
def test_image_pipfiles(subtests: pytest_subtests.plugin.SubTests):
1718
for file in PROJECT_ROOT.glob("**/Pipfile"):
@@ -59,7 +60,7 @@ def dryrun_make(make_args: list[str], env: dict[str, str] | None = None) -> list
5960

6061
try:
6162
logging.info(f"Running make in --just-print mode for target(s) {make_args} with env {env}")
62-
lines = subprocess.check_output(["make", "--just-print", *make_args], encoding="utf-8",
63+
lines = subprocess.check_output([MAKE, "--just-print", *make_args], encoding="utf-8",
6364
env={**os.environ, **env},
6465
cwd=PROJECT_ROOT).splitlines()
6566
for line in lines:

0 commit comments

Comments
 (0)