[RTT][CTS] Add information to assert to help debug failures

Modify the assert message to print out the # of failures and the total
number of iterations. Will help diagnose scope of test failures.

Bug: 109836816
Test: atest WifiRttTest
Change-Id: Ic4d5b6844225edbd9704694c539e31754b7a340c
This commit is contained in:
Etan Cohen
2018-06-14 08:51:43 -07:00
parent 78f8585339
commit eeea3d5510

View File

@@ -157,7 +157,8 @@ public class WifiRttTest extends TestBase {
reportLog.submit();
// Analyze results
assertTrue("Wi-Fi RTT failure rate exceeds threshold",
assertTrue("Wi-Fi RTT failure rate exceeds threshold: FAIL=" + numFailures + ", ITERATIONS="
+ NUM_OF_RTT_ITERATIONS,
numFailures <= NUM_OF_RTT_ITERATIONS * MAX_FAILURE_RATE_PERCENT / 100);
if (numFailures != NUM_OF_RTT_ITERATIONS) {
double distanceAvg = distanceSum / (NUM_OF_RTT_ITERATIONS - numFailures);