Commit 8956bfb9 by Manh Nguyen Committed by Commit Bot

Use striping when making test batches

When grouping tests to test batches, instead of grouping neighboring tests together, use striping so that slow tests are fanned out into multiple batches. This way, no test batch is too slow. Bug: angleproject:4817 Change-Id: I7825539e401ea53b5a31167f206d1f5bfb07bdbf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2339540Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Commit-Queue: Manh Nguyen <nguyenmh@google.com>
parent d5099cc1
...@@ -862,15 +862,13 @@ def main(capture_build_dir, replay_build_dir, use_goma, gtest_filter, test_exec, ...@@ -862,15 +862,13 @@ def main(capture_build_dir, replay_build_dir, use_goma, gtest_filter, test_exec,
# put the test batchs into the job queue # put the test batchs into the job queue
for batch_index in range(test_batch_num): for batch_index in range(test_batch_num):
batch = TestBatch(use_goma, batch_count, keep_temp_files, goma_dir) batch = TestBatch(use_goma, batch_count, keep_temp_files, goma_dir)
for test_in_batch_index in range(batch.batch_count): test_index = batch_index
test_index = batch_index * batch.batch_count + test_in_batch_index while test_index < len(test_names_and_params):
if test_index >= len(test_names_and_params):
break
batch.AddTest( batch.AddTest(
Test(test_names_and_params[test_index][0], Test(test_names_and_params[test_index][0],
test_names_and_params[test_index][1])) test_names_and_params[test_index][1]))
test_index += test_batch_num
job_queue.put(batch) job_queue.put(batch)
# set the static environment variables that do not change throughout the script run # set the static environment variables that do not change throughout the script run
environment_vars = [("ANGLE_CAPTURE_FRAME_END", "100"), environment_vars = [("ANGLE_CAPTURE_FRAME_END", "100"),
("ANGLE_CAPTURE_SERIALIZE_STATE", "1")] ("ANGLE_CAPTURE_SERIALIZE_STATE", "1")]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment