Files
AnyPS5/tools/tests/test_relinker_test_step.py
T
MarcZX10 be8ea1e172 test(ci): require the relinker test step to fail on zero tests
The test reads the relinker ctest line of build.yml and checks that it passes --no-tests=error. Against the previous line it fails.
2026-10-31 22:38:28 +00:00

17 lines
528 B
Python

import unittest
from pathlib import Path
WORKFLOW = Path(__file__).resolve().parents[2] / ".github/workflows/build.yml"
class RelinkerTestStepTests(unittest.TestCase):
def test_relinker_ctest_fails_when_no_test_is_registered(self):
steps = [line for line in WORKFLOW.read_text(encoding="utf-8").splitlines()
if "ctest --test-dir build-relinker " in line]
self.assertEqual(len(steps), 1)
self.assertIn("--no-tests=error", steps[0])
if __name__ == "__main__":
unittest.main()