INNER CODE UNIT · Python
loadNameValuePairsFromString
google/oboe · apps/OboeTester/scripts/dsp_timing.py:86
def loadNameValuePairsFromString(text):
myvars = {}
listOutput = text.splitlines()
for line in listOutput:
name, var = line.partition("=")[::2]
myvars[name.strip()] = var
return myvars
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