Some checks failed
Mark stable commit / test-unit (push) Has been cancelled
Mark stable commit / test-integration (push) Has been cancelled
Mark stable commit / test-env-virtual (push) Has been cancelled
Mark stable commit / test-env-nix (push) Has been cancelled
Mark stable commit / test-e2e (push) Has been cancelled
Mark stable commit / test-virgin-user (push) Has been cancelled
Mark stable commit / test-virgin-root (push) Has been cancelled
Mark stable commit / lint-shell (push) Has been cancelled
Mark stable commit / lint-python (push) Has been cancelled
Mark stable commit / mark-stable (push) Has been cancelled
25 lines
793 B
Python
25 lines
793 B
Python
from tests.e2e._util import run
|
|
import tempfile
|
|
import unittest
|
|
from pathlib import Path
|
|
|
|
|
|
class TestMakefileThreeTimes(unittest.TestCase):
|
|
def test_make_install_three_times(self):
|
|
with tempfile.TemporaryDirectory(prefix="makefile-3x-") as tmp:
|
|
repo = Path(tmp)
|
|
|
|
# Minimal Makefile with install target
|
|
(repo / "Makefile").write_text("install:\n\t@echo install >> install.log\n")
|
|
|
|
for i in range(1, 4):
|
|
print(f"\n=== RUN {i}/3 ===")
|
|
run(["make", "install"], cwd=repo)
|
|
|
|
log = (repo / "install.log").read_text().splitlines()
|
|
self.assertEqual(
|
|
len(log),
|
|
3,
|
|
"make install should have been executed exactly three times",
|
|
)
|