Added Audio Latency Stress test

Added test parameter “--iterations <nr>” so we can run a 1000 iteration
stress test for Audio Latency.

NOTE: For legacy reasons, not passing “--iterations” option OR passing
“--iterations 1” will perform the Audio Latency and Audio Glitch tests we
see on go/android-media today.

For reviewer: Main entry point for test is “public void run(...)”.
Test runs with screenshots are uploaded to:
https://drive.google.com/drive/folders/0B-xFu1lUmgiqRldHdUhEcFRfWVU?usp=sharing

TEST STRATEGY:
RUN test 1000 times. In each iteration, collect result files from device,
parse and collect data in a ResultData object that also keeps track of
location to test files for a particular iteration.

ANALYZE test results to produce statistics for
1. Latency and Confidence (Min, Max, Mean, Median)
2. Create CSV file with test run data
3. Print bad test data to host log file
4. Get number of test runs with valid data to send to dashboard
5. Produce histogram in host log file; count number of test results that
    fall into 1 ms wide buckets.

UPLOAD test results + log files from “bad” runs; i.e. runs that is missing
some or all result data + that deviates +- 2 ms from Latency Median
value. Uploads up to 5 random files (MAX_NR_OF_LOG_UPLOADS) that
meet criteria above.

Bug: 35153171
Fixes:
Test: tradefed.sh run google/test/framework/media/audio-loopback-stress
 --iterations 1000 -s <device serial number>
Change-Id: I1521b3021bc656d77f01788748f480ce555a7430
5 files changed
tree: b6801244ef0fc7d019abdb4d692ceae5d7642076
  1. src/