Skip to content

Commit

Permalink
NO-JIRA: chore(tests): use gmake on macOS
Browse files Browse the repository at this point in the history
This is a followup to
* opendatahub-io#799
  • Loading branch information
jiridanek committed Jan 8, 2025
1 parent f82d367 commit b73264b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import logging
import pathlib
import shutil
import subprocess
import tomllib
from typing import TYPE_CHECKING
Expand All @@ -11,7 +12,7 @@
import pytest_subtests

PROJECT_ROOT = pathlib.Path(__file__).parent.parent

MAKE = shutil.which("gmake") or shutil.which("make")

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

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

0 comments on commit b73264b

Please sign in to comment.