Print the result of command when test is failed
When ConnectivityManagerTest#testGetMultipathPreference() is failed, it only prints "Unexpected format from cmd netpolicy" and it's not helpful. Print the result of command can help people to know what's the difference between expected result and actual result. Bug: 187921745 Test: atest CtsNetTestCases:ConnectivityManagerTest#testGetMultipathPreference Original-Change: https://android-review.googlesource.com/1749262 Merged-In: I63cd4b043e7c70775156aa5244d25ee2268f9f32 Change-Id: I63cd4b043e7c70775156aa5244d25ee2268f9f32
This commit is contained in:
@@ -1085,7 +1085,7 @@ public class ConnectivityManagerTest {
|
||||
final Matcher m = Pattern.compile("^" + ssid + ";(true|false|none)$",
|
||||
Pattern.MULTILINE | Pattern.UNIX_LINES).matcher(policyString);
|
||||
if (!m.find()) {
|
||||
fail("Unexpected format from cmd netpolicy");
|
||||
fail("Unexpected format from cmd netpolicy, policyString = " + policyString);
|
||||
}
|
||||
return m.group(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user