Skip to content

Commit c509e1c

Browse files
openqa-bats-review: Add other container testsuites using JUnit logging
1 parent 5ae684f commit c509e1c

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

openqa-bats-review

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,6 @@ def resolve_clone_chain(openqa_host: str, job_id: int) -> List[int]:
151151
while current:
152152
# We use "/details" because we'll need this information again and get_job() is cached
153153
job = get_job(f"{openqa_host}/api/v1/jobs/{current}/details")
154-
if "BATS_PACKAGE" not in job["settings"]:
155-
log.error("Not a BATS test: %d", job_id)
156-
sys.exit(1)
157154
chain.append(current)
158155
current = job.get("origin_id")
159156
return chain
@@ -175,15 +172,17 @@ def main(url: str, dry_run: bool = False) -> None:
175172
sys.exit(0)
176173
log.info("Processing clone chain: %s", " -> ".join(map(str, chain)))
177174

178-
# Expected number of logs per package
175+
# Expected number of logs per testsuite
179176
expected = {
180-
"aardvark-dns": 1,
181-
"buildah": 2,
182-
"conmon": 2,
183-
"netavark": 1,
184-
"podman": 4,
185-
"runc": 2,
186-
"skopeo": 2,
177+
"aardvark_testsuite": 1,
178+
"buildah_testsuite": 2,
179+
"conmon_testsuite": 2,
180+
"docker_testsuite": 5,
181+
"netavark_testsuite": 1,
182+
"podman_e2e": 2,
183+
"podman_testsuite": 4,
184+
"runc_testsuite": 2,
185+
"skopeo_testsuite": 2,
187186
}
188187

189188
all_failures = []
@@ -200,16 +199,20 @@ def main(url: str, dry_run: bool = False) -> None:
200199
log.info("Job %s has no logs, skipping", job_id)
201200
continue
202201

203-
package = job["settings"]["BATS_PACKAGE"]
202+
testsuite = (
203+
job["settings"]["TEST"]
204+
.removeprefix("container_host_")
205+
.removesuffix("_crun")
206+
)
204207

205208
# conmon may also test crun in addition to runc on openSUSE where it's available
206209
if (
207210
job["settings"]["DISTRI"] == "opensuse"
208211
and "OCI_RUNTIME" not in job["settings"]
209212
):
210-
expected["conmon"] = 4
213+
expected["conmon_testsuite"] = 4
211214

212-
if len(logs) != expected[package]:
215+
if len(logs) != expected[testsuite]:
213216
log.info("Job %s has only %d logs, skipping", job_id, len(logs))
214217
continue
215218

0 commit comments

Comments
 (0)