fix tc ordering

This commit is contained in:
2026-07-23 14:57:43 -04:00
parent 23ae3a2f3a
commit f2d2a6c2e7
3 changed files with 17 additions and 14 deletions
+5 -7
View File
@@ -399,8 +399,8 @@ def get_completed_dut_test_ids(db_path: str | Path = DB_PATH) -> set[str]:
return {row["test_id"] for row in rows}
# Get tests for device that are not excluded regardless of completion status.
def get_not_excluded_tests(device: str, db_path: str | Path = DB_PATH, rules: dict[str, Any] | None = None) -> list[TestRecord]:
tokens = _parse_rule_tokens(rules.get("rule") if rules else "") if rules else []
def get_not_excluded_tests(db_path: str | Path = DB_PATH, rule: str = "") -> list[TestRecord]:
tokens = _parse_rule_tokens(rule)
with get_connection(db_path) as conn:
rows = conn.execute(
"""
@@ -411,12 +411,10 @@ def get_not_excluded_tests(device: str, db_path: str | Path = DB_PATH, rules: di
excluded, status, raw_payload
FROM tests
WHERE excluded = 0
AND device = ?
""",
(device,)
"""
).fetchall()
results: list[TestRecord] = []
results: list[TestRecord] = []
for row in rows:
results.append(
TestRecord(