INNER CODE UNIT · Python
waitForTestResult
google/oboe · apps/OboeTester/scripts/dsp_timing.py:94
def waitForTestResult():
testOutput = ""
for i in range(10):
if subprocess.call(["adb", "shell", "ls", gOutputFile, "2>/dev/null"]) == 0:
testOutput = subprocess.check_output(["adb", "shell", "cat", gOutputFile])
break
else:
print str(i) + ": waiting until test finishes..."
time.sleep(2)
# print testOutput
subprocess.call(["adb", "shell", "rm", gOutputFile])
return loadNameValuePairsFromString(testOutput)
# volume too low?
# return true if bad
def checkPeakAmplitude(pairs):
if not pairs.has_key('peak.amplitude'):
print "ERROR no peak.amplitude"