CI: pass the export parameter to the tests
We instruct the tests on where to dump the failed tests reports.
@@ -744,8 +744,16 @@ def e2etest(ctx, name="kind", export=None, kubeconfig=None, system_namespaces="k
ipv6_service_range, ips = get_available_ips(6)
ips_for_containers_v6 = "--ips-for-containers-v6=" + ips
+ if export != None:
+ report_path = export
+ else:
+ report_path = "/tmp/metallbreport{}".format(time.time())
+
+ print("Writing reports to {}".format(report_path))
+ os.makedirs(report_path, exist_ok=True)
+
testrun = run("cd `git rev-parse --show-toplevel`/e2etest &&"
- "KUBECONFIG={} go test -timeout 2h {} {} --provider=local --kubeconfig={} --service-pod-port={} {} {} -ipv4-service-range={} -ipv6-service-range={} {}".format(kubeconfig, ginkgo_focus, ginkgo_skip, kubeconfig, service_pod_port, ips_for_containers_v4, ips_for_containers_v6, ipv4_service_range, ipv6_service_range, opt_skip_docker), warn="True")
+ "KUBECONFIG={} go test -timeout 2h {} {} --provider=local --kubeconfig={} --service-pod-port={} {} {} -ipv4-service-range={} -ipv6-service-range={} {} --report-path {}".format(kubeconfig, ginkgo_focus, ginkgo_skip, kubeconfig, service_pod_port, ips_for_containers_v4, ips_for_containers_v6, ipv4_service_range, ipv6_service_range, opt_skip_docker, report_path), warn="True")
if export != None:
run("kind export logs {}".format(export))
