Skip test if PSDS server is not configured
Test: atest GnssPsdsDownloadsStatsTest
Bug: 228556323
Change-Id: If6a8493ffea014aa21bdb88f9aaedb37df9c3c0d
diff --git a/hostsidetests/statsdatom/src/android/cts/statsdatom/gnss/GnssPsdsDownloadStatsTest.java b/hostsidetests/statsdatom/src/android/cts/statsdatom/gnss/GnssPsdsDownloadStatsTest.java
index 1b43aa2..2c15fba 100644
--- a/hostsidetests/statsdatom/src/android/cts/statsdatom/gnss/GnssPsdsDownloadStatsTest.java
+++ b/hostsidetests/statsdatom/src/android/cts/statsdatom/gnss/GnssPsdsDownloadStatsTest.java
@@ -41,6 +41,7 @@
private static final String FORCE_PSDS_DOWNLOAD_COMMAND =
"cmd location providers send-extra-command gps force_psds_injection";
private static final String PSDS_SUPPORTED = "mSupportsPsds=true";
+ private static final String PSDS_SERVER_CONFIGURED = "PsdsServerConfigured=true";
private static final long PSDS_DOWNLOAD_TIMEOUT_MILLIS = 5000;
private IBuildInfo mCtsBuild;
@@ -69,8 +70,9 @@
public void testGnssPsdsDownload() throws Exception {
String dumpsysOut = getDevice().executeShellCommand(LOCATION_DUMPSYS_COMMAND);
- if (!dumpsysOut.contains(PSDS_SUPPORTED)) {
- CLog.i("Skipping the test since GNSS PSDS is not supported.");
+ if (!dumpsysOut.contains(PSDS_SUPPORTED) || !dumpsysOut.contains(PSDS_SERVER_CONFIGURED)) {
+ CLog.i("Skipping the test since GNSS PSDS is not supported or PSDS server is not "
+ + "configured.");
return;
}
ConfigUtils.uploadConfigForPushedAtom(getDevice(), DeviceUtils.STATSD_ATOM_TEST_PKG,