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
This commit is contained in:
Adin Scannell 2020-12-02 11:35:54 -08:00 committed by gVisor bot
parent 1375a87a20
commit 24d6eb58e5
1 changed files with 4 additions and 0 deletions

View File

@ -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) {