From 6c117a01e97b5604dc474cf02269cf03fc797af8 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 15 Jan 2019 11:14:59 -0800 Subject: Set end of subslice as begin of next subslice syscall test split testcase via shard count, reset high bound as begin of next subslice, cause the slice is half-open range. Change-Id: I1954f57c93cbfd9be518153315da305a2de377a0 PiperOrigin-RevId: 229405199 --- test/syscalls/syscall_test_runner.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/syscalls/syscall_test_runner.go b/test/syscalls/syscall_test_runner.go index 0149afd60..1f2ff9864 100644 --- a/test/syscalls/syscall_test_runner.go +++ b/test/syscalls/syscall_test_runner.go @@ -271,7 +271,8 @@ func main() { // Calculate subslice of tests to run. shardSize := int(math.Ceil(float64(len(testCases)) / float64(total))) begin := index * shardSize - end := ((index + 1) * shardSize) - 1 + // Set end as begin of next subslice. + end := ((index + 1) * shardSize) if begin > len(testCases) { // Nothing to run. return -- cgit v1.2.3