Optimize memory usage for new Flicker JUnit runner

Because we now pre-run all runs in the test computation stage we accumulate lots of memory from all the test results which we need to keep to avoid re-running the runs when it comes to checking the assertions. So we now keep track of the run results in one zip file per run and clear the results from memory between those two stages to only have the large results in memory when we actually need them. This avoids getting OOM exceptions when running many tests at once.

This also includes a refactor of the FlickerRunResult to simplify the logic of caching run results in storage. Now a run result includes all the results from an iteration instead of being split in multiple run results by tag.

Test: atest FlickerLibTest
Bug: 236592450
Change-Id: I9fc92d6012c78b08b9583ec4a3264fc4c9845b09
28 files changed
tree: 9091837d41c7793cd046806129abf64e275528a4
  1. build/
  2. docs/
  3. emu_test/
  4. libraries/
  5. scripts/
  6. tests/
  7. utils/
  8. PREUPLOAD.cfg