Skip to content

Commit 5c11485

Browse files
committed
Make QA suite test deterministic on headless CI
The pass/fail cases asserted on window state via AC_assert_window, which is Windows-only and raises NotImplementedError on macOS / Linux CI. The suite runner scores that as 'error', not pass/fail, so passed/failed counts and the JUnit failure total were wrong off-Windows. Switch to a filesystem assertion (AC_assert_file) that is deterministic on every platform and raises a proper AutoControlAssertionException on mismatch.
1 parent 42c15b7 commit 5c11485

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

test/unit_test/headless/test_test_suite.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@
1010
write_allure_results, write_junit_xml,
1111
)
1212

13-
_PASS = ["AC_assert_window", {"title": "zzz_no_window", "exists": False}]
14-
_FAIL = ["AC_assert_window", {"title": "zzz_no_window", "exists": True}]
13+
# Use a filesystem assertion so the pass/fail outcome is deterministic on
14+
# every platform. ``AC_assert_window`` is Windows-only (it raises
15+
# NotImplementedError on macOS / Linux CI, which the suite runner scores as
16+
# *error* rather than pass/fail); ``AC_assert_file`` only touches the
17+
# filesystem and raises ``AutoControlAssertionException`` on mismatch.
18+
_MISSING_FILE = "zzz_no_such_dir_qa/zzz_no_such_file.tmp"
19+
_PASS = ["AC_assert_file", {"path": _MISSING_FILE, "exists": False}]
20+
_FAIL = ["AC_assert_file", {"path": _MISSING_FILE, "exists": True}]
1521

1622

1723
def _spec():

0 commit comments

Comments
 (0)