Capture/Replay: rework capture_replay_tests, enable linux-trace Changing the way capture_replay_tests orders its stages. Previously, build, capture and replay would all run concurrently in multiple processes sometimes causing difficult to understand interaction between those stages. This CL changes it so that the test follows stages sequentially: * Build end2end tests * Run all capture tests (in parallel) * Check captured files and produce a single build for replay * Build replay binary and all tests * Run all replay tests (in parallel, but _one by one_) Note that running replay tests one by one avoids the confusing batch failures altogether. Now when a replay test is broken, the logs will specifically identify which one caused the issue. This also noticeably improves CI time as ninja builds of bigger batches are more efficient and possibly less linking is happening. Additionally, xvfb is supported directly in the script without relying on testing/xvfb.py, in a way that reuses xvfb displays instead of starting/stopping xvfb for each test and avoids races that are possible when running testing/xvfb.py concurrently (such as picking which display to use). This appears to significantly improve stability on linux-trace which have had to be disabled due to the flakiness. Bug: angleproject:42264614 Change-Id: I38a5547250cf5f63b8b9e4879f02cd715d8df0a9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5721996 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>