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
This commit is contained in:
parent
dc8450b567
commit
6c117a01e9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue