summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-12-21 02:11:23 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-12-21 02:11:23 +0000
commit29b5e2f669e18205ec239b6f401044d8e739127f (patch)
tree52c7d622872b5e965e6810e3c074e00ebdec365c
parent4c18d71d77bdbfd1d8c5dcd2f9be0293765def9f (diff)
parentda37944ce4ee5364cf32446b9d35d58af02699fb (diff)
downloadplatform_test_suite_harness-android10-qpr2-s3-release.tar.gz
platform_test_suite_harness-android10-qpr2-s3-release.tar.bz2
platform_test_suite_harness-android10-qpr2-s3-release.zip
Change-Id: Id8e8f521f210d66e7e2b8e8052fa48dbf836ad1f
-rw-r--r--OWNERS2
-rw-r--r--build/tradefed_binary.go3
-rw-r--r--common/host-side/tradefed/.classpath1
-rw-r--r--common/host-side/tradefed/res/config/common-compatibility-config.xml4
-rw-r--r--common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildHelper.java31
-rw-r--r--common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProvider.java3
-rw-r--r--common/host-side/tradefed/src/com/android/compatibility/common/tradefed/command/CompatibilityConsole.java65
-rw-r--r--common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ConsoleReporter.java2
-rw-r--r--common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ResultReporter.java10
-rw-r--r--common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporter.java20
-rw-r--r--common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/CompatibilityProtoResultReporter.java55
-rw-r--r--common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/PreviousResultLoader.java59
-rw-r--r--common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/ApkInstrumentationPreparer.java20
-rw-r--r--common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/BusinessLogicPreparer.java18
-rw-r--r--common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/LocationCheck.java22
-rw-r--r--common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/MediaPreparer.java4
-rw-r--r--common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/ReportLogCollector.java20
-rw-r--r--common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProviderTest.java15
-rw-r--r--common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/presubmit/CtsConfigLoadingTest.java78
-rw-r--r--common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/suite/PreviousResultLoaderTest.java137
-rw-r--r--common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/targetprep/BusinessLogicPreparerTest.java17
-rw-r--r--common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/testtype/retry/RetryFactoryTestTest.java1
-rw-r--r--common/host-side/util/src/com/android/compatibility/common/util/PollingCheck.java152
-rw-r--r--common/host-side/util/src/com/android/compatibility/common/util/ProtoUtils.java47
-rw-r--r--common/host-side/util/tests/src/com/android/compatibility/common/util/HostUnitTests.java5
-rw-r--r--common/host-side/util/tests/src/com/android/compatibility/common/util/PollingCheckTest.java134
-rw-r--r--common/util/.classpath1
-rw-r--r--common/util/src/com/android/compatibility/common/util/BackupUtils.java8
-rw-r--r--common/util/src/com/android/compatibility/common/util/BusinessLogicExecutor.java7
-rw-r--r--common/util/src/com/android/compatibility/common/util/CrashUtils.java2
-rw-r--r--common/util/src/com/android/compatibility/common/util/InvocationResult.java1
-rw-r--r--common/util/tests/src/com/android/compatibility/common/util/BackupUtilsTest.java85
-rwxr-xr-xtools/cts-tradefed/etc/cts-tradefed4
-rw-r--r--tools/cts-tradefed/res/config/cts-common.xml7
-rwxr-xr-xtools/cts-tradefed/res/config/cts-known-failures.xml14
-rw-r--r--tools/cts-tradefed/res/config/cts-on-gsi-base-filters.xml52
-rw-r--r--tools/cts-tradefed/res/config/cts-on-gsi-exclude.xml294
-rw-r--r--tools/cts-tradefed/res/config/cts-on-gsi-presubmit.xml29
-rw-r--r--tools/cts-tradefed/res/config/cts-on-gsi.xml28
-rw-r--r--tools/cts-tradefed/res/config/cts-preconditions.xml7
40 files changed, 212 insertions, 1252 deletions
diff --git a/OWNERS b/OWNERS
index 0420e236..d5f07b97 100644
--- a/OWNERS
+++ b/OWNERS
@@ -11,4 +11,4 @@ yuji@google.com
nickrose@google.com
# File Specific Approvers
-per-file Backup* = alsutton@google.com, anniemeng@google.com, brufino@google.com, nathch@google.com, rthakohov@google.com
+per-file Backup* = anniemeng@google.com, brufino@google.com, nathch@google.com, rthakohov@google.com
diff --git a/build/tradefed_binary.go b/build/tradefed_binary.go
index 8552b3ae..6e11eacb 100644
--- a/build/tradefed_binary.go
+++ b/build/tradefed_binary.go
@@ -18,7 +18,6 @@ import (
"strings"
"github.com/google/blueprint"
- "github.com/google/blueprint/proptools"
"android/soong/android"
"android/soong/java"
@@ -127,7 +126,7 @@ func (tfg *tradefedBinaryGen) GenerateAndroidBuildActions(ctx android.ModuleCont
Rule: tradefedBinaryGenRule,
Output: outputFile,
Args: map[string]string{
- "buildNumber": proptools.NinjaEscape(ctx.Config().BuildNumberFromFile()),
+ "buildNumber": ctx.Config().BuildNumberFromFile(),
"arch": ctx.Config().DevicePrimaryArchType().String(),
"name": tfg.properties.Short_name,
"fullname": tfg.properties.Full_name,
diff --git a/common/host-side/tradefed/.classpath b/common/host-side/tradefed/.classpath
index 44c5d0f4..52d464a5 100644
--- a/common/host-side/tradefed/.classpath
+++ b/common/host-side/tradefed/.classpath
@@ -16,6 +16,5 @@
<classpathentry kind="var" path="TRADEFED_ROOT/out/soong/.intermediates/tools/tradefederation/core/tradefed-protos/linux_glibc_common/combined/tradefed-protos.jar"/>
<classpathentry kind="var" path="TRADEFED_ROOT/prebuilts/tools/common/google-api-java-client/1.23.0/google-api-java-client-min-repackaged-1.23.0.jar"/>
<classpathentry kind="var" path="TRADEFED_ROOT/prebuilts/tools/common/m2/repository/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar"/>
- <classpathentry kind="var" path="TRADEFED_ROOT/out/soong/.intermediates/external/guava/guava-jre/linux_glibc_common/combined/guava-jre.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/common/host-side/tradefed/res/config/common-compatibility-config.xml b/common/host-side/tradefed/res/config/common-compatibility-config.xml
index 264c2981..8182ddf1 100644
--- a/common/host-side/tradefed/res/config/common-compatibility-config.xml
+++ b/common/host-side/tradefed/res/config/common-compatibility-config.xml
@@ -28,8 +28,6 @@
<option name="log-level-display" value="WARN" />
</logger>
<result_reporter class="com.android.compatibility.common.tradefed.result.ConsoleReporter" />
- <result_reporter class="com.android.compatibility.common.tradefed.result.suite.CompatibilityProtoResultReporter">
- <option name="periodic-proto-writing" value="true" />
- </result_reporter>
+ <result_reporter class="com.android.compatibility.common.tradefed.result.suite.CompatibilityProtoResultReporter" />
<result_reporter class="com.android.compatibility.common.tradefed.result.suite.CertificationSuiteResultReporter" />
</configuration>
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildHelper.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildHelper.java
index e6d0a42f..0cb312ae 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildHelper.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildHelper.java
@@ -328,34 +328,21 @@ public class CompatibilityBuildHelper {
* @throws FileNotFoundException if the test file cannot be found
*/
public File getTestFile(String filename, IAbi abi) throws FileNotFoundException {
- File testsDir = getTestsDir();
+ File[] testDirs = {getTestsDir()};
- // The file may be in a subdirectory so do a more thorough search
+ // The file may be in a subdirectory so do a more through search
// if it did not exist.
File testFile = null;
- try {
- testFile = FileUtil.findFile(filename, abi, testsDir);
- if (testFile != null) {
- return testFile;
+ for (File testDir: testDirs) {
+ try {
+ testFile = FileUtil.findFile(filename, abi, testDir);
+ } catch (IOException e) {
+ throw new FileNotFoundException(String.format(
+ "Failure in finding compatibility test file %s due to %s", filename, e));
}
-
- // TODO(b/138416078): Once build dependency can be fixed and test required APKs are all
- // under the test module directory, we can remove this fallback approach to do
- // individual download from remote artifact.
- // Try to stage the files from remote zip files.
- testFile = mBuildInfo.stageRemoteFile(filename, testsDir);
if (testFile != null) {
- // Search again to match the given abi.
- testFile = FileUtil.findFile(filename, abi, testsDir);
- if (testFile != null) {
- return testFile;
- }
+ return testFile;
}
- } catch (IOException e) {
- throw new FileNotFoundException(
- String.format(
- "Failure in finding compatibility test file %s due to %s",
- filename, e));
}
throw new FileNotFoundException(String.format(
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProvider.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProvider.java
index 4cc704d2..d84483ec 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProvider.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProvider.java
@@ -280,8 +280,7 @@ public class CompatibilityBuildProvider implements IDeviceBuildProvider, IInvoca
*/
@VisibleForTesting
String getRootDirPath() {
- // Replace - in the suite name with _, as environment variable can't have - in name.
- String varName = String.format("%s_ROOT", getSuiteInfoName().replace('-', '_'));
+ String varName = String.format("%s_ROOT", getSuiteInfoName());
String rootDirVariable = System.getProperty(varName);
if (rootDirVariable != null) {
return rootDirVariable;
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/command/CompatibilityConsole.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/command/CompatibilityConsole.java
index 696423a8..7747ca59 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/command/CompatibilityConsole.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/command/CompatibilityConsole.java
@@ -39,7 +39,6 @@ import com.android.tradefed.testtype.IAbi;
import com.android.tradefed.testtype.IRemoteTest;
import com.android.tradefed.testtype.IRuntimeHintProvider;
import com.android.tradefed.testtype.suite.TestSuiteInfo;
-import com.android.tradefed.testtype.suite.params.ModuleParameters;
import com.android.tradefed.util.AbiUtils;
import com.android.tradefed.util.FileUtil;
import com.android.tradefed.util.MultiMap;
@@ -124,26 +123,12 @@ public class CompatibilityConsole extends Console {
listPlans();
}
}, LIST_PATTERN, "p(?:lans)?");
- trie.put(
- new Runnable() {
- @Override
- public void run() {
- listModules(null);
- }
- },
- LIST_PATTERN,
- "m(?:odules)?");
- trie.put(
- new ArgRunnable<CaptureList>() {
- @Override
- public void run(CaptureList args) {
- String parameter = args.get(2).get(0);
- listModules(parameter);
- }
- },
- LIST_PATTERN,
- "m(?:odules)?",
- "(.*)");
+ trie.put(new Runnable() {
+ @Override
+ public void run() {
+ listModules();
+ }
+ }, LIST_PATTERN, "m(?:odules)?");
trie.put(new Runnable() {
@Override
public void run() {
@@ -202,24 +187,13 @@ public class CompatibilityConsole extends Console {
// no help? Unexpected, but soldier on
listHelp = new String();
}
- String combinedHelp =
- listHelp
- + LINE_SEPARATOR
- + "\t----- "
- + TestSuiteInfo.getInstance().getFullName()
- + " specific options ----- "
- + LINE_SEPARATOR
- + "\tp[lans] List all plans available"
- + LINE_SEPARATOR
- + "\tm[odules] List all modules available"
- + LINE_SEPARATOR
- + String.format(
- "\tm[odules] [module parameter] List all modules matching the "
- + "parameter. (available params: %s)",
- Arrays.asList(ModuleParameters.values()))
- + LINE_SEPARATOR
- + "\tr[esults] List all results"
- + LINE_SEPARATOR;
+ String combinedHelp = listHelp +
+ LINE_SEPARATOR +
+ "\t----- " + TestSuiteInfo.getInstance().getFullName()
+ + " specific options ----- " + LINE_SEPARATOR +
+ "\tp[lans] List all plans available" + LINE_SEPARATOR +
+ "\tm[odules] List all modules available" + LINE_SEPARATOR +
+ "\tr[esults] List all results" + LINE_SEPARATOR;
commandHelp.put(LIST_PATTERN, combinedHelp);
// Update existing RUN_PATTERN with CTS specific extra run possibilities.
@@ -273,13 +247,7 @@ public class CompatibilityConsole extends Console {
return String.format("%s-tf > ", TestSuiteInfo.getInstance().getName().toLowerCase());
}
- /**
- * List all the modules available in the suite, if a specific parameter is requested, only
- * display that one.
- *
- * @param moduleParameter The parameter requested to be displayed. Null if all should be shown.
- */
- private void listModules(String moduleParameter) {
+ private void listModules() {
CompatibilityTestSuite test = new CompatibilityTestSuite() {
@Override
public Set<IAbi> getAbis(ITestDevice device) throws DeviceNotAvailableException {
@@ -294,11 +262,6 @@ public class CompatibilityConsole extends Console {
}
};
if (getBuild() != null) {
- test.setEnableParameterizedModules(true);
- test.setEnableOptionalParameterizedModules(true);
- if (moduleParameter != null) {
- test.setModuleParameter(ModuleParameters.valueOf(moduleParameter.toUpperCase()));
- }
test.setBuild(getBuild());
LinkedHashMap<String, IConfiguration> configs = test.loadTests();
printLine(String.format("%s", Joiner.on("\n").join(configs.keySet())));
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ConsoleReporter.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ConsoleReporter.java
index c9338d11..2464c0de 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ConsoleReporter.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ConsoleReporter.java
@@ -39,7 +39,7 @@ public class ConsoleReporter implements IShardableListener {
private static final String UNKNOWN_DEVICE = "unknown_device";
@Option(name = "quiet-output", description = "Mute display of test results.")
- private boolean mQuietOutput = true;
+ private boolean mQuietOutput = false;
private String mDeviceSerial = UNKNOWN_DEVICE;
private boolean mTestFailed;
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ResultReporter.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ResultReporter.java
index 6b6abff4..1531d2f4 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ResultReporter.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ResultReporter.java
@@ -101,7 +101,6 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene
/** Used to get run history from the test result of last run. */
private static final String RUN_HISTORY_KEY = "run_history";
-
public static final String BUILD_BRAND = "build_brand";
public static final String BUILD_DEVICE = "build_device";
public static final String BUILD_FINGERPRINT = "build_fingerprint";
@@ -569,11 +568,6 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene
String moduleProgress = String.format("%d of %d",
mResult.getModuleCompleteCount(), mResult.getModules().size());
-
- if (shouldSkipReportCreation()) {
- return;
- }
-
// Get run history from the test result of last run and add the run history of the current
// run to it.
// TODO(b/137973382): avoid casting by move the method to interface level.
@@ -590,6 +584,10 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene
runHistories.add(newRun);
mResult.addInvocationInfo(RUN_HISTORY_KEY, gson.toJson(runHistories));
+ if (shouldSkipReportCreation()) {
+ return;
+ }
+
try {
// Zip the full test results directory.
copyDynamicConfigFiles();
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporter.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporter.java
index b4cfb46e..8c497a37 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporter.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporter.java
@@ -34,7 +34,6 @@ import com.android.tradefed.result.InputStreamSource;
import com.android.tradefed.result.LogDataType;
import com.android.tradefed.result.LogFile;
import com.android.tradefed.result.LogFileSaver;
-import com.android.tradefed.result.SnapshotInputStreamSource;
import com.android.tradefed.result.TestRunResult;
import com.android.tradefed.result.TestSummary;
import com.android.tradefed.result.suite.IFormatterGenerator;
@@ -54,7 +53,6 @@ import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Collection;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
@@ -114,10 +112,7 @@ public class CertificationSuiteResultReporter extends XmlFormattedGeneratorRepor
private ResultUploader mUploader;
- /** LogFileSaver to copy the file to the CTS results folder */
private LogFileSaver mTestLogSaver;
-
- private Map<LogFile, InputStreamSource> mPreInvocationLogs = new HashMap<>();
/** Invocation level Log saver to receive when files are logged */
private ILogSaver mLogSaver;
/** Invocation level configuration */
@@ -164,12 +159,6 @@ public class CertificationSuiteResultReporter extends XmlFormattedGeneratorRepor
testLogDeviceInfo(name, stream);
return;
}
- if (mTestLogSaver == null) {
- LogFile info = new LogFile(name, null, type);
- mPreInvocationLogs.put(
- info, new SnapshotInputStreamSource(name, stream.createInputStream()));
- return;
- }
try {
File logFile = null;
if (mCompressLogs) {
@@ -291,17 +280,8 @@ public class CertificationSuiteResultReporter extends XmlFormattedGeneratorRepor
throw new IllegalArgumentException(String.format("Could not create log dir %s",
mLogDir.getAbsolutePath()));
}
- // During sharding, we reach here before invocationStarted is called so the log_saver will
- // be null at that point.
if (mTestLogSaver == null) {
mTestLogSaver = new LogFileSaver(mLogDir);
- // Log all the early logs from before init.
- for (LogFile earlyLog : mPreInvocationLogs.keySet()) {
- try (InputStreamSource source = mPreInvocationLogs.get(earlyLog)) {
- testLog(earlyLog.getPath(), earlyLog.getType(), source);
- }
- }
- mPreInvocationLogs.clear();
}
}
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/CompatibilityProtoResultReporter.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/CompatibilityProtoResultReporter.java
index fe57e3a2..823dc2b1 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/CompatibilityProtoResultReporter.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/CompatibilityProtoResultReporter.java
@@ -18,21 +18,24 @@ package com.android.compatibility.common.tradefed.result.suite;
import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
import com.android.tradefed.invoker.IInvocationContext;
import com.android.tradefed.log.LogUtil.CLog;
-import com.android.tradefed.result.proto.FileProtoResultReporter;
+import com.android.tradefed.result.proto.ProtoResultReporter;
import com.android.tradefed.result.proto.TestRecordProto.TestRecord;
import java.io.File;
import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
-/** Proto reporter that will drop a {@link TestRecord} protobuf in the result directory. */
-public class CompatibilityProtoResultReporter extends FileProtoResultReporter {
+/**
+ * Proto reporter that will drop a {@link TestRecord} protobuf in the result directory.
+ */
+public class CompatibilityProtoResultReporter extends ProtoResultReporter {
public static final String PROTO_FILE_NAME = "test-record.pb";
- public static final String PROTO_DIR = "proto";
private CompatibilityBuildHelper mBuildHelper;
- /** The directory containing the proto results */
+ /** The directory containing the results */
private File mResultDir = null;
@Override
@@ -40,30 +43,40 @@ public class CompatibilityProtoResultReporter extends FileProtoResultReporter {
TestRecord invocationStartRecord, IInvocationContext invocationContext) {
if (mBuildHelper == null) {
mBuildHelper = new CompatibilityBuildHelper(invocationContext.getBuildInfos().get(0));
- mResultDir = getProtoResultDirectory();
- File protoFile = new File(mResultDir, PROTO_FILE_NAME);
- setFileOutput(protoFile);
}
- super.processStartInvocation(invocationStartRecord, invocationContext);
}
- private File getProtoResultDirectory() {
- File protoDir = null;
+ @Override
+ public void processFinalProto(TestRecord finalRecord) {
+ super.processFinalProto(finalRecord);
+
+ mResultDir = getResultDirectory();
+ File protoFile = new File(mResultDir, PROTO_FILE_NAME);
try {
- File resultDir = mBuildHelper.getResultDir();
- if (resultDir != null) {
- resultDir.mkdirs();
+ finalRecord.writeDelimitedTo(new FileOutputStream(protoFile));
+ } catch (IOException e) {
+ CLog.e(e);
+ throw new RuntimeException(e);
+ }
+ }
+
+ private File getResultDirectory() {
+ try {
+ mResultDir = mBuildHelper.getResultDir();
+ if (mResultDir != null) {
+ mResultDir.mkdirs();
}
- protoDir = new File(resultDir, PROTO_DIR);
- protoDir.mkdir();
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
}
- if (!protoDir.exists()) {
- throw new RuntimeException(
- "Result Directory was not created: " + protoDir.getAbsolutePath());
+ if (mResultDir == null) {
+ throw new RuntimeException("Result Directory was not created");
+ }
+ if (!mResultDir.exists()) {
+ throw new RuntimeException("Result Directory was not created: " +
+ mResultDir.getAbsolutePath());
}
- CLog.d("Proto Results Directory: %s", protoDir.getAbsolutePath());
- return protoDir;
+ CLog.d("Results Directory: %s", mResultDir.getAbsolutePath());
+ return mResultDir;
}
} \ No newline at end of file
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/PreviousResultLoader.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/PreviousResultLoader.java
index 71920b6e..a605fd08 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/PreviousResultLoader.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/suite/PreviousResultLoader.java
@@ -32,15 +32,12 @@ import com.android.tradefed.invoker.InvocationContext;
import com.android.tradefed.invoker.TestInvocation;
import com.android.tradefed.invoker.proto.InvocationContext.Context;
import com.android.tradefed.log.LogUtil.CLog;
-import com.android.tradefed.result.CollectingTestListener;
import com.android.tradefed.result.ITestInvocationListener;
-import com.android.tradefed.result.proto.ProtoResultParser;
import com.android.tradefed.result.proto.TestRecordProto.TestRecord;
import com.android.tradefed.result.suite.SuiteResultHolder;
import com.android.tradefed.result.suite.XmlSuiteResultFormatter.RunHistory;
import com.android.tradefed.targetprep.ITargetPreparer;
import com.android.tradefed.testtype.suite.retry.ITestSuiteResultLoader;
-import com.android.tradefed.util.TestRecordInterpreter;
import com.android.tradefed.util.proto.TestRecordProtoUtil;
import com.google.api.client.util.Strings;
@@ -71,8 +68,6 @@ public final class PreviousResultLoader implements ITestSuiteResultLoader {
/** Used to get run history from the invocation context of last run. */
public static final String RUN_HISTORY_KEY = "run_history";
- private static final String COMMAND_LINE_ARGS = "command_line_args";
-
@Option(name = RetryFactoryTest.RETRY_OPTION,
shortName = 'r',
description = "retry a previous session's failed and not executed tests.",
@@ -86,7 +81,6 @@ public final class PreviousResultLoader implements ITestSuiteResultLoader {
private String mFingerprintProperty = "ro.build.fingerprint";
private TestRecord mTestRecord;
- private String mProtoPath = null;
private IInvocationContext mPreviousContext;
private String mExpectedFingerprint;
private String mExpectedVendorFingerprint;
@@ -117,29 +111,9 @@ public final class PreviousResultLoader implements ITestSuiteResultLoader {
CLog.logAndDisplay(LogLevel.DEBUG, "Start loading the record protobuf.");
mResultDir =
ResultHandler.getResultDirectory(helperBuild.getResultsDir(), mRetrySessionId);
- File protoDir = new File(mResultDir, CompatibilityProtoResultReporter.PROTO_DIR);
- // Check whether we have multiple protos or one
- if (new File(protoDir, CompatibilityProtoResultReporter.PROTO_FILE_NAME).exists()) {
- mTestRecord =
- TestRecordProtoUtil.readFromFile(
- new File(
- protoDir,
- CompatibilityProtoResultReporter.PROTO_FILE_NAME));
- } else if (new File(protoDir, CompatibilityProtoResultReporter.PROTO_FILE_NAME + "0")
- .exists()) {
- // Use proto0 to get the basic information since it should be the invocation proto.
- mTestRecord =
- TestRecordProtoUtil.readFromFile(
- new File(
- protoDir,
- CompatibilityProtoResultReporter.PROTO_FILE_NAME + "0"));
- mProtoPath =
- new File(protoDir, CompatibilityProtoResultReporter.PROTO_FILE_NAME)
- .getAbsolutePath();
- } else {
- throw new RuntimeException("Could not find any test-record.pb to load.");
- }
-
+ mTestRecord =
+ TestRecordProtoUtil.readFromFile(
+ new File(mResultDir, CompatibilityProtoResultReporter.PROTO_FILE_NAME));
CLog.logAndDisplay(LogLevel.DEBUG, "Done loading the record protobuf.");
} catch (IOException e) {
throw new RuntimeException(e);
@@ -196,12 +170,6 @@ public final class PreviousResultLoader implements ITestSuiteResultLoader {
RunHistory newRun = new RunHistory();
newRun.startTime = holder.startTime;
newRun.endTime = holder.endTime;
- newRun.passedTests = holder.passedTests;
- newRun.failedTests = holder.failedTests;
- newRun.commandLineArgs =
- com.google.common.base.Strings.nullToEmpty(
- holder.context.getAttributes().getUniqueMap().get(COMMAND_LINE_ARGS));
- newRun.hostName = holder.hostName;
mRunHistories.add(newRun);
} catch (IOException e) {
throw new RuntimeException(e);
@@ -212,30 +180,15 @@ public final class PreviousResultLoader implements ITestSuiteResultLoader {
public String getCommandLine() {
List<String> command = mPreviousContext.getAttributes().get(
TestInvocation.COMMAND_ARGS_KEY);
- CLog.e("%s", mPreviousContext.getAttributes().getUniqueMap());
if (command == null) {
- throw new RuntimeException("Couldn't find the command_line_args.");
+ throw new RuntimeException("Couldn't find the command line arg.");
}
return command.get(0);
}
@Override
- public CollectingTestListener loadPreviousResults() {
- if (mProtoPath != null) {
- int index = 0;
- CollectingTestListener results = new CollectingTestListener();
- ProtoResultParser parser = new ProtoResultParser(results, null, true);
- while (new File(mProtoPath + index).exists()) {
- try {
- parser.processFileProto(new File(mProtoPath + index));
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- index++;
- }
- return results;
- }
- return TestRecordInterpreter.interpreteRecord(mTestRecord);
+ public TestRecord loadPreviousRecord() {
+ return mTestRecord;
}
@Override
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/ApkInstrumentationPreparer.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/ApkInstrumentationPreparer.java
index a1e51827..80493f7b 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/ApkInstrumentationPreparer.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/ApkInstrumentationPreparer.java
@@ -19,8 +19,6 @@ package com.android.compatibility.common.tradefed.targetprep;
import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
import com.android.ddmlib.testrunner.TestResult.TestStatus;
import com.android.tradefed.build.IBuildInfo;
-import com.android.tradefed.config.IConfiguration;
-import com.android.tradefed.config.IConfigurationReceiver;
import com.android.tradefed.config.Option;
import com.android.tradefed.config.OptionClass;
import com.android.tradefed.device.DeviceNotAvailableException;
@@ -39,10 +37,11 @@ import java.io.File;
import java.io.FileNotFoundException;
import java.util.Map.Entry;
-/** Target preparer that instruments an APK. */
-@OptionClass(alias = "apk-instrumentation-preparer")
-public class ApkInstrumentationPreparer extends PreconditionPreparer
- implements IConfigurationReceiver, ITargetCleaner {
+/**
+ * Target preparer that instruments an APK.
+ */
+@OptionClass(alias="apk-instrumentation-preparer")
+public class ApkInstrumentationPreparer extends PreconditionPreparer implements ITargetCleaner {
@Option(name = "apk", description = "Name of the apk to instrument", mandatory = true)
protected String mApkFileName = null;
@@ -60,14 +59,6 @@ public class ApkInstrumentationPreparer extends PreconditionPreparer
@Option(name = "throw-error", description = "Whether to throw error for device test failure")
protected boolean mThrowError = true;
- private IConfiguration mConfiguration = null;
-
- /** {@inheritDoc} */
- @Override
- public void setConfiguration(IConfiguration configuration) {
- mConfiguration = configuration;
- }
-
/**
* {@inheritDoc}
*/
@@ -127,7 +118,6 @@ public class ApkInstrumentationPreparer extends PreconditionPreparer
CLog.i("Instrumenting package: %s", mPackageName);
CollectingTestListener listener = new CollectingTestListener();
AndroidJUnitTest instrTest = new AndroidJUnitTest();
- instrTest.setConfiguration(mConfiguration);
instrTest.setDevice(device);
instrTest.setInstallFile(apkFile);
instrTest.setPackageName(mPackageName);
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/BusinessLogicPreparer.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/BusinessLogicPreparer.java
index d59f0b6b..a65b95bd 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/BusinessLogicPreparer.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/BusinessLogicPreparer.java
@@ -375,11 +375,22 @@ public class BusinessLogicPreparer implements IAbiReceiver, IInvocationContextRe
return extendedDeviceInfo;
}
File ediFile = null;
+ String[] fileAndKey = null;
try{
for (String ediEntry: requiredDeviceInfo) {
- String[] fileAndKey = ediEntry.split(":");
+ fileAndKey = ediEntry.split(":");
+ if (fileAndKey.length <= 1) {
+ CLog.e("Dynamic config Extended DeviceInfo key has problem.");
+ return new ArrayList<>();
+ }
ediFile = FileUtil
.findFile(deviceInfoPath, fileAndKey[0] + ".deviceinfo.json");
+ if (ediFile == null) {
+ CLog.e(
+ "Could not find Extended DeviceInfo JSON file: %s.",
+ deviceInfoPath + fileAndKey[0] + ".deviceinfo.json");
+ return new ArrayList<>();
+ }
String jsonString = FileUtil.readStringFromFile(ediFile);
JSONObject jsonObj = new JSONObject(jsonString);
String value = jsonObj.getString(fileAndKey[1]);
@@ -387,8 +398,9 @@ public class BusinessLogicPreparer implements IAbiReceiver, IInvocationContextRe
.add(String.format("%s:%s:%s", fileAndKey[0], fileAndKey[1], value));
}
}catch(JSONException | IOException | RuntimeException e){
- CLog.e("Failed to read or parse Extended DeviceInfo JSON file: %s. Error: %s",
- ediFile.getAbsolutePath(), e);
+ CLog.e(
+ "Failed to read or parse Extended DeviceInfo JSON file: %s. Error: %s",
+ deviceInfoPath + fileAndKey[0] + ".deviceinfo.json", e);
return new ArrayList<>();
}
return extendedDeviceInfo;
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/LocationCheck.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/LocationCheck.java
index d9cfafaa..25351a18 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/LocationCheck.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/LocationCheck.java
@@ -23,12 +23,16 @@ import com.android.tradefed.log.LogUtil.CLog;
import com.android.tradefed.targetprep.BuildError;
import com.android.tradefed.targetprep.TargetSetupError;
-/** Checks that location is enabled before running a compatibility test */
-@OptionClass(alias = "location-check")
+/**
+ * Checks that location is enabled for GPS or Network before running a compatibility test
+ */
+@OptionClass(alias="location-check")
public class LocationCheck extends SettingsPreparer {
- private static final String LOCATION_SETTING = "location_mode";
- private static final String LOCATION_MODE_ON = "3";
+ private static final String LOCATION_SETTING = "location_providers_allowed";
+
+ private static final String GPS = "gps";
+ private static final String NETWORK = "network";
private static final String GPS_FEATURE = "android.hardware.location.gps";
private static final String NETWORK_FEATURE = "android.hardware.location.network";
@@ -50,10 +54,12 @@ public class LocationCheck extends SettingsPreparer {
CLog.i("Verifying location setting");
mSettingName = LOCATION_SETTING;
mSettingType = SettingsPreparer.SettingType.SECURE;
- mExpectedSettingValues.add(LOCATION_MODE_ON);
- mFailureMessage =
- "Location services must be enabled in order to "
- + "successfully run the test suite";
+ mExpectedSettingValues.add(NETWORK);
+ mExpectedSettingValues.add(GPS);
+ mExpectedSettingValues.add(String.format("%s,%s", GPS, NETWORK));
+ mExpectedSettingValues.add(String.format("%s,%s", NETWORK, GPS));
+ mFailureMessage = "Location services must be enabled via GPS or Network in order to " +
+ "successfully run the test suite";
super.run(device, buildInfo);
}
}
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/MediaPreparer.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/MediaPreparer.java
index da86989a..427a4bc7 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/MediaPreparer.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/MediaPreparer.java
@@ -21,7 +21,6 @@ import com.android.compatibility.common.tradefed.util.DynamicConfigFileReader;
import com.android.ddmlib.IDevice;
import com.android.ddmlib.Log;
import com.android.tradefed.build.IBuildInfo;
-import com.android.tradefed.config.Configuration;
import com.android.tradefed.config.Option;
import com.android.tradefed.config.OptionClass;
import com.android.tradefed.device.DeviceNotAvailableException;
@@ -442,9 +441,6 @@ public class MediaPreparer extends BaseTargetPreparer {
instrTest.setDevice(device);
instrTest.setInstallFile(apkFile);
instrTest.setPackageName(APP_PKG_NAME);
- // AndroidJUnitTest requires a IConfiguration to work properly, add a stub to this
- // implementation to avoid an NPE.
- instrTest.setConfiguration(new Configuration("stub", "stub"));
instrTest.run(listener);
if (mFailureStackTrace != null) {
mMaxRes = DEFAULT_MAX_RESOLUTION;
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/ReportLogCollector.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/ReportLogCollector.java
index 6ff6d21d..05bb9397 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/ReportLogCollector.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/ReportLogCollector.java
@@ -22,7 +22,6 @@ import com.android.tradefed.build.IBuildInfo;
import com.android.tradefed.config.Option;
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.device.ITestDevice;
-import com.android.tradefed.device.StubDevice;
import com.android.tradefed.log.LogUtil.CLog;
import com.android.tradefed.targetprep.BuildError;
import com.android.tradefed.targetprep.ITargetCleaner;
@@ -31,7 +30,6 @@ import com.android.tradefed.util.FileUtil;
import java.io.File;
import java.io.FileNotFoundException;
-import java.io.IOException;
/**
* An {@link ITargetCleaner} that prepares and pulls report logs.
@@ -56,10 +54,10 @@ public class ReportLogCollector implements ITargetCleaner {
@Override
public void setUp(ITestDevice device, IBuildInfo buildInfo) throws TargetSetupError,
BuildError, DeviceNotAvailableException {
- prepareReportLogContainers(buildInfo);
+ prepareReportLogContainers(device, buildInfo);
}
- private void prepareReportLogContainers(IBuildInfo buildInfo) {
+ private void prepareReportLogContainers(ITestDevice device, IBuildInfo buildInfo) {
CompatibilityBuildHelper buildHelper = new CompatibilityBuildHelper(buildInfo);
try {
File resultDir = buildHelper.getResultDir();
@@ -72,20 +70,12 @@ public class ReportLogCollector implements ITargetCleaner {
return;
}
} catch (FileNotFoundException fnfe) {
- CLog.e(fnfe);
+ fnfe.printStackTrace();
}
}
@Override
public void tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable e) {
- if (e instanceof DeviceNotAvailableException) {
- CLog.e("Invocation finished with DeviceNotAvailable, skipping collecting logs.");
- return;
- }
- if (device.getIDevice() instanceof StubDevice) {
- CLog.d("Skipping ReportLogCollector, it requires a device.");
- return;
- }
// Pull report log files from device.
CompatibilityBuildHelper buildHelper = new CompatibilityBuildHelper(buildInfo);
try {
@@ -112,8 +102,8 @@ public class ReportLogCollector implements ITargetCleaner {
CollectorUtil.pullFromDevice(device, mSrcDir, resultPath);
CollectorUtil.pullFromHost(hostReportDir, resultDir);
CollectorUtil.reformatRepeatedStreams(resultDir);
- } catch (IOException exception) {
- CLog.e(exception);
+ } catch (Exception exception) {
+ exception.printStackTrace();
}
}
}
diff --git a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProviderTest.java b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProviderTest.java
index 54ef49f9..b65d6311 100644
--- a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProviderTest.java
+++ b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProviderTest.java
@@ -175,19 +175,4 @@ public class CompatibilityBuildProviderTest {
assertTrue(String.format("URL was %s and should have contained %s", url, uniquePattern),
url.contains(uniquePattern));
}
-
- /* Test that getRootDirPath can handle suite name containing `-`. */
- @Test
- public void testGetRootDirPath() throws Exception {
- CompatibilityBuildProvider provider =
- new CompatibilityBuildProvider() {
- @Override
- protected String getSuiteInfoName() {
- return "VTS-CORE";
- }
- };
- final String path = "test/path";
- System.setProperty("VTS_CORE_ROOT", path);
- assertEquals(path, provider.getRootDirPath());
- }
}
diff --git a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/presubmit/CtsConfigLoadingTest.java b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/presubmit/CtsConfigLoadingTest.java
index ecb4a5f0..856a41bd 100644
--- a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/presubmit/CtsConfigLoadingTest.java
+++ b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/presubmit/CtsConfigLoadingTest.java
@@ -58,46 +58,44 @@ import java.util.Set;
public class CtsConfigLoadingTest {
private static final String METADATA_COMPONENT = "component";
- private static final Set<String> KNOWN_COMPONENTS =
- new HashSet<>(
- Arrays.asList(
- // modifications to the list below must be reviewed
- "abuse",
- "art",
- "auth",
- "auto",
- "autofill",
- "backup",
- "bionic",
- "bluetooth",
- "camera",
- "contentcapture",
- "deviceinfo",
- "deqp",
- "devtools",
- "framework",
- "graphics",
- "hdmi",
- "inputmethod",
- "libcore",
- "location",
- "media",
- "metrics",
- "misc",
- "mocking",
- "networking",
- "neuralnetworks",
- "print",
- "renderscript",
- "security",
- "statsd",
- "systems",
- "sysui",
- "telecom",
- "tv",
- "uitoolkit",
- "vr",
- "webview"));
+ private static final Set<String> KNOWN_COMPONENTS = new HashSet<>(Arrays.asList(
+ // modifications to the list below must be reviewed
+ "abuse",
+ "art",
+ "auth",
+ "auto",
+ "autofill",
+ "backup",
+ "bionic",
+ "bluetooth",
+ "camera",
+ "contentcapture",
+ "deviceinfo",
+ "deqp",
+ "devtools",
+ "framework",
+ "graphics",
+ "inputmethod",
+ "libcore",
+ "location",
+ "media",
+ "metrics",
+ "misc",
+ "mocking",
+ "networking",
+ "neuralnetworks",
+ "print",
+ "renderscript",
+ "security",
+ "statsd",
+ "systems",
+ "sysui",
+ "telecom",
+ "tv",
+ "uitoolkit",
+ "vr",
+ "webview"
+ ));
private static final Set<String> KNOWN_MISC_MODULES =
new HashSet<>(
Arrays.asList(
diff --git a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/suite/PreviousResultLoaderTest.java b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/suite/PreviousResultLoaderTest.java
index 1e0998c5..0669a223 100644
--- a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/suite/PreviousResultLoaderTest.java
+++ b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/suite/PreviousResultLoaderTest.java
@@ -15,11 +15,12 @@
*/
package com.android.compatibility.common.tradefed.result.suite;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
import com.android.compatibility.common.tradefed.targetprep.BuildFingerPrintPreparer;
-import com.android.tradefed.build.BuildInfo;
import com.android.tradefed.build.DeviceBuildInfo;
import com.android.tradefed.build.IBuildInfo;
import com.android.tradefed.build.IBuildProvider;
@@ -32,7 +33,6 @@ import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.invoker.IInvocationContext;
import com.android.tradefed.invoker.InvocationContext;
import com.android.tradefed.invoker.TestInvocation;
-import com.android.tradefed.result.CollectingTestListener;
import com.android.tradefed.result.proto.TestRecordProto.TestRecord;
import com.android.tradefed.targetprep.ITargetPreparer;
import com.android.tradefed.util.FileUtil;
@@ -76,7 +76,6 @@ public class PreviousResultLoaderTest {
mContext.setConfigurationDescriptor(new ConfigurationDescriptor());
mContext.addInvocationAttribute(TestInvocation.COMMAND_ARGS_KEY,
"cts -m CtsGesture --skip-all-system-status-check");
- mContext.addDeviceBuildInfo(ConfigurationDef.DEFAULT_DEVICE_NAME, new BuildInfo());
mMockDevice = EasyMock.createMock(ITestDevice.class);
}
@@ -90,7 +89,7 @@ public class PreviousResultLoaderTest {
*/
@Test
public void testReloadTests_failed() throws Exception {
- EasyMock.expect(mMockProvider.getBuild()).andReturn(createFakeBuild("", false));
+ EasyMock.expect(mMockProvider.getBuild()).andReturn(createFakeBuild(""));
// Delete the proto file
mProtoFile.delete();
try {
@@ -99,7 +98,9 @@ public class PreviousResultLoaderTest {
fail("Should have thrown an exception.");
} catch (RuntimeException expected) {
// expected
- assertEquals("Could not find any test-record.pb to load.", expected.getMessage());
+ assertEquals(
+ String.format("java.io.FileNotFoundException: %s (No such file or directory)",
+ mProtoFile.getAbsolutePath()), expected.getMessage());
}
EasyMock.verify(mMockProvider);
}
@@ -110,54 +111,14 @@ public class PreviousResultLoaderTest {
@Test
public void testReloadTests() throws Exception {
final String EXPECTED_RUN_HISTORY =
- "[{\"startTime\":1530218251501,"
- + "\"endTime\":1530218261061,"
- + "\"passedTests\":0,"
- + "\"failedTests\":0,"
- + "\"commandLineArgs\":\"cts -m CtsGesture "
- + "--skip-all-system-status-check\","
- + "\"hostName\":\"user.android.com\"}]";
- EasyMock.expect(mMockProvider.getBuild())
- .andReturn(createFakeBuild(createBasicResults(), false));
+ "[{\"startTime\":1530218251501," + "\"endTime\":1530218261061}]";
+ EasyMock.expect(mMockProvider.getBuild()).andReturn(createFakeBuild(createBasicResults()));
mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice);
EasyMock.replay(mMockDevice, mMockProvider);
mLoader.init();
assertEquals("cts -m CtsGesture --skip-all-system-status-check", mLoader.getCommandLine());
- IConfiguration config = new Configuration("name", "desc");
- assertEquals(0, config.getTargetPreparers().size());
- mLoader.customizeConfiguration(config);
- // A special preparer was added for fingerprint
- assertEquals(1, config.getTargetPreparers().size());
- ITargetPreparer preparer = config.getTargetPreparers().get(0);
- assertTrue(preparer instanceof BuildFingerPrintPreparer);
- assertEquals(
- "testfingerprint", ((BuildFingerPrintPreparer) preparer).getExpectedFingerprint());
- String runHistory =
- config.getCommandOptions().getInvocationData().getUniqueMap().get(RUN_HISTORY_KEY);
- assertEquals(EXPECTED_RUN_HISTORY, runHistory);
- EasyMock.verify(mMockDevice, mMockProvider);
- }
-
- @Test
- public void testReloadTests_withMultiProto() throws Exception {
- final String EXPECTED_RUN_HISTORY =
- "[{\"startTime\":1530218251501,"
- + "\"endTime\":1530218261061,"
- + "\"passedTests\":0,"
- + "\"failedTests\":0,"
- + "\"commandLineArgs\":\"cts -m CtsGesture "
- + "--skip-all-system-status-check\","
- + "\"hostName\":\"user.android.com\"}]";
- EasyMock.expect(mMockProvider.getBuild())
- .andReturn(createFakeBuild(createBasicResults(), true));
- mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice);
-
- EasyMock.replay(mMockDevice, mMockProvider);
- mLoader.init();
- assertEquals("cts -m CtsGesture --skip-all-system-status-check", mLoader.getCommandLine());
- CollectingTestListener listener = mLoader.loadPreviousResults();
- assertNotNull(listener);
+ mLoader.loadPreviousRecord();
IConfiguration config = new Configuration("name", "desc");
assertEquals(0, config.getTargetPreparers().size());
mLoader.customizeConfiguration(config);
@@ -176,26 +137,15 @@ public class PreviousResultLoaderTest {
/** Test that the loader can correctly provide the run history back. */
@Test
public void testReloadTests_withRunHistory() throws Exception {
- final String RUN_HISTORY_1 =
- "{\"startTime\":1000000000000,"
- + "\"endTime\":1000000010000,"
- + "\"passedTests\":10,"
- + "\"failedTests\":5,"
- + "\"commandLineArgs\":\"cts -m CtsGesture --skip-all-system-status-check\","
- + "\"hostName\":\"user1.android.com\"}";
- final String RUN_HISTORY_2 =
- "{\"startTime\":1530218251501,"
- + "\"endTime\":1530218261061,"
- + "\"passedTests\":0,"
- + "\"failedTests\":0,"
- + "\"commandLineArgs\":\"cts -m CtsGesture --skip-all-system-status-check "
- + "--shard-count 5\","
- + "\"hostName\":\"user2.android.com\"}";
- final String OLD_RUN_HISTORY = String.format("[%s]", RUN_HISTORY_1);
- final String EXPECTED_RUN_HISTORY = String.format("[%s,%s]", RUN_HISTORY_1, RUN_HISTORY_2);
+ final String EXPECTED_RUN_HISTORY =
+ "[{\"startTime\":10000000000000,"
+ + "\"endTime\":10000000100000},{\"startTime\":1530218251501,"
+ + "\"endTime\":1530218261061}]";
+ final String OLD_RUN_HISTORY =
+ "[{\"startTime\":10000000000000,\"endTime\":10000000100000}]";
mContext.addInvocationAttribute(RUN_HISTORY_KEY, OLD_RUN_HISTORY);
EasyMock.expect(mMockProvider.getBuild())
- .andReturn(createFakeBuild(createResultsWithRunHistory(), false));
+ .andReturn(createFakeBuild(createResultsWithRunHistory()));
mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice);
EasyMock.replay(mMockDevice, mMockProvider);
@@ -209,11 +159,11 @@ public class PreviousResultLoaderTest {
EasyMock.verify(mMockDevice, mMockProvider);
}
- private IBuildInfo createFakeBuild(String resultContent, boolean index) throws Exception {
+ private IBuildInfo createFakeBuild(String resultContent) throws Exception {
DeviceBuildInfo build = new DeviceBuildInfo();
build.addBuildAttribute(CompatibilityBuildHelper.SUITE_NAME, "CTS");
mRootDir = FileUtil.createTempDir("cts-root-dir");
- new File(mRootDir, "android-cts/results/").mkdirs();
+ new File(mRootDir, "android-cts/results").mkdirs();
build.addBuildAttribute(CompatibilityBuildHelper.ROOT_DIR, mRootDir.getAbsolutePath());
// Create fake result dir
long time = System.currentTimeMillis();
@@ -224,16 +174,8 @@ public class PreviousResultLoaderTest {
"test_result.xml");
testResult.createNewFile();
// Populate a proto result
- File protoDir =
- new File(
- new CompatibilityBuildHelper(build).getResultDir(),
- CompatibilityProtoResultReporter.PROTO_DIR);
- protoDir.mkdir();
- if (index) {
- mProtoFile = new File(protoDir, CompatibilityProtoResultReporter.PROTO_FILE_NAME + "0");
- } else {
- mProtoFile = new File(protoDir, CompatibilityProtoResultReporter.PROTO_FILE_NAME);
- }
+ mProtoFile = new File(new CompatibilityBuildHelper(build).getResultDir(),
+ CompatibilityProtoResultReporter.PROTO_FILE_NAME);
TestRecord.Builder builder = TestRecord.newBuilder();
builder.setDescription(Any.pack(mContext.toProto()));
builder.build().writeDelimitedTo(new FileOutputStream(mProtoFile));
@@ -245,15 +187,13 @@ public class PreviousResultLoaderTest {
StringBuilder sb = new StringBuilder();
sb.append("<?xml version='1.0' encoding='UTF-8' standalone='no' ?>\n");
sb.append("<?xml-stylesheet type=\"text/xsl\" href=\"compatibility_result.xsl\"?>\n");
- sb.append(
- "<Result start=\"1530218251501\" end=\"1530218261061\" "
- + "start_display=\"Thu Jun 28 13:37:31 PDT 2018\" "
- + "end_display=\"Thu Jun 28 13:37:41 PDT 2018\" "
- + "command_line_args=\"cts -m CtsGesture --skip-all-system-status-check\" "
- + "suite_name=\"CTS\" suite_version=\"9.0_r1\" "
- + "suite_plan=\"cts\" suite_build_number=\"8888\" report_version=\"5.0\" "
- + "devices=\"HT6570300047\" "
- + "host_name=\"user.android.com\">\n");
+ sb.append("<Result start=\"1530218251501\" end=\"1530218261061\" "
+ + "start_display=\"Thu Jun 28 13:37:31 PDT 2018\" "
+ + "end_display=\"Thu Jun 28 13:37:41 PDT 2018\" "
+ + "command_line_args=\"cts -m CtsGesture --skip-all-system-status-check\" "
+ + "suite_name=\"CTS\" suite_version=\"9.0_r1\" "
+ + "suite_plan=\"cts\" suite_build_number=\"8888\" report_version=\"5.0\" "
+ + "devices=\"HT6570300047\" >\n");
sb.append(
" <Build command_line_args=\"cts -m CtsGesture --skip-all-system-status-check\""
+ " build_vendor_fingerprint=\"vendorFingerprint\" "
@@ -280,32 +220,21 @@ public class PreviousResultLoaderTest {
"<Result start=\"1530218251501\" end=\"1530218261061\" "
+ "start_display=\"Thu Jun 28 13:37:31 PDT 2018\" "
+ "end_display=\"Thu Jun 28 13:37:41 PDT 2018\" "
- + "command_line_args=\"cts -m CtsGesture --skip-all-system-status-check "
- + "--shard-count 5\" "
+ + "command_line_args=\"cts -m CtsGesture --skip-all-system-status-check\" "
+ "suite_name=\"CTS\" suite_version=\"9.0_r1\" "
+ "suite_plan=\"cts\" suite_build_number=\"8888\" report_version=\"5.0\" "
- + "devices=\"HT6570300047\" "
- + "host_name=\"user2.android.com\" >\n");
- final String RUN_HISTORY_JSON =
- "[{'startTime':1000000000000,'endTime':1000000010000,"
- + "'pass':10,'failed':5,"
- + "'commandLineArgs':'cts -m CtsGesture --skip-all-system-status-check',"
- + "'hostName':'user1.android.com'}]";
+ + "devices=\"HT6570300047\" >\n");
sb.append(
" <Build command_line_args=\"cts -m CtsGesture --skip-all-system-status-check\""
+ " build_vendor_fingerprint=\"vendorFingerprint\" "
+ " build_reference_fingerprint=\"\" "
+ " build_fingerprint=\"testfingerprint\""
- + " run_history=\""
- + RUN_HISTORY_JSON
- + "\"/>\n");
+ + " run_history=\"[{'startTime':10000000000000,"
+ + "'endTime':10000000100000}]\"/>\n");
// Run history
sb.append(
" <RunHistory>\n"
- + " <Run start=\"1000000000000\" end=\"1000000010000\" "
- + "pass=\"10\" failed=\"5\" "
- + "command_line_args=\"cts -m CtsGesture --skip-all-system-status-check\" "
- + "hostName=\"user1.android.com\" />\n"
+ + " <Run start=\"10000000000000\" end=\"10000000100000\"/>\n"
+ " </RunHistory>\n");
// Summary
sb.append(" <Summary pass=\"0\" failed=\"0\" modules_done=\"2\" modules_total=\"2\" />\n");
diff --git a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/targetprep/BusinessLogicPreparerTest.java b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/targetprep/BusinessLogicPreparerTest.java
index cbffc2f0..a32218a2 100644
--- a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/targetprep/BusinessLogicPreparerTest.java
+++ b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/targetprep/BusinessLogicPreparerTest.java
@@ -169,6 +169,17 @@ public class BusinessLogicPreparerTest {
testBuildRequestString(14, attributes);
}
+ @Test
+ public void testBuildRequestString_noDeviceInfoJSONFileExists() throws Exception {
+ Map<String, String> attributes = new HashMap<>();
+ // Create a memory device info JSON file for test.
+ File jsonPath = createTestDeviceInfoTextFile("MemoryDeviceInfo");
+ mMockBuildInfo.setFile(DeviceInfoCollector.DEVICE_INFO_DIR, jsonPath, "v1");
+ // Setup BuildInfo attributes.
+ mMockBuildInfo.addBuildAttribute(CompatibilityBuildHelper.SUITE_VERSION, "v1");
+ testBuildRequestString(14, attributes);
+ }
+
private void testBuildRequestString(int expectedParams, Map<String, String> attributes) throws Exception {
for (String key: attributes.keySet()) {
mMockBuildInfo.addBuildAttribute(key, attributes.get(key));
@@ -265,6 +276,12 @@ public class BusinessLogicPreparerTest {
return mTmpDir;
}
+ private File createTestDeviceInfoTextFile(String DeviceInfoClassName)
+ throws IOException {
+ new File(mTmpDir, DeviceInfoClassName + ".deviceinfo.text");
+ return mTmpDir;
+ }
+
private File createFileFromStr(String configStr) throws IOException {
File file = File.createTempFile("test", "dynamic");
FileOutputStream stream = new FileOutputStream(file);
diff --git a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/testtype/retry/RetryFactoryTestTest.java b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/testtype/retry/RetryFactoryTestTest.java
index 9b4f8e73..3c3e2646 100644
--- a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/testtype/retry/RetryFactoryTestTest.java
+++ b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/testtype/retry/RetryFactoryTestTest.java
@@ -102,7 +102,6 @@ public class RetryFactoryTestTest {
mMockMainConfiguration = new Configuration("mockMain", "mockMain");
mCheckers = new ArrayList<>();
mMockInfo = EasyMock.createMock(IDeviceBuildInfo.class);
- EasyMock.expect(mMockInfo.getRemoteFiles()).andStubReturn(null);
mMockDevice = EasyMock.createMock(ITestDevice.class);
mMockContext = new InvocationContext();
mMockContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice);
diff --git a/common/host-side/util/src/com/android/compatibility/common/util/PollingCheck.java b/common/host-side/util/src/com/android/compatibility/common/util/PollingCheck.java
deleted file mode 100644
index aa0d22db..00000000
--- a/common/host-side/util/src/com/android/compatibility/common/util/PollingCheck.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.compatibility.common.util;
-
-import static org.junit.Assert.fail;
-
-import java.util.concurrent.Callable;
-
-/** Test utility to check for or wait for a condition by polling. */
-public abstract class PollingCheck {
- public static final PollingCheckClock DEFAULT_CLOCK = new SystemClock();
- private static final long TIME_SLICE = 50;
-
- /** Clock for polling. */
- public interface PollingCheckClock {
- long currentTimeMillis();
-
- default void sleep(long millis) throws InterruptedException {
- Thread.sleep(millis);
- }
- }
-
- private static class SystemClock implements PollingCheckClock {
- @Override
- public long currentTimeMillis() {
- return System.currentTimeMillis();
- }
- }
-
- /**
- * Repeatedly check a condition.
- *
- * @param clock Clock used for checking time and sleeping between checks
- * @param pollInterval Time interval to wait between checks
- * @param timeout Timeout after which to stop checking
- * @param condition Condition to check
- * @return {@code true} if the condition became true within the timeout, {@code false} otherwise
- * @throws Exception
- */
- public static boolean check(
- PollingCheckClock clock, long pollInterval, long timeout, Callable<Boolean> condition)
- throws Exception {
- long start = clock.currentTimeMillis();
-
- if (condition.call()) {
- return true;
- }
-
- while ((clock.currentTimeMillis() - start) < timeout) {
- clock.sleep(pollInterval);
-
- if (condition.call()) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Repeatedly check a condition. Uses the default clock and polling interval.
- *
- * @param timeout Timeout after which to stop checking
- * @param condition Condition to check
- * @return {@code true} if the condition became true within the timeout, {@code false} otherwise
- * @throws Exception
- */
- public static boolean check(long timeout, Callable<Boolean> condition) throws Exception {
- return check(DEFAULT_CLOCK, TIME_SLICE, timeout, condition);
- }
-
- /**
- * Repeatedly check a condition. Throws an {@link AssertionError} if the condition does not
- * become {@code true} within the timeout.
- *
- * @param clock Clock used for checking time and sleeping between checks
- * @param pollInterval Time interval to wait between checks
- * @param timeout Timeout after which to stop checking
- * @param condition Condition to check
- * @throws Exception
- */
- public static void check(
- PollingCheckClock clock,
- String message,
- long pollInterval,
- long timeout,
- Callable<Boolean> condition)
- throws Exception {
- if (!check(clock, pollInterval, timeout, condition)) {
- fail(message);
- }
- }
-
- /**
- * Repeatedly check a condition. Uses the default clock and polling interval. Throws an {@link
- * AssertionError} if the condition does not become {@code true} within the timeout.
- *
- * @param timeout Timeout after which to stop checking
- * @param condition Condition to check
- * @throws Exception
- */
- public static void check(String message, long timeout, Callable<Boolean> condition)
- throws Exception {
- check(DEFAULT_CLOCK, message, TIME_SLICE, timeout, condition);
- }
-
- /**
- * Waits for a condition to become {@code true}. Throws an {@link AssertionError} if the
- * condition does not become {@code true} within the timeout.
- *
- * @param clock Clock used for checking time and sleeping between checks
- * @param pollInterval Time interval to wait between checks
- * @param timeout Timeout after which to stop checking
- * @param condition Condition to check
- * @throws Exception
- */
- public static void waitFor(
- PollingCheckClock clock,
- long pollInterval,
- long timeout,
- final Callable<Boolean> condition)
- throws Exception {
- check(clock, "Unexpected timeout waiting for condition", pollInterval, timeout, condition);
- }
-
- /**
- * Waits for a condition to become {@code true}. Uses the default clock and polling interval.
- * Throws an {@link AssertionError} if the condition does not become {@code true} within the
- * timeout.
- *
- * @param timeout Timeout after which to stop checking
- * @param condition Condition to check
- * @throws Exception
- */
- public static void waitFor(long timeout, final Callable<Boolean> condition) throws Exception {
- waitFor(DEFAULT_CLOCK, TIME_SLICE, timeout, condition);
- }
-}
diff --git a/common/host-side/util/src/com/android/compatibility/common/util/ProtoUtils.java b/common/host-side/util/src/com/android/compatibility/common/util/ProtoUtils.java
deleted file mode 100644
index f08eb450..00000000
--- a/common/host-side/util/src/com/android/compatibility/common/util/ProtoUtils.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.compatibility.common.util;
-
-import com.android.tradefed.device.CollectingByteOutputReceiver;
-import com.android.tradefed.device.ITestDevice;
-
-import com.google.protobuf.MessageLite;
-import com.google.protobuf.Parser;
-
-/** Utility class for proto dumps. */
-public class ProtoUtils {
- /**
- * Command to get a JobScheduler proto dump. Can be used as input to {@link
- * #getProto(ITestDevice, Parser, String)}.
- */
- public static final String DUMPSYS_JOB_SCHEDULER = "dumpsys jobscheduler --proto";
-
- /**
- * Call onto the device with an adb shell command and get the results of that as a proto of the
- * given type.
- *
- * @param device The test device to run a command on.
- * @param parser A protobuf parser object. e.g. MyProto.parser()
- * @param command The adb shell command to run. e.g. "dumpsys fingerprint --proto"
- */
- public static <T extends MessageLite> T getProto(
- ITestDevice device, Parser<T> parser, String command) throws Exception {
- final CollectingByteOutputReceiver receiver = new CollectingByteOutputReceiver();
- device.executeShellCommand(command, receiver);
- return parser.parseFrom(receiver.getOutput());
- }
-}
diff --git a/common/host-side/util/tests/src/com/android/compatibility/common/util/HostUnitTests.java b/common/host-side/util/tests/src/com/android/compatibility/common/util/HostUnitTests.java
index 2fb0868d..32408e4d 100644
--- a/common/host-side/util/tests/src/com/android/compatibility/common/util/HostUnitTests.java
+++ b/common/host-side/util/tests/src/com/android/compatibility/common/util/HostUnitTests.java
@@ -20,8 +20,8 @@ import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
/**
* A test suite for all host util unit tests.
- *
- * <p>All tests listed here should be self-contained, and do not require any external dependencies.
+ * <p/>
+ * All tests listed here should be self-contained, and do not require any external dependencies.
*/
@RunWith(Suite.class)
@SuiteClasses({
@@ -29,7 +29,6 @@ import org.junit.runners.Suite.SuiteClasses;
DynamicConfigHandlerTest.class,
ModuleResultTest.class,
TestFilterTest.class,
- PollingCheckTest.class,
})
public class HostUnitTests {
// empty on purpose
diff --git a/common/host-side/util/tests/src/com/android/compatibility/common/util/PollingCheckTest.java b/common/host-side/util/tests/src/com/android/compatibility/common/util/PollingCheckTest.java
deleted file mode 100644
index cafd7abf..00000000
--- a/common/host-side/util/tests/src/com/android/compatibility/common/util/PollingCheckTest.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.compatibility.common.util;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-/** Tests for {@link PollingCheck}. */
-@RunWith(JUnit4.class)
-public class PollingCheckTest {
- private PollingCheck.PollingCheckClock testClock;
-
- @Before
- public void setUp() {
- testClock = new TestClock();
- }
-
- @Test
- public void testCheckSuccess() throws Exception {
- assertTrue("check failed", PollingCheck.check(testClock, 10, 100, () -> true));
- }
-
- @Test
- public void testCheckEventualSuccess() throws Exception {
- final int[] i = {0};
- assertTrue("check failed", PollingCheck.check(testClock, 10, 1000, () -> ++i[0] == 3));
- assertEquals("Condition expected to be checked three times", 3, i[0]);
- assertEquals("Time advanced unexpectedly", 20, testClock.currentTimeMillis());
- }
-
- @Test
- public void testCheckTimeout() throws Exception {
- final int[] i = {0};
- assertFalse(
- "Expected failure due to timeout",
- PollingCheck.check(testClock, 10, 50, () -> i[0]++ == 9));
- }
-
- @Test
- public void testCheckFailure() throws Exception {
- assertFalse(
- "Expected failure due to condition not being true",
- PollingCheck.check(testClock, 10, 100, () -> false));
- }
-
- @Test
- public void testCheckChecksConditionAtLeastOnce() throws Exception {
- final boolean[] conditionChecked = {false};
- PollingCheck.check(
- testClock,
- 10,
- 0,
- () -> {
- conditionChecked[0] = true;
- return true;
- });
-
- assertTrue("Expected condition to be checked", conditionChecked[0]);
- }
-
- @Test
- public void testLongConditionCheck() throws Exception {
- PollingCheck.check(
- testClock,
- 10,
- 500,
- () -> {
- testClock.sleep(5); // condition takes some time to evaluate
- return testClock.currentTimeMillis() >= 50;
- });
-
- assertEquals(50, testClock.currentTimeMillis());
- }
-
- @Test
- public void testCheckMessage() throws Exception {
- try {
- PollingCheck.check(testClock, "Expected message", 10, 0, () -> false);
- } catch (AssertionError e) {
- assertEquals("Expected message", e.getMessage());
- }
- }
-
- @Test
- public void testWaitForTimeout() throws Exception {
- try {
- PollingCheck.waitFor(testClock, 10, 500, () -> false);
- } catch (AssertionError e) {
- assertEquals("Unexpected timeout waiting for condition", e.getMessage());
- }
-
- assertEquals(500, testClock.currentTimeMillis());
- }
-
- @Test
- public void testWaitForSuccess() throws Exception {
- PollingCheck.waitFor(testClock, 10, 500, () -> testClock.currentTimeMillis() >= 200);
- assertEquals(200, testClock.currentTimeMillis());
- }
-
- private final class TestClock implements PollingCheck.PollingCheckClock {
- private long currentTime = 0;
-
- @Override
- public long currentTimeMillis() {
- return currentTime;
- }
-
- @Override
- public void sleep(long millis) {
- currentTime += millis;
- }
- }
-}
diff --git a/common/util/.classpath b/common/util/.classpath
index 854de247..806795a3 100644
--- a/common/util/.classpath
+++ b/common/util/.classpath
@@ -7,5 +7,6 @@
<classpathentry kind="var" path="TRADEFED_ROOT/out/host/common/obj/JAVA_LIBRARIES/json-prebuilt_intermediates/javalib.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/tradefederation"/>
<classpathentry kind="var" path="TRADEFED_ROOT/prebuilts/misc/common/kxml2/kxml2-2.3.0.jar"/>
+ <classpathentry kind="var" path="TRADEFED_ROOT/out/soong/.intermediates/external/guava/guava/linux_glibc_common/combined/guava.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/common/util/src/com/android/compatibility/common/util/BackupUtils.java b/common/util/src/com/android/compatibility/common/util/BackupUtils.java
index 50810cdb..66084daa 100644
--- a/common/util/src/com/android/compatibility/common/util/BackupUtils.java
+++ b/common/util/src/com/android/compatibility/common/util/BackupUtils.java
@@ -44,7 +44,7 @@ public abstract class BackupUtils {
private static final int BACKUP_PROVISIONING_TIMEOUT_SECONDS = 30;
private static final int BACKUP_PROVISIONING_POLL_INTERVAL_SECONDS = 1;
- private static final long BACKUP_SERVICE_INIT_TIMEOUT_SECS = TimeUnit.MINUTES.toSeconds(2);
+ private static final int BACKUP_SERVICE_INIT_TIMEOUT_SECS = 30;
private static final Pattern BACKUP_MANAGER_CURRENTLY_ENABLE_STATUS_PATTERN =
Pattern.compile("^Backup Manager currently (enabled|disabled)$");
@@ -322,10 +322,8 @@ public abstract class BackupUtils {
}
/** Execute shell command "bmgr --user <id> activate <activate>." */
- public boolean activateBackupForUser(boolean activate, int userId) throws IOException {
- boolean previouslyActivated = isBackupActivatedForUser(userId);
+ public void activateBackupForUser(boolean activate, int userId) throws IOException {
executeShellCommandSync(String.format("bmgr --user %d activate %b", userId, activate));
- return previouslyActivated;
}
/**
@@ -373,7 +371,7 @@ public abstract class BackupUtils {
}
@VisibleForTesting
- void waitUntilBackupServiceIsRunning(int userId, long timeout)
+ void waitUntilBackupServiceIsRunning(int userId, int timeout)
throws IOException, InterruptedException {
CommonTestUtils.waitUntil(
"Backup Manager init timed out",
diff --git a/common/util/src/com/android/compatibility/common/util/BusinessLogicExecutor.java b/common/util/src/com/android/compatibility/common/util/BusinessLogicExecutor.java
index c2143293..34f98d79 100644
--- a/common/util/src/com/android/compatibility/common/util/BusinessLogicExecutor.java
+++ b/common/util/src/com/android/compatibility/common/util/BusinessLogicExecutor.java
@@ -98,10 +98,11 @@ public abstract class BusinessLogicExecutor {
/** Substitute sensitive information with REDACTED_PLACEHOLDER if necessary. */
protected static String[] formatArgs(String[] args) {
- for (int i = 0; i < args.length; i++) {
- args[i] = formatArg(args[i]);
+ List<String> formattedArgs = new ArrayList<>();
+ for (String arg : args) {
+ formattedArgs.add(formatArg(arg));
}
- return args;
+ return formattedArgs.toArray(new String[0]);
}
private static String formatArg(String arg) {
diff --git a/common/util/src/com/android/compatibility/common/util/CrashUtils.java b/common/util/src/com/android/compatibility/common/util/CrashUtils.java
index c5e94f66..430fafb9 100644
--- a/common/util/src/com/android/compatibility/common/util/CrashUtils.java
+++ b/common/util/src/com/android/compatibility/common/util/CrashUtils.java
@@ -128,7 +128,7 @@ public class CrashUtils {
continue;
}
securityCrashes.put(crash);
- } catch (JSONException e) {}
+ } catch (JSONException | NullPointerException e) {}
}
return securityCrashes;
}
diff --git a/common/util/src/com/android/compatibility/common/util/InvocationResult.java b/common/util/src/com/android/compatibility/common/util/InvocationResult.java
index f4f294e6..969e188f 100644
--- a/common/util/src/com/android/compatibility/common/util/InvocationResult.java
+++ b/common/util/src/com/android/compatibility/common/util/InvocationResult.java
@@ -38,7 +38,6 @@ public class InvocationResult implements IInvocationResult {
}
private Collection<RunHistory> mRunHistories = new ArrayList<>();
-
private long mTimestamp;
private Map<String, IModuleResult> mModuleResults = new LinkedHashMap<>();
private Map<String, String> mInvocationInfo = new HashMap<>();
diff --git a/common/util/tests/src/com/android/compatibility/common/util/BackupUtilsTest.java b/common/util/tests/src/com/android/compatibility/common/util/BackupUtilsTest.java
index 84c177ac..133a5451 100644
--- a/common/util/tests/src/com/android/compatibility/common/util/BackupUtilsTest.java
+++ b/common/util/tests/src/com/android/compatibility/common/util/BackupUtilsTest.java
@@ -41,7 +41,6 @@ public class BackupUtilsTest {
private boolean mIsDumpsysCommandCalled;
private boolean mIsEnableCommandCalled;
- private boolean mIsActivateCommandCalled;
@Before
public void setUp() {
@@ -446,88 +445,4 @@ public class BackupUtilsTest {
assertTrue(isExceptionHappened);
assertTrue(mIsDumpsysCommandCalled);
}
-
- @Test
- public void testActivateBackup_whenEnableTrueAndEnabled_returnsTrue() throws Exception {
- BackupUtils backupUtils =
- new BackupUtils() {
- @Override
- protected InputStream executeShellCommand(String command) throws IOException {
- String output = "";
- if (command.equals(getBmgrCommand("activated", TEST_USER_ID))) {
- output = "Backup Manager currently activated";
- } else if (command.equals(getBmgrCommand("activate true", TEST_USER_ID))) {
- output = "Backup Manager now activated";
- mIsActivateCommandCalled = true;
- }
- return new ByteArrayInputStream(output.getBytes("UTF-8"));
- }
- };
- assertTrue(backupUtils.activateBackupForUser(true, TEST_USER_ID));
- assertTrue(mIsActivateCommandCalled);
- }
-
- @Test
- public void testActivateBackup_whenEnableTrueAndDisabled_returnsFalse() throws Exception {
- BackupUtils backupUtils =
- new BackupUtils() {
- @Override
- protected InputStream executeShellCommand(String command) throws IOException {
- String output = "";
- if (command.equals(getBmgrCommand("activated", TEST_USER_ID))) {
- output = "Backup Manager currently deactivated";
- } else if (command.equals(getBmgrCommand("activate true", TEST_USER_ID))) {
- output = "Backup Manager now activated";
- mIsActivateCommandCalled = true;
- }
- return new ByteArrayInputStream(output.getBytes("UTF-8"));
- }
- };
- assertFalse(backupUtils.activateBackupForUser(true, TEST_USER_ID));
- assertTrue(mIsActivateCommandCalled);
- }
-
- @Test
- public void testActivateBackup_whenEnableFalseAndEnabled_returnsTrue() throws Exception {
- BackupUtils backupUtils =
- new BackupUtils() {
- @Override
- protected InputStream executeShellCommand(String command) throws IOException {
- String output = "";
- if (command.equals(getBmgrCommand("activated", TEST_USER_ID))) {
- output = "Backup Manager currently activated";
- } else if (command.equals(getBmgrCommand("activate false", TEST_USER_ID))) {
- output = "Backup Manager now deactivated";
- mIsActivateCommandCalled = true;
- }
- return new ByteArrayInputStream(output.getBytes("UTF-8"));
- }
- };
- assertTrue(backupUtils.activateBackupForUser(false, TEST_USER_ID));
- assertTrue(mIsActivateCommandCalled);
- }
-
- @Test
- public void testActivateBackup_whenEnableFalseAndDisabled_returnsFalse() throws Exception {
- BackupUtils backupUtils =
- new BackupUtils() {
- @Override
- protected InputStream executeShellCommand(String command) throws IOException {
- String output = "";
- if (command.equals(getBmgrCommand("activated", TEST_USER_ID))) {
- output = "Backup Manager currently deactivated";
- } else if (command.equals(getBmgrCommand("activate false", TEST_USER_ID))) {
- output = "Backup Manager now deactivated";
- mIsActivateCommandCalled = true;
- }
- return new ByteArrayInputStream(output.getBytes("UTF-8"));
- }
- };
- assertFalse(backupUtils.activateBackupForUser(false, TEST_USER_ID));
- assertTrue(mIsActivateCommandCalled);
- }
-
- private String getBmgrCommand(String command, int userId) {
- return "bmgr --user " + userId + " " + command;
- }
}
diff --git a/tools/cts-tradefed/etc/cts-tradefed b/tools/cts-tradefed/etc/cts-tradefed
index e2833e89..80f9c339 100755
--- a/tools/cts-tradefed/etc/cts-tradefed
+++ b/tools/cts-tradefed/etc/cts-tradefed
@@ -41,9 +41,9 @@ checkPath adb
checkPath java
# check java version
-JAVA_VERSION=$(java -version 2>&1 | head -n 1 | grep 'version [ "]\(1\.8\|9\|11\).*[ "]')
+JAVA_VERSION=$(java -version 2>&1 | head -n 1 | grep 'version [ "]\(1\.8\|9\).*[ "]')
if [ "${JAVA_VERSION}" == "" ]; then
- echo "Wrong java version. 1.8, 9, or 11 is required."
+ echo "Wrong java version. 1.8 or 9 is required."
exit
fi
diff --git a/tools/cts-tradefed/res/config/cts-common.xml b/tools/cts-tradefed/res/config/cts-common.xml
index c1dffd24..cbd4741e 100644
--- a/tools/cts-tradefed/res/config/cts-common.xml
+++ b/tools/cts-tradefed/res/config/cts-common.xml
@@ -47,13 +47,6 @@
<option name="expected-value" value="en-US"/> <!-- Device locale should be US English -->
<option name="throw-error" value="false"/> <!-- Only print warning if not en-US -->
</target_preparer>
-
- <target_preparer class="com.android.compatibility.common.tradefed.targetprep.PropertyCheck">
- <option name="property-name" value="persist.sys.test_harness" />
- <option name="expected-value" value="false"/> <!-- Device shouldn't be in test harness mode -->
- <option name="throw-error" value="true"/>
- </target_preparer>
-
<template-include name="reporters" default="basic-reporters" />
<!-- Include additional test metadata output. -->
diff --git a/tools/cts-tradefed/res/config/cts-known-failures.xml b/tools/cts-tradefed/res/config/cts-known-failures.xml
index 2f31dc9c..88e549ea 100755
--- a/tools/cts-tradefed/res/config/cts-known-failures.xml
+++ b/tools/cts-tradefed/res/config/cts-known-failures.xml
@@ -21,7 +21,6 @@
<!-- b/38182235 -->
<option name="compatibility:exclude-filter" value="CtsLocationTestCases android.location.cts.GnssTtffTests#testTtffWithNetwork" />
- <option name="compatibility:exclude-filter" value="CtsLocationTestCases[instant] android.location.cts.GnssTtffTests#testTtffWithNetwork" />
<!-- b/17989532 -->
<option name="compatibility:exclude-filter" value="CtsCameraTestCases android.hardware.camera2.cts.SurfaceViewPreviewTest#testPreparePerformance" />
@@ -208,17 +207,4 @@
<!-- b/129859594 -->
<option name="compatibility:exclude-filter" value="CtsAtomicInstallTestCases com.android.tests.atomicinstall.AtomicInstallTest#testFailInconsistentMultiPackageCommit" />
-<<<<<<< HEAD (4849a6 resolve merge conflicts of 6a5831281a690078d87835443cd9899b7)
-=======
-
- <!-- b/126548816 -->
- <option name="compatibility:exclude-filter" value="CtsRcsTestCases" />
-
- <!-- b/112688380 -->
- <option name="compatibility:exclude-filter" value="CtsActivityManagerDeviceTestCases android.server.am.ActivityManagerAppConfigurationTests#testAppOrientationRequestConfigClears" />
- <option name="compatibility:exclude-filter" value="CtsActivityManagerDeviceTestCases android.server.am.ActivityManagerAppConfigurationTests#testTaskCloseRestoreFreeOrientation" />
- <!-- b/112688380, b/139936670 -->
- <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.AppConfigurationTests#testAppOrientationRequestConfigClears" />
- <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.AppConfigurationTests#testTaskCloseRestoreFreeOrientation" />
->>>>>>> CHANGE (ef261c DO NOT MERGE: Merging test/suite_harness into qt-dev.)
</configuration>
diff --git a/tools/cts-tradefed/res/config/cts-on-gsi-base-filters.xml b/tools/cts-tradefed/res/config/cts-on-gsi-base-filters.xml
deleted file mode 100644
index adadd4b3..00000000
--- a/tools/cts-tradefed/res/config/cts-on-gsi-base-filters.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2019 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<configuration description="CTS-on-GSI test base filters">
-
- <!-- Explicitly include CTS components listed in CtsConfigLoadingTest.java -->
- <option name="compatibility:module-metadata-include-filter" key="component" value="abuse" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="art" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="auth" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="auto" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="backup" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="bionic" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="bluetooth" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="camera" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="deqp" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="devtools" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="framework" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="graphics" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="inputmethod" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="libcore" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="location" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="media" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="metrics" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="misc" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="networking" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="neuralnetworks" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="renderscript" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="security" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="statsd" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="systems" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="sysui" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="telecom" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="tv" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="uitoolkit" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="vr" />
- <option name="compatibility:module-metadata-include-filter" key="component" value="webview" />
-
- <!-- Exclude vts-hal-adapter tests -->
- <option name="compatibility:module-metadata-exclude-filter" key="plan" value="vts-hal-adapter" />
-</configuration> \ No newline at end of file
diff --git a/tools/cts-tradefed/res/config/cts-on-gsi-exclude.xml b/tools/cts-tradefed/res/config/cts-on-gsi-exclude.xml
deleted file mode 100644
index ae86f745..00000000
--- a/tools/cts-tradefed/res/config/cts-on-gsi-exclude.xml
+++ /dev/null
@@ -1,294 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2019 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<configuration description="Excluded tests from cts-on-gsi">
- <!-- Tell all AndroidJUnitTests to exclude certain annotations -->
- <option name="compatibility:test-arg" value="com.android.tradefed.testtype.AndroidJUnitTest:exclude-annotation:android.platform.test.annotations.RestrictedBuildTest" />
-
- <!-- Tell all HostTests to exclude certain annotations -->
- <option name="compatibility:test-arg" value="com.android.tradefed.testtype.HostTest:exclude-annotation:android.platform.test.annotations.RestrictedBuildTest" />
- <option name="compatibility:test-arg" value="com.android.compatibility.common.tradefed.testtype.JarHostTest:exclude-annotation:android.platform.test.annotations.RestrictedBuildTest" />
-
- <!-- Radio system of a general system image is not checked -->
- <option name="compatibility:exclude-filter" value="CtsTelephonyTestCases" />
- <option name="compatibility:exclude-filter" value="CtsTelephony2TestCases" />
- <option name="compatibility:exclude-filter" value="CtsAppTestCases android.app.cts.SystemFeaturesTest#testLocationFeatures" />
- <option name="compatibility:exclude-filter" value="CtsIncidentHostTestCases com.android.server.cts.PackageIncidentTest#testPackageServiceDump" />
-
- <!-- Exclude telephony related testcases -->
- <option name="compatibility:exclude-filter" value="CtsCarrierApiTestCases android.carrierapi.cts.CarrierApiTest#testSimCardPresent" />
- <option name="compatibility:exclude-filter" value="CtsCarrierApiTestCases android.carrierapi.cts.CarrierApiTest#testGetIccAuthentication" />
- <option name="compatibility:exclude-filter" value="CtsCarrierApiTestCases android.carrierapi.cts.CarrierApiTest#testHasCarrierPrivileges" />
- <option name="compatibility:exclude-filter" value="CtsCarrierApiTestCases android.carrierapi.cts.CarrierApiTest#testSendDialerSpecialCode" />
- <option name="compatibility:exclude-filter" value="CtsJobSchedulerTestCases android.jobscheduler.cts.ConnectivityConstraintTest#testConnectivityConstraintExecutes_metered" />
- <option name="compatibility:exclude-filter" value="CtsNetTestCasesLegacyApi22 android.net.cts.legacy.api22.ConnectivityManagerLegacyTest#testStartUsingNetworkFeature_enableHipri" />
- <option name="compatibility:exclude-filter" value="CtsPermission2TestCases android.permission2.cts.NoReceiveSmsPermissionTest#testAppSpecificSmsToken" />
- <option name="compatibility:exclude-filter" value="CtsPermission2TestCases android.permission2.cts.NoReceiveSmsPermissionTest#testReceiveTextMessage" />
- <option name="compatibility:exclude-filter" value="CtsPermissionTestCases android.permission.cts.NoSystemFunctionPermissionTest#testSendSms" />
- <option name="compatibility:exclude-filter" value="CtsSecurityHostTestCases android.security.cts.SELinuxHostTest#testNoExemptionsForBinderInVendorBan" />
- <option name="compatibility:exclude-filter" value="CtsSecurityHostTestCases android.security.cts.SELinuxHostTest#testNoExemptionsForSocketsBetweenCoreAndVendorBan" />
- <option name="compatibility:exclude-filter" value="CtsSecurityHostTestCases android.security.cts.SELinuxHostTest#testNoExemptionsForVendorExecutingCore" />
- <option name="compatibility:exclude-filter" value="CtsUsageStatsTestCases android.app.usage.cts.NetworkUsageStatsTest#testAppDetails" />
- <option name="compatibility:exclude-filter" value="CtsUsageStatsTestCases android.app.usage.cts.NetworkUsageStatsTest#testAppSummary" />
- <option name="compatibility:exclude-filter" value="CtsUsageStatsTestCases android.app.usage.cts.NetworkUsageStatsTest#testCallback" />
- <option name="compatibility:exclude-filter" value="CtsUsageStatsTestCases android.app.usage.cts.NetworkUsageStatsTest#testDeviceSummary" />
- <option name="compatibility:exclude-filter" value="CtsUsageStatsTestCases android.app.usage.cts.NetworkUsageStatsTest#testTagDetails" />
- <option name="compatibility:exclude-filter" value="CtsUsageStatsTestCases android.app.usage.cts.NetworkUsageStatsTest#testUidDetails" />
- <option name="compatibility:exclude-filter" value="CtsUsageStatsTestCases android.app.usage.cts.NetworkUsageStatsTest#testUserSummary" />
-
- <!-- Exclude not applicable testcases-->
- <option name="compatibility:exclude-filter" value="CtsSignatureTestCases" />
- <option name="compatibility:exclude-filter" value="CtsOsTestCases android.os.cts.UsbDebuggingTest#testUsbDebugging" />
-
- <!--
- Exclude testcases failing on Pixel devices
- TODO(jaeshin@): b/68300743
- -->
- <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.AvailableIntentsTest#testVoiceCommand" />
- <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.AvailableIntentsTest#testVoiceSearchHandsFree" />
-
- <!-- Excluded tese case - TODO(jiyong): b/67739526 to reenable that -->
- <option name="compatibility:exclude-filter" value="CtsJniTestCases android.jni.cts.JniStaticTest#test_linker_namespaces" />
-
- <!-- b/68190722: Remove testcases that require RRO which is planned for Pi -->
- <option name="compatibility:exclude-filter" value="CtsAppTestCases android.app.cts.ActionBarTest#testOpenOptionsMenu" />
- <option name="compatibility:exclude-filter" value="CtsAppTestCases android.app.cts.ActionBarTest#testOptionsMenuKey" />
- <option name="compatibility:exclude-filter" value="CtsAppTestCases android.app.cts.ActivityKeyboardShortcutsTest#testRequestShowKeyboardShortcuts" />
-
- <!-- b/66924299: Remove testcase that logd reads kernel log -->
- <option name="compatibility:exclude-filter" value="CtsLiblogTestCases liblog#android_logger_get_" />
-
- <!-- b/71958344: Exclude until CTS releases it -->
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.OverlayHostTest#testInstallingOverlayHasNoEffect" />
-
- <!-- b/65561379: Exclude android.media.cts.MediaPlayerFlakyNetworkTest -->
- <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.MediaPlayerFlakyNetworkTest" />
-
- <!-- b/69329663: DirectBootHostTest#testDirectBootNative flaky -->
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.DirectBootHostTest#testDirectBootNative" />
-
- <!-- b/74375238: CtsAppSecurityHostTestCases imcomplete test failure -->
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.DocumentsTest#testCreateDocumentAtInitialLocation" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.DocumentsTest#testCreateExisting" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.android.appsecurity.cts.DocumentsTest#testCreateNew" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.DocumentsTest#testCreateWebLink" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.DocumentsTest#testEject" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.DocumentsTest#testFindDocumentPathInScopedAccess" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.DocumentsTest#testGetContent" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.DocumentsTest#testOpenDocumentAtInitialLocation" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.DocumentsTest#testOpenDocumentTreeAtInitialLocation" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.DocumentsTest#testOpenSimple" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.DocumentsTest#testOpenVirtual" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.DocumentsTest#testTransferDocument" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.DocumentsTest#testTree" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.ScopedDirectoryAccessTest#testDeniesOnceButAllowsAskingAgain" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.ScopedDirectoryAccessTest#testDeniesOnceForAll" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.android.appsecurity.cts.ScopedDirectoryAccessTest#testDeniesOnceForAllClearedWhenPackageRemoved" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.android.appsecurity.cts.ScopedDirectoryAccessTest#testNotAskedAgain" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.ScopedDirectoryAccessTest#testUserAccepts" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.ScopedDirectoryAccessTest#testUserAcceptsNewDirectory" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.android.appsecurity.cts.ScopedDirectoryAccessTest#testUserRejects" />
-
- <!-- b/74583365: CtsAppSecurityHostTestCases flaky -->
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.AdoptableHostTest#testApps " />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.AdoptableHostTest#testEjected" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.AdoptableHostTest#testPackageInstaller" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.AdoptableHostTest#testPrimaryStorage" />
-
- <!-- b/77175538: CtsViewTestCases failure flaky -->
- <option name="compatibility:exclude-filter" value="CtsViewTestCases android.view.cts.PixelCopyTest#testWindowProducerCopyToRGBA16F" />
-
- <!-- b/73727333: CtsSystemUiTestCases failure flaky -->
- <option name="compatibility:exclude-filter" value="CtsSystemUiTestCases android.systemui.cts.LightBarTests#testLightNavigationBar" />
- <option name="compatibility:exclude-filter" value="CtsSystemUiTestCases android.systemui.cts.LightBarThemeTest#testNavigationBarDivider" />
-
- <!-- b/73727934: CtsAutoFillServiceTestCases flaky -->
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.AutoFinishSessionTest#hideParentToFinishSession" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.AutoFinishSessionTest#removeBothViewsToFinishSession" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.AutoFinishSessionTest#removeParentInBackground" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.AutofillValueTest#autofillCompoundButtonWithTextValue" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.AutofillValueTest#autofillDatePickerWithTextValue" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.AutofillValueTest#autofillEmptyTextValue" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.AutofillValueTest#autofillInvalidListValueToRadioGroup" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.AutofillValueTest#autofillInvalidListValueToSpinner" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.AutofillValueTest#autofillSpinnerWithTextValue" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.AutofillValueTest#autofillTextWithListValue" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.AutofillValueTest#autofillTimePickerWithTextValue" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.AutofillValueTest#autofillToggleValueWithFalse" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.AutofillValueTest#autofillToggleValueWithTrue" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.AutofillValueTest#autofillZeroListValueToSpinner" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#checkFillSelectionAfterSelectingTwoDatasets" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#checkFillSelectionIsResetAfterReturningError" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#checkFillSelectionIsResetAfterReturningNull" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.android.autofillservice.cts.LoginActivityTest#checkFillSelectionIsResetAfterTimeout" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutoFillMultipleDatasetsPickFirst" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutoFillMultipleDatasetsPickSecond" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutoFillMultipleDatasetsPickThird" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutoFillOneDatasetAndMoveFocusAround" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutoFillOneDatasetAndSave" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutoFillOneDatasetAndSaveHidingOverlays" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutoFillOneDatasetAndSaveWhenFlagSecure" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutoFillOneDatasetWhenFlagSecure" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutoFillTwoDatasetsUnevenNumberOfFieldsFillsAll" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutoFillWhenViewHasChildAccessibilityNodes" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutofillCallbacks" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutofillManuallyAfterServiceReturnedNoDatasets" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutofillManuallyAgainAfterAutomaticallyAutofilledBefore" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutofillManuallyAndSaveAfterServiceReturnedNoDatasets" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutofillManuallyOneDataset" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutofillManuallyPartialField" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutofillManuallyTwoDatasetsPickFirst" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutofillManuallyTwoDatasetsPickSecond" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutofillMultipleDatasetsCustomPresentationFirstDatasetMissingSecondField" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutofillMultipleDatasetsCustomPresentationSameFields" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutofillMultipleDatasetsCustomPresentationSecondDatasetMissingFirstField" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testAutofillOneDatasetCustomPresentation" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testCancelMultipleTimes" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testCommitMultipleTimes" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testDatasetAuthFiltering" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testDatasetAuthMixedFilteringSelectAuth" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testDatasetAuthMixedSelectAuth" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testDatasetAuthMixedSelectNonAuth" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testDatasetAuthTwoDatasets" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testDatasetAuthTwoFieldsNoValues" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testDatasetAuthTwoFieldsReplaceResponse" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testDatasetAuthTwoFieldsUserCancelsFirstAttempt" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testFillResponseAuthBothFieldsUserCancelsFirstAttempt" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testFillResponseAuthJustOneField" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testFillResponseAuthServiceHasNoData" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testFillResponseAuthServiceHasNoDataButCanSave" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testFillResponseAuthWhenAppCallsCancel" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testFillResponseFiltering" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.LoginActivityTest#testUiNotShownAfterAutofilled" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.OptionalSaveActivityTest#testAutofillAllChangedIgnored" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.OptionalSaveActivityTest#testAutofillAllChangedSecondRequiredSaveAll" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.OptionalSaveActivityTest#testAutofillAllFirstRequiredChangedBackToInitialState" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.PartitionedActivityTest#testAutofill4PartitionsAutomatically" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.PartitionedActivityTest#testAutofill4PartitionsManually" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.PartitionedActivityTest#testAutofill4PartitionsMixManualAndAuto" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.PartitionedActivityTest#testAutofillMultipleAuthDatasetsInSequence" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.PartitionedActivityTest#testAutofillMultipleAuthDatasetsNoOverlap" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.PartitionedActivityTest#testAutofillMultipleAuthDatasetsOverlapPickSecond" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.PartitionedActivityTest#testAutofillMultipleDatasetsMixedAuthNoAuthNoOverlap" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.PartitionedActivityTest#testAutofillMultipleDatasetsNoOverlap" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.PartitionedActivityTest#testAutofillMultipleDatasetsOverlappingPicksSecond" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.PartitionedActivityTest#testAutofillTwoPartitionsInSequence" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.PartitionedActivityTest#testAutofillTwoPartitionsSkipFirst" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.SimpleSaveActivityTest#testAutoFillOneDatasetAndSave_usingUiAutomatorOnly" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.SimpleSaveActivityTest#testDismissSave_byTappingBack" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.SimpleSaveActivityTest#testTapHomeWhileDatasetPickerUiIsShowing" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.SimpleSaveActivityTest#testTapHomeWhileSaveUiIsShowing" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.SimpleSaveActivityTest#testTapLink_tapBack_thenStartOverBySayingNoAndFocus" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.SimpleSaveActivityTest#testTapLink_tapBack_thenStartOverBySayingYesAndFocus" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.VirtualContainerActivityTest#testAutofillManuallyOneDataset" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.VirtualContainerActivityTest#testAutofillManuallyTwoDatasetsPickSecond" />
- <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.VirtualContainerActivityTest#testAutofillTwoDatasets" />
-
- <!-- b/80390042: CtsContentTestCases failure flaky -->
- <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.ContentProviderCursorWindowTest#testQuery" />
- <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.res.cts.PrivateAttributeTest#testNoAttributesAfterLastPublicAttribute" />
-
- <!-- b/80388296: CtsDevicePolicyManagerTestCases failure flaky -->
- <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testDisallowAutofill_allowed" />
- <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testPackageInstallUserRestrictions" />
- <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testPermissionAppUpdate" />
- <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testPermissionGrant" />
- <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testPermissionMixedPolicies" />
- <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testPermissionPolicy" />
- <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testSuspendPackage" />
-
- <!-- b/80407835: CtsServicesHostTestCases failure flaky -->
- <option name="compatibility:exclude-filter" value="CtsServicesHostTestCases android.server.cts.KeyguardTests#testDialogShowWhenLockedActivity" />
- <option name="compatibility:exclude-filter" value="CtsServicesHostTestCases android.server.cts.KeyguardTests#testTranslucentShowWhenLockedActivity" />
-
- <!-- b/80388295: CtsAccessibilityServiceTestCases failure flaky -->
- <option name="compatibility:exclude-filter" value="CtsAccessibilityServiceTestCases android.accessibilityservice.cts.AccessibilityGestureDispatchTest#testClickWhenMagnified_matchesActualTouch" />
-
- <!-- b/80284482: Flaky tests -->
- <option name="compatibility:exclude-filter" value="CtsAlarmManagerTestCases android.alarmmanager.cts.AppStandbyTests#testAllowWhileIdleAlarms" />
- <option name="compatibility:exclude-filter" value="CtsAlarmManagerTestCases android.alarmmanager.cts.AppStandbyTests#testBucketUpgradeToNoDelay" />
- <option name="compatibility:exclude-filter" value="CtsAlarmManagerTestCases android.alarmmanager.cts.AppStandbyTests#testBucketUpgradeToSmallerDelay" />
- <option name="compatibility:exclude-filter" value="CtsAlarmManagerTestCases android.alarmmanager.cts.AppStandbyTests#testFrequentDelay" />
- <option name="compatibility:exclude-filter" value="CtsAlarmManagerTestCases android.alarmmanager.cts.AppStandbyTests#testRareDelay" />
- <option name="compatibility:exclude-filter" value="CtsAlarmManagerTestCases android.alarmmanager.cts.AppStandbyTests#testWorkingSetDelay" />
-
- <!-- b/110260628: A confirmed GSI incompatibility (waiver) -->
- <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_DontSkipSetupWizard" />
- <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.DeviceOwnerTest#testSecurityLoggingWithSingleUser" />
- <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.MixedDeviceOwnerTest#testKeyManagement" />
- <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.MixedProfileOwnerTest#testKeyManagement" />
- <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testKeyManagement" />
-
- <!-- b/110405497: Flaky tests (waiver) -->
- <option name="compatibility:exclude-filter" value="CtsKeystoreTestCases android.keystore.cts.KeyAttestationTest#testDeviceIdAttestation" />
-
- <!-- b/110385515: Flaky due to a particular SIM card requirement (excluded) -->
- <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.ConnectivityManagerTest#testOpenConnection" />
- <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.wifi.rtt.cts.WifiRttTest#testRangingToTestAp" />
-
- <!-- b/110261912: Flaky tests -->
- <option name="compatibility:exclude-filter" value="CtsProviderTestCases android.provider.cts.BlockedNumberContractTest#testProviderInteractionsAsRegularApp_fails" />
-
- <!-- b/80077839: Incompatibility with GSI (waiver) -->
- <option name="compatibility:exclude-filter" value="CtsStatsdHostTestCases android.cts.statsd.atom.HostAtomTests#testBluetoothActivityInfo" />
- <option name="compatibility:exclude-filter" value="CtsStatsdHostTestCases android.cts.statsd.atom.HostAtomTests#testScreenStateChangedAtom" />
- <option name="compatibility:exclude-filter" value="CtsStatsdHostTestCases android.cts.statsd.validation.ValidationTests#testPartialWakelock" />
-
- <!-- b/110417203: Flaky tests -->
- <option name="compatibility:exclude-filter" value="CtsUsageStatsTestCases android.app.usage.cts.NetworkUsageStatsTest#testUidTagStateDetails" />
-
- <!-- b/80077786: MyVerizonServices fail -->
- <option name="compatibility:exclude-filter" value="CtsPermission2TestCases android.permission2.cts.PrivappPermissionsTest#testPrivappPermissionsEnforcement" />
-
- <!-- b/111101428: CtsOsTestCases irrelevant test cases -->
- <option name="compatibility:exclude-filter" value="CtsOsTestCases android.os.cts.BuildTest#testIsSecureUserBuild" />
- <option name="compatibility:exclude-filter" value="CtsOsTestCases android.os.cts.BuildVersionTest#testBuildFingerprint" />
-
- <!-- b/111147583: CtsSecurityTestCases irrelevant test cases -->
- <option name="compatibility:exclude-filter" value="CtsSecurityTestCases android.security.cts.VerifiedBootTest#testVerifiedBootSupport" />
-
- <!-- b/110405126: CtsPermissionTestCases flaky (due to SIM card setting) -->
- <option name="compatibility:exclude-filter" value="CtsPermissionTestCases android.permission.cts.TelephonyManagerPermissionTest#testGetDeviceId" />
- <option name="compatibility:exclude-filter" value="CtsPermissionTestCases android.permission.cts.TelephonyManagerPermissionTest#testGetImei" />
- <option name="compatibility:exclude-filter" value="CtsPermissionTestCases android.permission.cts.TelephonyManagerPermissionTest#testGetLine1Number" />
- <option name="compatibility:exclude-filter" value="CtsPermissionTestCases android.permission.cts.TelephonyManagerPermissionTest#testGetSimSerialNumber" />
- <option name="compatibility:exclude-filter" value="CtsPermissionTestCases android.permission.cts.TelephonyManagerPermissionTest#testGetSubscriberId" />
- <option name="compatibility:exclude-filter" value="CtsPermissionTestCases android.permission.cts.TelephonyManagerPermissionTest#testSetDataEnabled" />
- <option name="compatibility:exclude-filter" value="CtsPermissionTestCases android.permission.cts.TelephonyManagerPermissionTest#testVoiceMailNumber" />
-
- <!-- b/111967702: CtsSecurityTestCases irrelevant test cases -->
- <option name="compatibility:exclude-filter" value="CtsSecurityTestCases android.security.cts.BannedFilesTest#testNoSu" />
- <option name="compatibility:exclude-filter" value="CtsSecurityTestCases android.security.cts.BannedFilesTest#testNoSuInPath" />
-
- <!-- b/116170534: CtsMediaTestCases regression (9.0 R4 waiver) -->
- <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.DecoderTest#testH265HDR10StaticMetadata" />
- <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VolumeShaperTest#testPlayerCornerCase" />
- <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VolumeShaperTest#testPlayerCornerCase2" />
- <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VolumeShaperTest#testPlayerCubicMonotonic" />
- <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VolumeShaperTest#testPlayerDuck" />
- <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VolumeShaperTest#testPlayerJoin" />
- <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VolumeShaperTest#testPlayerRamp" />
- <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VolumeShaperTest#testPlayerRunDuringPauseStop" />
- <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VolumeShaperTest#testPlayerStepRamp" />
- <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VolumeShaperTest#testPlayerTwoShapers" />
-
- <!-- b/112450846: CtsAppSecurityHostTestCases multi-user, fixing on Q -->
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.StorageHostTest#testCache" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.StorageHostTest#testVerifyAppStats" />
- <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.StorageHostTest#testVerifyStats" />
-
- <!-- b/111167329: CtsCameraTestCases failure -->
- <option name="compatibility:exclude-filter" value="CtsCameraTestCases android.hardware.camera2.cts.SurfaceViewPreviewTest#testSurfaceSet"/>
-</configuration> \ No newline at end of file
diff --git a/tools/cts-tradefed/res/config/cts-on-gsi-presubmit.xml b/tools/cts-tradefed/res/config/cts-on-gsi-presubmit.xml
deleted file mode 100644
index 3c42a126..00000000
--- a/tools/cts-tradefed/res/config/cts-on-gsi-presubmit.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2019 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<configuration description="Runs a subset of CTS-on-GSI tests selected for presubmit testing">
- <option name="plan" value="cts-on-gsi-presubmit" />
- <include name="cts-automated" />
- <!-- CTS-on-GSI is not expected to run parameterized modules -->
- <option name="compatibility:enable-parameterized-modules" value="false" />
- <option name="compatibility:primary-abi-only" value="true" />
-
- <include name="cts-on-gsi-exclude" />
-
- <option name="compatibility:test-arg" value="com.android.compatibility.common.tradefed.testtype.JarHostTest:include-annotation:android.platform.test.annotations.Presubmit" />
- <option name="compatibility:test-arg" value="com.android.tradefed.testtype.AndroidJUnitTest:include-annotation:android.platform.test.annotations.Presubmit" />
- <option name="compatibility:test-arg" value="com.android.tradefed.testtype.HostTest:include-annotation:android.platform.test.annotations.Presubmit" />
-</configuration>
-
diff --git a/tools/cts-tradefed/res/config/cts-on-gsi.xml b/tools/cts-tradefed/res/config/cts-on-gsi.xml
deleted file mode 100644
index f55a344f..00000000
--- a/tools/cts-tradefed/res/config/cts-on-gsi.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2019 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<configuration description="Runs a subset of CTS tests using a general system image (GSI)">
- <option name="plan" value="cts-on-gsi" />
-
- <include name="cts" />
- <!-- CTS-on-GSI is not expected to run parameterized modules -->
- <option name="compatibility:enable-parameterized-modules" value="false" />
- <option name="compatibility:primary-abi-only" value="true" />
-
- <include name="cts-on-gsi-base-filters" />
- <include name="cts-on-gsi-exclude" />
-
-</configuration>
-
diff --git a/tools/cts-tradefed/res/config/cts-preconditions.xml b/tools/cts-tradefed/res/config/cts-preconditions.xml
index 6cac0778..e3f517cf 100644
--- a/tools/cts-tradefed/res/config/cts-preconditions.xml
+++ b/tools/cts-tradefed/res/config/cts-preconditions.xml
@@ -41,13 +41,6 @@
<option name="set-value" value="0"/>
</target_preparer>
- <!-- Disable crash error dialogs to avoid affecting following tests -->
- <target_preparer class="com.android.compatibility.common.tradefed.targetprep.SettingsPreparer">
- <option name="device-setting" value="hide_error_dialogs"/>
- <option name="setting-type" value="global"/>
- <option name="set-value" value="1"/>
- </target_preparer>
-
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkPreconditionCheck">
<option name="apk" value="CtsPreconditions.apk"/>
<option name="package" value="com.android.preconditions.cts"/>