summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-12-02 11:35:54 -0800
committergVisor bot <gvisor-bot@google.com>2020-12-02 11:40:27 -0800
commit24d6eb58e51be706ae66db31d027e2400307152f (patch)
treef3a0838eabfbdbe157af75e184bda16f90924cd1
parent1375a87a209ef1a2523ada84254e3a0101afb4f5 (diff)
Skip generating an empty (broken) test case.
It's possible that all the cases in a given batch are excluded if the offsets line up just right, which will cause the test to fail. Don't generate an invalid test in this case. PiperOrigin-RevId: 345276588
-rw-r--r--test/runtimes/runner/lib/lib.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/runtimes/runner/lib/lib.go b/test/runtimes/runner/lib/lib.go
index 64e6e14db..2f1083baf 100644
--- a/test/runtimes/runner/lib/lib.go
+++ b/test/runtimes/runner/lib/lib.go
@@ -122,6 +122,10 @@ func getTests(ctx context.Context, d *dockerutil.Container, lang, image string,
}
tcs = append(tcs, tests[tc])
}
+ if len(tcs) == 0 {
+ // No tests to add to this batch.
+ continue
+ }
itests = append(itests, testing.InternalTest{
Name: strings.Join(tcs, ", "),
F: func(t *testing.T) {