diff options
author | Rebecca Silberstein <silberst@google.com> | 2016-09-15 14:04:37 -0700 |
---|---|---|
committer | Rebecca Silberstein <silberst@google.com> | 2016-09-22 16:31:09 +0000 |
commit | a049f83a308e7753b68c1a5036ab67d9806807ec (patch) | |
tree | 310e530ec87fd40ee929b458276eae7a1db58d41 /tests | |
parent | 8a694cf52d152ee11dc2a40727f1ae9127514e8a (diff) |
WifiServiceImpl: move scan results dump to scanner
The dump command includes the most recent scan results. This
information should be dumped directly from WifiScanningServiceImpl
instead of WifiServiceImpl.
The output was also updated to better reflect the age of the entries.
Invalid scan result timestamps are output with "___?___". Values that
are older than the allotted characters are displayed as ">1000.0".
Valid ages were not changed. The character representing
isAutoJoinCandidate was removed from the output. SSID names that are
longer than 32 characters are truncated.
BUG: 31523862
Test: manual check of bugreport output
Test: manual check of adb shell dumpsys wifi output
Test: manual check of adb shell dumpsys wifiscanner output
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I6529fa7b125a6d7d283fd7dc5f8938632ae4e93f
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java b/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java index 0379e592f..b93fa3822 100644 --- a/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java +++ b/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java @@ -1163,6 +1163,12 @@ public class WifiScanningServiceTest { List<ScanResult> results = Arrays.asList( ((WifiScanner.ParcelableScanResults) response.obj).getResults()); assertEquals(results.size(), expectedResults.getRawScanResults().length); + + // Make sure that we logged the scan results in the dump method. + String serviceDump = dumpService(); + Pattern logLineRegex = Pattern.compile("Latest scan results:"); + assertTrue("dump did not contain Latest scan results: " + serviceDump + "\n", + logLineRegex.matcher(serviceDump).find()); } /** |