diff options
| author | android-build-prod (mdb) <android-build-team-robot@google.com> | 2020-10-01 20:32:08 +0000 |
|---|---|---|
| committer | android-build-prod (mdb) <android-build-team-robot@google.com> | 2020-10-01 20:32:08 +0000 |
| commit | 319bb86ee1bfa669692c18c84b75501a83e43782 (patch) | |
| tree | f76a0fb77a47bfa3a501c96ee17bebb5310dc8db | |
| parent | c9e11fd0c29c5a8c7a0ed8d5e89bf5a48fd071f6 (diff) | |
| parent | bc8b50a0d0289e97c2e6bcc0498c04bdb43ed768 (diff) | |
| download | platform_test_suite_harness-sdk-release.tar.gz platform_test_suite_harness-sdk-release.tar.bz2 platform_test_suite_harness-sdk-release.zip | |
Snap for 6877830 from bc8b50a0d0289e97c2e6bcc0498c04bdb43ed768 to sdk-releasesdk-release
Change-Id: Ifc9ec90c59a56e385296b388c765937ed4e84892
39 files changed, 731 insertions, 285 deletions
@@ -13,3 +13,5 @@ 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 cts-meerkat.xml = alanstokes@google.com, brufino@google.com, lus@google.com, rickywai@google.com +per-file cts-on-csi*.xml = ycchen@google.com, hsinyichen@google.com, tyanh@google.com +per-file csi-*.xml = ycchen@google.com, hsinyichen@google.com, tyanh@google.com 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 227fcf58..c6ccd2a6 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 @@ -172,8 +172,8 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene private ICaseResult mCurrentCaseResult; private ITestResult mCurrentResult; private String mDeviceSerial = UNKNOWN_DEVICE; - private Set<String> mMasterDeviceSerials = new HashSet<>(); - private Set<IBuildInfo> mMasterBuildInfos = new HashSet<>(); + private Set<String> mMainDeviceSerials = new HashSet<>(); + private Set<IBuildInfo> mMainBuildInfos = new HashSet<>(); // Whether or not we failed the fingerprint check private boolean mFingerprintFailure = false; @@ -191,10 +191,9 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene // Whether the current module has previously been marked done private boolean mModuleWasDone; - // Nullable. If null, "this" is considered the master and must handle - // result aggregation and reporting. When not null, it should forward events - // to the master. - private final ResultReporter mMasterResultReporter; + // Nullable. If null, "this" is considered the primary and must handle + // result aggregation and reporting. When not null, it should forward events to the primary + private final ResultReporter mPrimaryResultReporter; private LogFileSaver mTestLogSaver; @@ -213,11 +212,10 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene } /** - * Construct a shard ResultReporter that forwards module results to the - * masterResultReporter. + * Construct a shard ResultReporter that forwards module results to the mPrimaryResultReporter. */ - public ResultReporter(ResultReporter masterResultReporter) { - mMasterResultReporter = masterResultReporter; + public ResultReporter(ResultReporter primaryResultReporter) { + mPrimaryResultReporter = primaryResultReporter; } /** {@inheritDoc} */ @@ -243,22 +241,22 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene } if (isShardResultReporter()) { - // Shard ResultReporters forward invocationStarted to the mMasterResultReporter - mMasterResultReporter.invocationStarted(context); + // Shard ResultReporters forward invocationStarted to the mPrimaryResultReporter + mPrimaryResultReporter.invocationStarted(context); return; } - // NOTE: Everything after this line only applies to the master ResultReporter. + // NOTE: Everything after this line only applies to the primary ResultReporter. - synchronized(this) { + synchronized (this) { if (primaryBuild.getDeviceSerial() != null) { - // The master ResultReporter collects all device serials being used + // The primary ResultReporter collects all device serials being used // for the current implementation. - mMasterDeviceSerials.add(primaryBuild.getDeviceSerial()); + mMainDeviceSerials.add(primaryBuild.getDeviceSerial()); } - // The master ResultReporter collects all buildInfos. - mMasterBuildInfos.add(primaryBuild); + // The primary ResultReporter collects all buildInfos. + mMainBuildInfos.add(primaryBuild); if (mResultDir == null) { // For the non-sharding case, invocationStarted is only called once, @@ -456,8 +454,8 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene } } if (isShardResultReporter()) { - // Forward module results to the master. - mMasterResultReporter.mergeModuleResult(mCurrentModuleResult); + // Forward module results to the primary. + mPrimaryResultReporter.mergeModuleResult(mCurrentModuleResult); mCurrentModuleResult.resetTestRuns(); mCurrentModuleResult.resetRuntime(); } @@ -527,17 +525,17 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene public void invocationEnded(long elapsedTime) { if (isShardResultReporter()) { // Shard ResultReporters report - mMasterResultReporter.invocationEnded(elapsedTime); + mPrimaryResultReporter.invocationEnded(elapsedTime); return; } - // NOTE: Everything after this line only applies to the master ResultReporter. + // NOTE: Everything after this line only applies to the primary ResultReporter. - synchronized(this) { - // The master ResultReporter tracks the progress of all invocations across + synchronized (this) { + // The mPrimaryResultReporter tracks the progress of all invocations across // shard ResultReporters. Writing results should not proceed until all // ResultReporters have completed. - if (++invocationEndedCount < mMasterBuildInfos.size()) { + if (++invocationEndedCount < mMainBuildInfos.size()) { return; } mElapsedTime = elapsedTime; @@ -561,14 +559,14 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene return; } // Add all device serials into the result to be serialized - for (String deviceSerial : mMasterDeviceSerials) { + for (String deviceSerial : mMainDeviceSerials) { mResult.addDeviceSerial(deviceSerial); } addDeviceBuildInfoToResult(); Set<String> allExpectedModules = new HashSet<>(); - for (IBuildInfo buildInfo : mMasterBuildInfos) { + for (IBuildInfo buildInfo : mMainBuildInfos) { for (Map.Entry<String, String> entry : buildInfo.getBuildAttributes().entrySet()) { String key = entry.getKey(); String value = entry.getValue(); @@ -703,10 +701,10 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene */ @Override public void testLog(String name, LogDataType type, InputStreamSource stream) { - // This is safe to be invoked on either the master or a shard ResultReporter + // This is safe to be invoked on either the primary or a shard ResultReporter if (isShardResultReporter()) { - // Shard ResultReporters forward testLog to the mMasterResultReporter - mMasterResultReporter.testLog(name, type, stream); + // Shard ResultReporters forward testLog to the mPrimaryResultReporter + mPrimaryResultReporter.testLog(name, type, stream); return; } if (name.endsWith(DeviceInfo.FILE_SUFFIX)) { @@ -733,7 +731,7 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene } } - /* Write device-info files to the result, invoked only by the master result reporter */ + /* Write device-info files to the result, invoked only by the primary result reporter */ private void testLogDeviceInfo(String name, InputStreamSource stream) { try { File ediDir = new File(mResultDir, DeviceInfo.RESULT_DIR_NAME); @@ -755,8 +753,9 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene @Override public void testLogSaved(String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile) { - // This is safe to be invoked on either the master or a shard ResultReporter - if (mIncludeTestLogTags && mCurrentResult != null + // This is safe to be invoked on either the primary or a shard ResultReporter + if (mIncludeTestLogTags + && mCurrentResult != null && dataName.startsWith(mCurrentResult.getFullName())) { if (dataType == LogDataType.BUGREPORT) { @@ -774,7 +773,7 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene */ @Override public void setLogSaver(ILogSaver saver) { - // This is safe to be invoked on either the master or a shard ResultReporter + // This is safe to be invoked on either the primary or a shard ResultReporter mLogSaver = saver; } @@ -896,7 +895,7 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene /** Aggregate build info from member device info. */ protected Map<String, String> mapBuildInfo() { Map<String, String> buildProperties = new HashMap<>(); - for (IBuildInfo buildInfo : mMasterBuildInfos) { + for (IBuildInfo buildInfo : mMainBuildInfos) { for (Map.Entry<String, String> entry : buildInfo.getBuildAttributes().entrySet()) { String key = entry.getKey(); String value = entry.getValue(); @@ -930,11 +929,11 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene } /** - * Return true if this instance is a shard ResultReporter and should propagate - * certain events to the master. + * Return true if this instance is a shard ResultReporter and should propagate certain events to + * the primary. */ private boolean isShardResultReporter() { - return mMasterResultReporter != null; + return mPrimaryResultReporter != null; } /** @@ -1012,7 +1011,7 @@ public class ResultReporter implements ILogSaverListener, ITestInvocationListene } Set<String> uniqueModules = new HashSet<>(); - for (IBuildInfo buildInfo : mMasterBuildInfos) { + for (IBuildInfo buildInfo : mMainBuildInfos) { CompatibilityBuildHelper helper = new CompatibilityBuildHelper(buildInfo); Map<String, File> dcFiles = helper.getDynamicConfigFiles(); for (String moduleName : dcFiles.keySet()) { 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 94459f7e..6513b471 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 @@ -231,7 +231,7 @@ public class CertificationSuiteResultReporter extends XmlFormattedGeneratorRepor } } - /** Write device-info files to the result, invoked only by the master result reporter */ + /** Write device-info files to the result */ private void testLogDeviceInfo(String name, InputStreamSource stream) { try { File ediDir = new File(mResultDir, DeviceInfo.RESULT_DIR_NAME); @@ -382,20 +382,22 @@ public class CertificationSuiteResultReporter extends XmlFormattedGeneratorRepor getMergedTestRunResults(), getPrimaryBuildInfo().getBuildAttributes().get(BUILD_FINGERPRINT)); - File report = createReport(reportFile); - if (report != null) { - CLog.i("Viewable report: %s", report.getAbsolutePath()); - } + File report = null; File failureReport = null; if (mIncludeHtml) { - // Create the html report before the zip file. + // Create the html reports before the zip file. + report = createReport(reportFile); failureReport = createFailureReport(reportFile); } File zippedResults = zipResults(mResultDir); if (!mIncludeHtml) { - // Create failure report after zip file so extra data is not uploaded + // Create html reports after zip file so extra data is not uploaded + report = createReport(reportFile); failureReport = createFailureReport(reportFile); } + if (report != null) { + CLog.i("Viewable report: %s", report.getAbsolutePath()); + } try { if (failureReport.exists()) { CLog.i("Test Result: %s", failureReport.getCanonicalPath()); 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..6607c85a 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 @@ -16,13 +16,18 @@ package com.android.compatibility.common.tradefed.result.suite; import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper; +import com.android.tradefed.config.Option; import com.android.tradefed.invoker.IInvocationContext; +import com.android.tradefed.invoker.InvocationContext; import com.android.tradefed.log.LogUtil.CLog; import com.android.tradefed.result.proto.FileProtoResultReporter; +import com.android.tradefed.result.proto.ProtoResultParser; import com.android.tradefed.result.proto.TestRecordProto.TestRecord; +import com.android.tradefed.util.FileUtil; import java.io.File; import java.io.FileNotFoundException; +import java.io.IOException; /** Proto reporter that will drop a {@link TestRecord} protobuf in the result directory. */ public class CompatibilityProtoResultReporter extends FileProtoResultReporter { @@ -30,23 +35,57 @@ public class CompatibilityProtoResultReporter extends FileProtoResultReporter { public static final String PROTO_FILE_NAME = "test-record.pb"; public static final String PROTO_DIR = "proto"; + @Option( + name = "skip-proto-compacting", + description = "Option to disable compacting the protos at the end") + private boolean mSkipProtoCompacting = false; + private CompatibilityBuildHelper mBuildHelper; /** The directory containing the proto results */ private File mResultDir = null; + private File mBaseProtoFile = null; + @Override public void processStartInvocation( 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); + mBaseProtoFile = new File(mResultDir, PROTO_FILE_NAME); + setFileOutput(mBaseProtoFile); } super.processStartInvocation(invocationStartRecord, invocationContext); } + @Override + public void processFinalProto(TestRecord invocationEndedProto) { + super.processFinalProto(invocationEndedProto); + + if (!isPeriodicWriting()) { + return; + } + if (mSkipProtoCompacting) { + return; + } + // Compact all the protos + try { + compactAllProtos(); + } catch (RuntimeException e) { + CLog.e("Failed to compact the protos"); + CLog.e(e); + FileUtil.deleteFile(mBaseProtoFile); + return; + } + // Delete all the protos we compacted + int index = 0; + while (new File(mBaseProtoFile.getAbsolutePath() + index).exists()) { + FileUtil.deleteFile(new File(mBaseProtoFile.getAbsolutePath() + index)); + index++; + } + } + private File getProtoResultDirectory() { File protoDir = null; try { @@ -66,4 +105,19 @@ public class CompatibilityProtoResultReporter extends FileProtoResultReporter { CLog.d("Proto Results Directory: %s", protoDir.getAbsolutePath()); return protoDir; } + + private void compactAllProtos() { + FileProtoResultReporter fprr = new FileProtoResultReporter(); + fprr.setFileOutput(mBaseProtoFile); + ProtoResultParser parser = new ProtoResultParser(fprr, new InvocationContext(), true); + int index = 0; + while (new File(mBaseProtoFile.getAbsolutePath() + index).exists()) { + try { + parser.processFileProto(new File(mBaseProtoFile.getAbsolutePath() + index)); + } catch (IOException e) { + throw new RuntimeException(e); + } + index++; + } + } }
\ No newline at end of file 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 9b8862e9..827c3de0 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 @@ -36,7 +36,9 @@ import com.android.tradefed.testtype.AndroidJUnitTest; import java.io.File; import java.io.FileNotFoundException; +import java.util.HashSet; import java.util.Map.Entry; +import java.util.Set; /** Target preparer that instruments an APK. */ @OptionClass(alias = "apk-instrumentation-preparer") @@ -59,6 +61,12 @@ public class ApkInstrumentationPreparer extends PreconditionPreparer @Option(name = "throw-error", description = "Whether to throw error for device test failure") protected boolean mThrowError = true; + @Option( + name = "apk-instrumentation-filter", + description = "The include filters of the test name to run in the apk", + requiredForRerun = true) + private Set<String> mIncludeFilters = new HashSet<>(); + private IConfiguration mConfiguration = null; /** {@inheritDoc} */ @@ -128,6 +136,7 @@ public class ApkInstrumentationPreparer extends PreconditionPreparer instrTest.setDevice(device); instrTest.setInstallFile(apkFile); instrTest.setPackageName(mPackageName); + instrTest.addAllIncludeFilters(mIncludeFilters); instrTest.setRerunMode(false); instrTest.setReRunUsingTestFile(false); // TODO: Make this configurable. diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/CrashReporter.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/CrashReporter.java index fc2406c6..7955092c 100644 --- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/CrashReporter.java +++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/CrashReporter.java @@ -46,6 +46,9 @@ public class CrashReporter extends BaseTargetPreparer { /** Uploads the current buffer of Crashes to the phone under the current test name. */ private static void upload(ITestDevice device, String testname, JSONArray crashes) { + if (crashes == null) { + crashes = new JSONArray(); + } try { if (testname == null) { CLog.logAndDisplay(LogLevel.ERROR, "Attempted upload with no test name"); @@ -78,6 +81,13 @@ public class CrashReporter extends BaseTargetPreparer { public void setUp(TestInformation testInfo) { ITestDevice device = testInfo.getDevice(); try { + device.executeShellCommand("logcat -c"); + } catch (DeviceNotAvailableException e) { + CLog.logAndDisplay(LogLevel.ERROR, "CrashReporterThread failed to clear logcat"); + CLog.logAndDisplay(LogLevel.ERROR, e.getMessage()); + } + + try { device.executeShellCommand("rm -rf " + CrashUtils.DEVICE_PATH); device.executeShellCommand("mkdir " + CrashUtils.DEVICE_PATH); } catch (DeviceNotAvailableException e) { @@ -87,14 +97,23 @@ public class CrashReporter extends BaseTargetPreparer { CLog.logAndDisplay(LogLevel.ERROR, e.getMessage()); return; } + + CrashReporterReceiver receiver = new CrashReporterReceiver(device); mBackgroundThread = new BackgroundDeviceAction( - "logcat", - "CrashReporter logcat thread", - device, - new CrashReporterReceiver(device), - 0); + "logcat", "CrashReporter logcat thread", device, receiver, 0); mBackgroundThread.start(); + + try { + // If the test starts before the reporter receiver can read the test start message then + // the crash could only be read halfway. We wait until the receiver starts getting + // messages. + synchronized (receiver) { + receiver.wait(10_000); // wait for 10 seconds max + } + } catch (InterruptedException e) { + // continue as normal + } } /** {@inheritDoc} */ @@ -130,6 +149,11 @@ public class CrashReporter extends BaseTargetPreparer { mCrashes = new JSONArray(); mLogcatChunk.setLength(0); } else if (CrashUtils.sEndofCrashPattern.matcher(line).find()) { + if (mCrashes == null) { + // In case the crash happens before any test is started, it's not related to the + // current test and shouldn't be reported. + return; + } CrashUtils.addAllCrashes(mLogcatChunk.toString(), mCrashes); mLogcatChunk.setLength(0); } else if (CrashUtils.sUploadRequestPattern.matcher(line).find()) { @@ -138,7 +162,8 @@ public class CrashReporter extends BaseTargetPreparer { } @Override - public void processNewLines(String[] lines) { + public synchronized void processNewLines(String[] lines) { + this.notifyAll(); // alert the main thread that we are active. if (!isCancelled()) { for (String line : lines) { processLogLine(line); diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DeviceInfoCollector.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DeviceInfoCollector.java index 735d1878..94030153 100644 --- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DeviceInfoCollector.java +++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DeviceInfoCollector.java @@ -75,6 +75,14 @@ public class DeviceInfoCollector extends ApkInstrumentationPreparer implements I description = "Whether device info collection should be skipped") private boolean mSkipDeviceInfo = false; + @Option( + name = "force-collect-device-info", + description = + "Force device info collection. If set to true, " + + SKIP_DEVICE_INFO_OPTION + + " is ignored.") + private boolean mForceCollectDeviceInfo = false; + @Option(name= "src-dir", description = "The directory to copy to the results dir") private String mSrcDir; @@ -133,7 +141,7 @@ public class DeviceInfoCollector extends ApkInstrumentationPreparer implements I String property = nullToEmpty(device.getProperty(entry.getValue())); buildInfo.addBuildAttribute(entry.getKey(), property); } - if (mSkipDeviceInfo) { + if (mSkipDeviceInfo && !mForceCollectDeviceInfo) { return; } run(testInfo); @@ -152,6 +160,9 @@ public class DeviceInfoCollector extends ApkInstrumentationPreparer implements I mLogger.testLog(deviceInfoFile.getName(), LogDataType.TEXT, source); } } + // Some host tests depends on this code. E.g. SELinuxHostTestCases reads device + // info files by querying DEVICE_INFO_DIR against buildInfo. Change this with + // caution. buildInfo.setFile( DEVICE_INFO_DIR, deviceInfoDir, diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/SettingsPreparer.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/SettingsPreparer.java index 186a142b..5e90b394 100644 --- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/SettingsPreparer.java +++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/SettingsPreparer.java @@ -21,6 +21,7 @@ import com.android.tradefed.device.DeviceNotAvailableException; import com.android.tradefed.device.ITestDevice; import com.android.tradefed.invoker.TestInformation; import com.android.tradefed.log.LogUtil.CLog; +import com.android.tradefed.result.error.DeviceErrorIdentifier; import com.android.tradefed.targetprep.BuildError; import com.android.tradefed.targetprep.TargetSetupError; @@ -91,10 +92,12 @@ public class SettingsPreparer extends PreconditionPreparer { if (mSetValue != null && !mExpectedSettingValues.isEmpty()) { // first ensure that the set-value given can be found in expected-values if (!mExpectedSettingValues.contains(mSetValue)) { - throw new TargetSetupError(String.format( - "set-value for %s is %s, but value not found in expected-values: %s", - mSettingName, mSetValue, mExpectedSettingValues.toString()), - device.getDeviceDescriptor()); + throw new TargetSetupError( + String.format( + "set-value for %s is %s, but value not found in expected-values: %s", + mSettingName, mSetValue, mExpectedSettingValues.toString()), + device.getDeviceDescriptor(), + DeviceErrorIdentifier.DEVICE_UNEXPECTED_RESPONSE); } String currentSettingValue = device.executeShellCommand(shellCmdGet).trim(); // only change unexpected setting value @@ -121,7 +124,10 @@ public class SettingsPreparer extends PreconditionPreparer { "Device setting \"%s\" returned \"%s\", not found in %s", mSettingName, currentSettingValue, mExpectedSettingValues.toString()); } - throw new TargetSetupError(mFailureMessage, device.getDeviceDescriptor()); + throw new TargetSetupError( + mFailureMessage, + device.getDeviceDescriptor(), + DeviceErrorIdentifier.DEVICE_UNEXPECTED_RESPONSE); } } diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/BusinessLogicHostTestBase.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/BusinessLogicHostTestBase.java index 33fe8353..2c5ec053 100644 --- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/BusinessLogicHostTestBase.java +++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/BusinessLogicHostTestBase.java @@ -64,8 +64,9 @@ public class BusinessLogicHostTestBase extends BaseHostJUnit4Test { String testName = String.format("%s#%s", this.getClass().getName(), methodName); if (mBusinessLogic.hasLogicFor(testName)) { CLog.i("Applying business logic for test case: ", testName); - BusinessLogicExecutor executor = new BusinessLogicHostExecutor(getDevice(), - getBuild(), this); + BusinessLogicExecutor executor = + new BusinessLogicHostExecutor( + getDevice(), getBuild(), this, mBusinessLogic.getRedactionRegexes()); mBusinessLogic.applyLogicFor(testName, executor); } } diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/CompatibilityTest.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/CompatibilityTest.java index 951b1dcb..72d2f4f6 100644 --- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/CompatibilityTest.java +++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/CompatibilityTest.java @@ -242,12 +242,14 @@ public class CompatibilityTest implements IDeviceTest, IShardableTest, IBuildRec description = "Don't verify device connectivity between module execution.") private boolean mSkipConnectivityCheck = false; - @Option(name = "preparer-whitelist", - description = "Only run specific preparers." - + "Specify zero or more ITargetPreparers as canonical class names. " - + "e.g. \"com.android.compatibility.common.tradefed.targetprep.ApkInstaller\" " - + "If not specified, all configured preparers are run.") - private Set<String> mPreparerWhitelist = new HashSet<>(); + @Option( + name = "preparer-whitelist", + description = + "Only run specific preparers." + + "Specify zero or more ITargetPreparers as canonical class names. " + + "e.g. \"com.android.compatibility.common.tradefed.targetprep.ApkInstaller\" " + + "If not specified, all configured preparers are run.") + private Set<String> mPreparerAllowlist = new HashSet<>(); @Option(name = "skip-all-system-status-check", description = "Whether all system status check between modules should be skipped") @@ -416,7 +418,7 @@ public class CompatibilityTest implements IDeviceTest, IShardableTest, IBuildRec IModuleDef module = modules.get(i); module.setBuild(mBuildHelper.getBuildInfo()); module.setDevice(mDevice); - module.setPreparerWhitelist(mPreparerWhitelist); + module.setPreparerAllowlist(mPreparerAllowlist); // don't set a value if unspecified if (mCollectTestsOnly != null) { module.setCollectTestsOnly(mCollectTestsOnly); diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/IModuleDef.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/IModuleDef.java index 5b49ed6b..1424e123 100644 --- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/IModuleDef.java +++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/IModuleDef.java @@ -78,12 +78,12 @@ public interface IModuleDef IRemoteTest getTest(); /** - * Set a list of preparers to allow to run before or after a test. - * If this list is empty, then all configured preparers will run. + * Set a list of preparers to allow to run before or after a test. If this list is empty, then + * all configured preparers will run. * - * @param preparerWhitelist list containing the simple name of the preparer to run. + * @param preparerAllowlist list containing the simple name of the preparer to run. */ - void setPreparerWhitelist(Set<String> preparerWhitelist); + void setPreparerAllowlist(Set<String> preparerAllowlist); /** * Pushes dynamic configuration, then runs the module's precondition checks and setup tasks. diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/ModuleDef.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/ModuleDef.java index afb59c82..9e4fde79 100644 --- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/ModuleDef.java +++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/ModuleDef.java @@ -73,7 +73,7 @@ public class ModuleDef implements IModuleDef { private List<ITargetCleaner> mCleaners = new ArrayList<>(); private IBuildInfo mBuild; private ITestDevice mDevice; - private Set<String> mPreparerWhitelist = new HashSet<>(); + private Set<String> mPreparerAllowlist = new HashSet<>(); private ConfigurationDescriptor mConfigurationDescriptor; private IInvocationContext mContext; @@ -167,11 +167,9 @@ public class ModuleDef implements IModuleDef { return mName; } - /** - * @return the mPreparerWhitelist - */ - protected Set<String> getPreparerWhitelist() { - return mPreparerWhitelist; + /** @return the getPreparerAllowlist */ + protected Set<String> getPreparerAllowlist() { + return mPreparerAllowlist; } /** @@ -209,12 +207,10 @@ public class ModuleDef implements IModuleDef { return mTest; } - /** - * {@inheritDoc} - */ + /** {@inheritDoc} */ @Override - public void setPreparerWhitelist(Set<String> preparerWhitelist) { - mPreparerWhitelist.addAll(preparerWhitelist); + public void setPreparerAllowlist(Set<String> preparerAlowlist) { + mPreparerAllowlist.addAll(preparerAlowlist); } /** @@ -342,9 +338,10 @@ public class ModuleDef implements IModuleDef { private void runPreparerSetup(ITargetPreparer preparer) throws DeviceNotAvailableException { String preparerName = preparer.getClass().getCanonicalName(); - if (!mPreparerWhitelist.isEmpty() && !mPreparerWhitelist.contains(preparerName)) { - CLog.d("Skipping Preparer: %s since it is not in the whitelist %s", - preparerName, mPreparerWhitelist); + if (!mPreparerAllowlist.isEmpty() && !mPreparerAllowlist.contains(preparerName)) { + CLog.d( + "Skipping Preparer: %s since it is not in the allowList %s", + preparerName, mPreparerAllowlist); return; } CLog.d("Preparer: %s", preparer.getClass().getSimpleName()); diff --git a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/config/ConfigurationFactoryTest.java b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/config/ConfigurationFactoryTest.java index 3a593874..92e2898a 100644 --- a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/config/ConfigurationFactoryTest.java +++ b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/config/ConfigurationFactoryTest.java @@ -34,17 +34,13 @@ public class ConfigurationFactoryTest extends TestCase { mConfigFactory = (ConfigurationFactory) ConfigurationFactory.getInstance(); } - /** - * Sanity test to ensure all config names on classpath are loadable. - */ + /** Initial test to ensure all config names on classpath are loadable. */ public void testLoadAllConfigs() throws ConfigurationException { // we dry-run the templates otherwise it will always fail. mConfigFactory.loadAllConfigs(false); } - /** - * Sanity test to ensure all configs on classpath can be fully loaded and parsed. - */ + /** Initial test to ensure all configs on classpath can be fully loaded and parsed. */ public void testLoadAndPrintAllConfigs() throws ConfigurationException { // Printing the help involves more checks since it tries to resolve the config objects. mConfigFactory.loadAndPrintAllConfigs(); 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 0c7ac5a1..14ee77bb 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 @@ -167,34 +167,34 @@ public class CtsConfigLoadingTest { } /** - * Whitelist to start enforcing metadata on modules. No additional entry will be allowed! This + * AllowList to start enforcing metadata on modules. No additional entry will be allowed! This * is meant to burn down the remaining modules definition. */ - private static final Set<String> WHITELIST_MODULE_PARAMETERS = new HashSet<>(); + private static final Set<String> ALLOWLIST_MODULE_PARAMETERS = new HashSet<>(); static { - WHITELIST_MODULE_PARAMETERS.add("CtsAccessibilityServiceTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsActivityManagerBackgroundActivityTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsAppOpsTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsCarrierApiTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsContentCaptureServiceTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsDeqpTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsHiddenApiKillswitchDebugClassTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsHiddenApiKillswitchWhitelistTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsHiddenApiKillswitchWildcardTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsLocationTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsLocation2TestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsMediaTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsMediaV2TestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsOpenGlPerfTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsOsTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsPermission2TestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsPermissionTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsProviderUiTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsRsBlasTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsSkQPTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsWrapNoWrapTestCases.config"); - WHITELIST_MODULE_PARAMETERS.add("CtsWrapWrapDebugMallocDebugTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsAccessibilityServiceTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsActivityManagerBackgroundActivityTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsAppOpsTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsCarrierApiTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsContentCaptureServiceTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsDeqpTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsHiddenApiKillswitchDebugClassTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsHiddenApiKillswitchWhitelistTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsHiddenApiKillswitchWildcardTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsLocationTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsLocation2TestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsMediaTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsMediaV2TestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsOpenGlPerfTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsOsTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsPermission2TestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsPermissionTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsProviderUiTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsRsBlasTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsSkQPTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsWrapNoWrapTestCases.config"); + ALLOWLIST_MODULE_PARAMETERS.add("CtsWrapWrapDebugMallocDebugTestCases.config"); } /** @@ -351,8 +351,8 @@ public class CtsConfigLoadingTest { c.validateOptions(); } - // Exempt the whitelist - missingMandatoryParameters.removeAll(WHITELIST_MODULE_PARAMETERS); + // Exempt the allow list + missingMandatoryParameters.removeAll(ALLOWLIST_MODULE_PARAMETERS); // Ensure the mandatory fields are filled if (!missingMandatoryParameters.isEmpty()) { String msg = diff --git a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/presubmit/ValidateTestsAbi.java b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/presubmit/ValidateTestsAbi.java index 6d19417c..90fd94ec 100644 --- a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/presubmit/ValidateTestsAbi.java +++ b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/presubmit/ValidateTestsAbi.java @@ -58,14 +58,27 @@ public class ValidateTestsAbi { MODULE_EXCEPTIONS.add("CtsCorruptApkTests"); /** - * This module tests for installations of packages that have only 32-bit native libraries. + * This module tests for installations of packages that have only 32-bit native libraries + * and extract native libraries. */ MODULE_EXCEPTIONS.add("CtsExtractNativeLibsAppTrue32"); /** - * This module tests for installations of packages that have only 64-bit native libraries. + * This module tests for installations of packages that have only 64-bit native libraries + * and extract native libraries. */ MODULE_EXCEPTIONS.add("CtsExtractNativeLibsAppTrue64"); + /** + * This module tests for installations of packages that have only 32-bit native libraries + * and embed native libraries. + */ + MODULE_EXCEPTIONS.add("CtsExtractNativeLibsAppFalse32"); + + /** + * This module tests for installations of packages that have only 64-bit native libraries + * and embed native libraries. + */ + MODULE_EXCEPTIONS.add("CtsExtractNativeLibsAppFalse64"); } private static final Set<String> BINARY_EXCEPTIONS = new HashSet<>(); diff --git a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporterTest.java b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporterTest.java index 192f5a73..6687c5f4 100644 --- a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporterTest.java +++ b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/suite/CertificationSuiteResultReporterTest.java @@ -169,6 +169,8 @@ public class CertificationSuiteResultReporterTest { assertTrue(content.contains("suite_name=\"VTS\"")); assertTrue(content.contains("suite_variant=\"CTS_ON_GSI\"")); assertTrue(content.contains("suite_version=\"version\"")); + // Ensure html is created + assertTrue(new File(mBuildHelper.getResultDir(), "test_result.html").exists()); } /** diff --git a/common/host-side/util/src/com/android/compatibility/common/util/BusinessLogicHostExecutor.java b/common/host-side/util/src/com/android/compatibility/common/util/BusinessLogicHostExecutor.java index 9949f077..94b30400 100644 --- a/common/host-side/util/src/com/android/compatibility/common/util/BusinessLogicHostExecutor.java +++ b/common/host-side/util/src/com/android/compatibility/common/util/BusinessLogicHostExecutor.java @@ -35,10 +35,12 @@ public class BusinessLogicHostExecutor extends BusinessLogicExecutor { private IBuildInfo mBuild; private Object mTestObj; - public BusinessLogicHostExecutor(ITestDevice device, IBuildInfo build, Object testObj) { + public BusinessLogicHostExecutor( + ITestDevice device, IBuildInfo build, Object testObj, List<String> redactionRegexes) { mDevice = device; mBuild = build; mTestObj = testObj; + mRedactionRegexes = redactionRegexes; } /** diff --git a/common/host-side/util/tests/src/com/android/compatibility/common/util/BusinessLogicHostExecutorTest.java b/common/host-side/util/tests/src/com/android/compatibility/common/util/BusinessLogicHostExecutorTest.java index 055d8586..d67589fe 100644 --- a/common/host-side/util/tests/src/com/android/compatibility/common/util/BusinessLogicHostExecutorTest.java +++ b/common/host-side/util/tests/src/com/android/compatibility/common/util/BusinessLogicHostExecutorTest.java @@ -73,7 +73,9 @@ public class BusinessLogicHostExecutorTest { public void setUp() { mMockBuild = EasyMock.createMock(IBuildInfo.class); mMockDevice = EasyMock.createMock(ITestDevice.class); - mExecutor = new BusinessLogicHostExecutor(mMockDevice, mMockBuild, this); + mExecutor = + new BusinessLogicHostExecutor( + mMockDevice, mMockBuild, this, new ArrayList<String>()); // reset the instance variables tracking the method invoked and the args used mInvoked = null; mArgsUsed = null; diff --git a/common/util/src/com/android/compatibility/common/util/BusinessLogic.java b/common/util/src/com/android/compatibility/common/util/BusinessLogic.java index ec1a6ced..f20f43ea 100644 --- a/common/util/src/com/android/compatibility/common/util/BusinessLogic.java +++ b/common/util/src/com/android/compatibility/common/util/BusinessLogic.java @@ -18,6 +18,7 @@ package com.android.compatibility.common.util; import java.io.PrintWriter; import java.io.StringWriter; +import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.HashMap; @@ -45,6 +46,9 @@ public class BusinessLogic { // A Date denoting the time of request from the business logic service protected Date mTimestamp; + // A list of regexes triggering log redaction + protected List<String> mRedactionRegexes = new ArrayList<>(); + /** * Determines whether business logic exists for a given test name * @param testName the name of the test case, prefixed by fully qualified class name, then '#'. @@ -178,6 +182,10 @@ public class BusinessLogic { return mTimestamp; } + public List<String> getRedactionRegexes() { + return new ArrayList<String>(mRedactionRegexes); + } + /** * Builds a user readable string tha explains the authentication status and the effect on tests * which require authentication to execute. 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 34f98d79..857ea157 100644 --- a/common/util/src/com/android/compatibility/common/util/BusinessLogicExecutor.java +++ b/common/util/src/com/android/compatibility/common/util/BusinessLogicExecutor.java @@ -21,6 +21,8 @@ import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import org.junit.AssumptionViolatedException; @@ -35,9 +37,9 @@ public abstract class BusinessLogicExecutor { protected static final String STRING_CLASS = "java.lang.String"; protected static final String STRING_ARRAY_CLASS = "[Ljava.lang.String;"; - /* List of substrings indicating a method arg should be redacted in the logs */ - private static final String[] REDACTED_VALUES = new String[] {"permission"}; private static final String REDACTED_PLACEHOLDER = "[redacted]"; + /* List of regexes indicating a method arg should be redacted in the logs */ + protected List<String> mRedactionRegexes = new ArrayList<>(); /** * Execute a business logic condition. @@ -97,7 +99,7 @@ public abstract class BusinessLogicExecutor { protected abstract String formatExecutionString(String method, String... args); /** Substitute sensitive information with REDACTED_PLACEHOLDER if necessary. */ - protected static String[] formatArgs(String[] args) { + protected String[] formatArgs(String[] args) { List<String> formattedArgs = new ArrayList<>(); for (String arg : args) { formattedArgs.add(formatArg(arg)); @@ -105,9 +107,11 @@ public abstract class BusinessLogicExecutor { return formattedArgs.toArray(new String[0]); } - private static String formatArg(String arg) { - for (String str : REDACTED_VALUES) { - if (arg.contains(str)) { + private String formatArg(String arg) { + for (String regex : mRedactionRegexes) { + Pattern pattern = Pattern.compile(regex); + Matcher matcher = pattern.matcher(arg); + if (matcher.find()) { return REDACTED_PLACEHOLDER; } } diff --git a/common/util/src/com/android/compatibility/common/util/BusinessLogicFactory.java b/common/util/src/com/android/compatibility/common/util/BusinessLogicFactory.java index a89ae179..b0724133 100644 --- a/common/util/src/com/android/compatibility/common/util/BusinessLogicFactory.java +++ b/common/util/src/com/android/compatibility/common/util/BusinessLogicFactory.java @@ -69,6 +69,8 @@ public class BusinessLogicFactory { private static final String TIMESTAMP = "timestamp"; // Date and time pattern for raw timestamp string private static final String TIMESTAMP_PATTERN = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; + // Name of the redacted regexes field + private static final String REDACTION_REGEXES = "redactionRegexes"; /** * Create a BusinessLogic instance from a {@link FileInputStream} of business logic data, @@ -116,6 +118,9 @@ public class BusinessLogicFactory { if (root.has(TIMESTAMP)) { bl.mTimestamp = parseTimestamp(root.getString(TIMESTAMP)); } + if (root.has(REDACTION_REGEXES)) { + bl.mRedactionRegexes = parseRedactionRegexes(root.getJSONArray(REDACTION_REGEXES)); + } try { jsonRulesLists = root.getJSONArray(BUSINESS_LOGIC_RULES_LISTS); } catch (JSONException e) { @@ -140,6 +145,15 @@ public class BusinessLogicFactory { return bl; } + private static List<String> parseRedactionRegexes(JSONArray redactionRegexesJSONArray) + throws JSONException { + List<String> redactionRegexes = new ArrayList<>(); + for (int i = 0; i < redactionRegexesJSONArray.length(); i++) { + redactionRegexes.add(redactionRegexesJSONArray.getString(i)); + } + return redactionRegexes; + } + /* Extract a BusinessLogicRulesList from the representative JSON object */ private static BusinessLogicRulesList extractRulesList(JSONObject rulesListJSONObject) throws JSONException { diff --git a/common/util/src/com/android/compatibility/common/util/GmsTest.java b/common/util/src/com/android/compatibility/common/util/GmsTest.java new file mode 100644 index 00000000..00320000 --- /dev/null +++ b/common/util/src/com/android/compatibility/common/util/GmsTest.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2020 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 java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** Marks the type of test with purpose of asserting GMS requirements. */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD, ElementType.TYPE}) +public @interface GmsTest { + String requirement(); +} diff --git a/common/util/src/com/android/compatibility/common/util/TestResultHistory.java b/common/util/src/com/android/compatibility/common/util/TestResultHistory.java index 15a93194..73096cb0 100644 --- a/common/util/src/com/android/compatibility/common/util/TestResultHistory.java +++ b/common/util/src/com/android/compatibility/common/util/TestResultHistory.java @@ -104,7 +104,7 @@ public class TestResultHistory implements Serializable { serializer.startTag(null, RUN_HISTORY_TAG); // Only show sub-test names in test attribute in run history node. - String name = resultHistory.getTestName().replaceFirst(testName + ":", ""); + String name = getSubTestName(testName, resultHistory.getTestName()); if (!name.isEmpty() && !name.equalsIgnoreCase(testName)) { serializer.attribute(null, SUB_TEST_ATTR, name); } @@ -120,6 +120,20 @@ public class TestResultHistory implements Serializable { serializer.endTag(null, RUN_HISTORY_TAG); } + /** + * Get subtest name by replacing top-level test name. + * + * @param testName top-level test name. + * @param fullTestName test name with the combination of top-level and subtest name. + * @return subtest name without top-level test name + */ + protected static String getSubTestName(String testName, String fullTestName) { + // Handle test name with brackets, like [folded] as the suffix for foldable test plan. + testName = testName.replace("[", "\\[").replace("]", "\\]"); + String subTestName = fullTestName.replaceFirst(testName + ":", ""); + return subTestName; + } + /** Execution Record about start time, end time and isAutomated */ public static class ExecutionRecord implements Serializable { diff --git a/common/util/src/com/android/compatibility/common/util/VersionCodes.java b/common/util/src/com/android/compatibility/common/util/VersionCodes.java index ddc82498..224b6c85 100644 --- a/common/util/src/com/android/compatibility/common/util/VersionCodes.java +++ b/common/util/src/com/android/compatibility/common/util/VersionCodes.java @@ -47,5 +47,6 @@ public class VersionCodes { public static final int O_MR1 = 27; public static final int P = 28; public static final int Q = 29; - public static final int R = CUR_DEVELOPMENT; + public static final int R = 30; + public static final int S = CUR_DEVELOPMENT; } diff --git a/common/util/tests/src/com/android/compatibility/common/util/ResultHandlerTest.java b/common/util/tests/src/com/android/compatibility/common/util/ResultHandlerTest.java index 9155b93c..581e2018 100644 --- a/common/util/tests/src/com/android/compatibility/common/util/ResultHandlerTest.java +++ b/common/util/tests/src/com/android/compatibility/common/util/ResultHandlerTest.java @@ -92,6 +92,9 @@ public class ResultHandlerTest extends TestCase { private static final String METHOD_3 = "testBlah3"; private static final String METHOD_4 = "testBlah4"; private static final String METHOD_5 = "testBlah5"; + private static final String METHOD_6_BRACKETS = "testBlah6[suffix]"; + private static final String SUB_METHOD_3 = "subTestBlah3"; + private static final String SUB_METHOD_6_BRACKETS = "subTestBlah6[suffix]"; private static final String SUMMARY_SOURCE = String.format("%s#%s:20", CLASS_B, METHOD_4); private static final String SUMMARY_MESSAGE = "Headline"; private static final double SUMMARY_VALUE = 9001; @@ -316,7 +319,8 @@ public class ResultHandlerTest extends TestCase { moduleBTest3.setLog(LOGCAT); moduleBTest3.setScreenshot(SCREENSHOT); List<TestResultHistory> resultHistories = new ArrayList<TestResultHistory>(); - TestResultHistory resultHistory = new TestResultHistory(METHOD_3, executionRecords); + TestResultHistory resultHistory = + new TestResultHistory(METHOD_3 + ":" + SUB_METHOD_3, executionRecords); resultHistories.add(resultHistory); moduleBTest3.setTestResultHistories(resultHistories); ITestResult moduleBTest4 = moduleBCase.getOrCreateResult(METHOD_4); @@ -333,6 +337,15 @@ public class ResultHandlerTest extends TestCase { moduleBTest4.setReportLog(report); ITestResult moduleBTest5 = moduleBCase.getOrCreateResult(METHOD_5); moduleBTest5.skipped(); + // For test name with bracket as suffix in CTS Verifier. + ITestResult moduleBTest6 = moduleBCase.getOrCreateResult(METHOD_6_BRACKETS); + moduleBTest6.setResultStatus(TestStatus.FAIL); + List<TestResultHistory> resultHistories2 = new ArrayList<TestResultHistory>(); + TestResultHistory resultHistory2 = + new TestResultHistory( + METHOD_6_BRACKETS + ":" + SUB_METHOD_6_BRACKETS, executionRecords); + resultHistories2.add(resultHistory2); + moduleBTest6.setTestResultHistories(resultHistories2); // Serialize to file File res = @@ -514,7 +527,13 @@ public class ResultHandlerTest extends TestCase { IInvocationResult result, String expectedBuildFingerprint, boolean newTestFormat, boolean checkResultHistories) throws Exception { assertEquals("Expected 3 passes", 3, result.countResults(TestStatus.PASS)); - assertEquals("Expected 1 failure", 1, result.countResults(TestStatus.FAIL)); + if (checkResultHistories) { + assertEquals("Expected 1 failure", 1, result.countResults(TestStatus.FAIL)); + } else { + // CTS Verifier needs to check the condition of the test name with bracket, + // so adds one more test with failure result. + assertEquals("Expected 2 failure", 2, result.countResults(TestStatus.FAIL)); + } Map<String, String> buildInfo = result.getInvocationInfo(); assertEquals("Incorrect Build Fingerprint", expectedBuildFingerprint, result.getBuildFingerprint()); @@ -558,7 +577,13 @@ public class ResultHandlerTest extends TestCase { IModuleResult moduleB = modules.get(1); assertEquals("Expected 2 passes", 2, moduleB.countResults(TestStatus.PASS)); - assertEquals("Expected 1 failure", 1, moduleB.countResults(TestStatus.FAIL)); + if (checkResultHistories) { + assertEquals("Expected 1 failure", 1, moduleB.countResults(TestStatus.FAIL)); + } else { + // CTS Verifier needs to check the condition of the test name with bracket, + // so adds one more test with failure result. + assertEquals("Expected 2 failure", 2, moduleB.countResults(TestStatus.FAIL)); + } assertEquals("Incorrect ABI", ABI, moduleB.getAbi()); assertEquals("Incorrect name", NAME_B, moduleB.getName()); assertEquals("Incorrect ID", ID_B, moduleB.getId()); @@ -568,7 +593,13 @@ public class ResultHandlerTest extends TestCase { ICaseResult moduleBCase = moduleBCases.get(0); assertEquals("Incorrect name", CLASS_B, moduleBCase.getName()); List<ITestResult> moduleBResults = moduleBCase.getResults(); - assertEquals("Expected 3 results", 3, moduleBResults.size()); + if (checkResultHistories) { + assertEquals("Expected 3 results", 3, moduleBResults.size()); + } else { + // CTS Verifier needs to check the condition of the test name with bracket, + // so adds one more test with failure result. + assertEquals("Expected 4 results", 4, moduleBResults.size()); + } ITestResult moduleBTest3 = moduleBResults.get(0); assertEquals("Incorrect name", METHOD_3, moduleBTest3.getName()); assertEquals("Incorrect result", TestStatus.FAIL, moduleBTest3.getResultStatus()); @@ -589,7 +620,10 @@ public class ResultHandlerTest extends TestCase { assertEquals("Expected 1 test result history", 1, resultHistories.size()); for (TestResultHistory resultHistory : resultHistories) { assertNotNull("Expected test result history", resultHistory); - assertEquals("Incorrect test name", METHOD_3, resultHistory.getTestName()); + assertEquals( + "Incorrect test name", + SUB_METHOD_3, + resultHistory.getSubTestName(METHOD_3, resultHistory.getTestName())); for (TestResultHistory.ExecutionRecord execRecord : resultHistory.getExecutionRecords()) { assertEquals( @@ -633,6 +667,34 @@ public class ResultHandlerTest extends TestCase { assertNull("Unexpected message", moduleBTest5.getMessage()); assertNull("Unexpected stack trace", moduleBTest5.getStackTrace()); assertNull("Unexpected report", moduleBTest5.getReportLog()); + if (!checkResultHistories) { + // CTS Verifier needs to check the condition of the test name with bracket, + // so adds one more test with failure result. + ITestResult moduleBTest6 = moduleBResults.get(3); + assertEquals("Incorrect name", METHOD_6_BRACKETS, moduleBTest6.getName()); + assertEquals("Incorrect result", TestStatus.FAIL, moduleBTest6.getResultStatus()); + List<TestResultHistory> resultHistories2 = moduleBTest6.getTestResultHistories(); + assertNotNull("Expected test result history list", resultHistories2); + assertEquals("Expected 1 test result history", 1, resultHistories2.size()); + for (TestResultHistory resultHistory : resultHistories2) { + assertNotNull("Expected test result history", resultHistory); + assertEquals( + "Incorrect test name", + SUB_METHOD_6_BRACKETS, + resultHistory.getSubTestName( + METHOD_6_BRACKETS, resultHistory.getTestName())); + for (TestResultHistory.ExecutionRecord execRecord : + resultHistory.getExecutionRecords()) { + assertEquals( + "Incorrect test start time", TEST_START_MS, execRecord.getStartTime()); + assertEquals("Incorrect test end time", TEST_END_MS, execRecord.getEndTime()); + assertEquals( + "Incorrect test is automated", + TEST_IS_AUTOMATED, + execRecord.getIsAutomated()); + } + } + } } /** Return all XML nodes that match the given xPathExpression. */ diff --git a/tools/cts-tradefed/Android.bp b/tools/cts-tradefed/Android.bp index b11f1647..93c20625 100644 --- a/tools/cts-tradefed/Android.bp +++ b/tools/cts-tradefed/Android.bp @@ -30,7 +30,7 @@ tradefed_binary_host { wrapper: "etc/cts-tradefed", short_name: "CTS", full_name: "Compatibility Test Suite", - version: "10_r1", + version: "11_r2", static_libs: ["cts-tradefed-harness"], required: ["compatibility-host-util"], } diff --git a/tools/cts-tradefed/etc/cts-tradefed b/tools/cts-tradefed/etc/cts-tradefed index 23227a91..ed62d056 100755 --- a/tools/cts-tradefed/etc/cts-tradefed +++ b/tools/cts-tradefed/etc/cts-tradefed @@ -55,12 +55,20 @@ if [ -n "${TF_DEBUG}" ]; then RDBG_FLAG=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=${TF_DEBUG_PORT} fi +JAVA_BINARY=${CTS_ROOT}/android-cts/jdk/bin/java + +if [ ! -f "${JAVA_BINARY}" ]; then + JAVA_BINARY=java +fi + # get OS HOST=`uname` if [ "$HOST" == "Linux" ]; then OS="linux-x86" elif [ "$HOST" == "Darwin" ]; then OS="darwin-x86" + # Bundled java is for linux so use host JDK on Darwin + JAVA_BINARY=java else echo "Unrecognized OS" exit @@ -130,5 +138,5 @@ for j in ${CTS_ROOT}/android-cts/testcases/*.jar; do JAR_PATH=${JAR_PATH}:$j done -java $RDBG_FLAG -Xmx6g -XX:+HeapDumpOnOutOfMemoryError -cp ${JAR_PATH} -DCTS_ROOT=${CTS_ROOT} com.android.compatibility.common.tradefed.command.CompatibilityConsole "$@" +${JAVA_BINARY} $RDBG_FLAG -Xmx6g -XX:+HeapDumpOnOutOfMemoryError -cp ${JAR_PATH} -DCTS_ROOT=${CTS_ROOT} com.android.compatibility.common.tradefed.command.CompatibilityConsole "$@" diff --git a/tools/cts-tradefed/res/config/csi-known-failures.xml b/tools/cts-tradefed/res/config/csi-known-failures.xml index 3d896b24..bbb98b72 100644 --- a/tools/cts-tradefed/res/config/csi-known-failures.xml +++ b/tools/cts-tradefed/res/config/csi-known-failures.xml @@ -14,26 +14,45 @@ limitations under the License. --> <configuration description="Known fialures on CSI"> - <!-- Exclude the known failure of CtsAppCases affect other tests in NotificationManagerTest --> + <!-- Troublesome tests that often crash the system --> + <option name="compatibility:exclude-filter" value="CtsAppExitTestCases android.app.cts.ActivityManagerAppExitInfoTest#testCrash" /> + <option name="compatibility:exclude-filter" value="CtsAppExitTestCases android.app.cts.ActivityManagerAppExitInfoTest#testNativeCrash" /> + <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.ExternalStorageHostTest#testMediaEscalation28" /> + <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.ExternalStorageHostTest#testMediaEscalation29" /> + <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.ExternalStorageHostTest#testMediaEscalation" /> + <option name="compatibility:exclude-filter" value="CtsAppTestCases android.app.cts.ActivityManagerFgsBgStartTest#testFgsLocationPendingIntent" /> <option name="compatibility:exclude-filter" value="CtsAppTestCases android.app.cts.NotificationManagerTest#testNotificationManagerBubble_checkActivityFlagsDocumentLaunchMode" /> + <option name="compatibility:exclude-filter" value="CtsDeviceIdleHostTestCases com.android.cts.deviceidle.DeviceIdleWhitelistTest#testRemovesPersistedAcrossReboots" /> + <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.DeviceOwnerTest#testProxyPacProxyTest" /> + <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.MixedDeviceOwnerTest#testPackageInstallUserRestrictions" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#requestEmptyRoleThenDeniedAutomatically" /> + <option name="compatibility:exclude-filter" value="CtsStatsdHostTestCases android.cts.statsd.metric.MetricActivationTests#testRestart" /> + <option name="compatibility:exclude-filter" value="CtsStatsdHostTestCases android.cts.statsd.metric.MetricActivationTests#testMultipleActivations" /> + <option name="compatibility:exclude-filter" value="CtsStatsdHostTestCases android.cts.statsd.atom.UidAtomTests#testANROccurred" /> + <option name="compatibility:exclude-filter" value="CtsStatsdHostTestCases android.cts.statsd.atom.UidAtomTests#testAppCrashOccurred" /> + <option name="compatibility:exclude-filter" value="CtsUiRenderingTestCases android.uirendering.cts.testclasses.SurfaceViewTests#testMovingWhiteSurfaceView" /> - <!-- Exclude known failure of CtsMediaTestCases --> + <!-- Exclude known failure of CtsMediaTestCases (mostly on some Pixel phones) --> <!-- CSI doesn't seem to include ringtones. --> <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.RingtoneManagerTest" /> <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.RingtoneTest" /> <!-- Following failures take about 10 min each, so exclude them to reduce test time. --> + <!-- CSI on Goldfish can pass the following tests in StreamingMediaPlayerTest. --> <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.StreamingMediaPlayerTest#testHTTP_H263_AMR_Video2" /> <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.StreamingMediaPlayerTest#testHTTP_H264Base_AAC_Video2" /> <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.StreamingMediaPlayerTest#testHTTP_MPEG4SP_AAC_Video2" /> + <!-- CSI on Cuttlefish and Goldfish can pass the following tests in VideoCodecTest. --> <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VideoCodecTest#testParallelEncodingAndDecodingAVC" /> <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VideoCodecTest#testParallelEncodingAndDecodingHEVC" /> <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VideoCodecTest#testParallelEncodingAndDecodingVP8" /> <!-- Failures will crash the test harness, so exclude it here (even though only failed with VP9 decoder). --> + <!-- CSI on Cuttlefish and Goldfish can pass the following tests in VideoDecoderRotationTest. --> <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VideoDecoderRotationTest" /> + <!-- CSI on Cuttlefish and Goldfish can pass the following tests in VideoDecoderPerfTest. --> <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VideoDecoderPerfTest#testAvcOther0Perf0320x0240" /> <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VideoDecoderPerfTest#testAvcOther0Perf0720x0480" /> <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VideoDecoderPerfTest#testAvcOther0Perf1280x0720" /> @@ -53,6 +72,7 @@ <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VideoDecoderPerfTest#testHevcOther1Perf1920x1080" /> <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VideoDecoderPerfTest#testHevcOther1Perf3840x2160" /> + <!-- CSI on Cuttlefish and Goldfish can pass the following tests in VideoEncoderTest. --> <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VideoEncoderTest#testGoogH263SurfMinMin" /> <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VideoEncoderTest#testGoogH265SurfArbitraryH" /> <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.VideoEncoderTest#testGoogH265SurfArbitraryW" /> diff --git a/tools/cts-tradefed/res/config/cts-known-failures.xml b/tools/cts-tradefed/res/config/cts-known-failures.xml index 68c7d05b..de90e527 100644 --- a/tools/cts-tradefed/res/config/cts-known-failures.xml +++ b/tools/cts-tradefed/res/config/cts-known-failures.xml @@ -214,6 +214,9 @@ <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.AppConfigurationTests#testAppOrientationRequestConfigClears" /> <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.AppConfigurationTests#testTaskCloseRestoreFreeOrientation" /> + <!-- b/167931576 --> + <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.ActivityVisibilityTests#testTurnScreenOnAttrNoLockScreen" /> + <!-- b/135533962 --> <option name="compatibility:exclude-filter" value="arm64-v8a CtsWrapWrapDebugMallocDebugTestCases" /> </configuration> diff --git a/tools/cts-tradefed/res/config/cts-meerkat.xml b/tools/cts-tradefed/res/config/cts-meerkat.xml index 3c44071d..e2f25ac3 100644 --- a/tools/cts-tradefed/res/config/cts-meerkat.xml +++ b/tools/cts-tradefed/res/config/cts-meerkat.xml @@ -22,6 +22,10 @@ <!-- Disable instant tests --> <option name="compatibility:enable-parameterized-modules" value="false" /> + <!-- Overlays & touches --> + <option name="compatibility:include-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.WindowInputTests"/> + <option name="compatibility:include-filter" value="CtsSecurityTestCases android.security.cts.MotionEventTest"/> + <!-- System Alert Window (SAW) --> <option name="compatibility:include-filter" value="CtsSystemIntentTestCases"/> <option name="compatibility:include-filter" value="CtsMediaTestCases android.media.cts.MediaProjectionTest"/> diff --git a/tools/cts-tradefed/res/config/cts-on-csi-cf.xml b/tools/cts-tradefed/res/config/cts-on-csi-cf.xml new file mode 100644 index 00000000..787ab938 --- /dev/null +++ b/tools/cts-tradefed/res/config/cts-on-csi-cf.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2020 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 for Cuttlefish"> + + <!-- Inherit from cts-on-csi for exclude list common for all CSI devices --> + <include name="cts-on-csi" /> + + <!-- Troublesome tests that often crash the system --> + <option name="compatibility:exclude-filter" value="CtsPackageInstallTestCases android.packageinstaller.install.cts.IntentTest#packageNotInstalledSecureFrp" /> + <option name="compatibility:exclude-filter" value="CtsPermission3TestCases android.permission3.cts.PermissionReviewTest#testReviewPermissionWhenServiceIsBound" /> + +</configuration> diff --git a/tools/cts-tradefed/res/config/cts-on-csi-no-apks.xml b/tools/cts-tradefed/res/config/cts-on-csi-no-apks.xml index 12ce8c7b..b10f5191 100644 --- a/tools/cts-tradefed/res/config/cts-on-csi-no-apks.xml +++ b/tools/cts-tradefed/res/config/cts-on-csi-no-apks.xml @@ -16,10 +16,30 @@ <configuration description="Excluded tests for APKs not in CSI"> <!-- No Browser2 --> + <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.EphemeralTest#testEphemeralQuery" /> <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.AvailableIntentsTest#testViewNormalUrl" /> <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.AvailableIntentsTest#testViewSecureUrl" /> <option name="compatibility:exclude-filter" value="CtsMatchFlagTestCases android.matchflags.cts.MatchFlagTests#startNoBrowserRequireDefault" /> <option name="compatibility:exclude-filter" value="CtsMatchFlagTestCases android.matchflags.cts.MatchFlagTests#startNoBrowserIntentWithNoMatchingApps" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#openDefaultAppDetailsAndSetDefaultAppThenIsDefaultApp" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#requestRoleAndAllowThenIsRoleHolder" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#dontAddRoleHolderThenIsNotRoleHolder" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#openDefaultAppListAndSetDefaultAppThenIsDefaultApp" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#requestRoleAndDenyThenHasDontAskAgain" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#requestRoleAndDenyWithDontAskAgainThenDeniedAutomatically" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#requestRoleAndDenyWithDontAskAgainAndReinstallThenShowsUiWithoutDontAskAgain" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#openDefaultAppDetailsAndSetDefaultAppAndSetAnotherThenIsNotDefaultApp" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#requestRoleAndDenyWithDontAskAgainAndClearDataThenShowsUiWithoutDontAskAgain" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#openDefaultAppListAndSetDefaultAppThenIsDefaultAppInList" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#requestRoleFirstTimeNoDontAskAgain" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#requestHoldingRoleThenAllowedAutomatically" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#openDefaultAppDetailsThenIsNotDefaultApp" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#addAndRemoveRoleHolderThenRoleIsNotHeld" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#dontAddRoleHolderThenRoleIsNotHeld" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#addAndClearRoleHoldersThenIsNotRoleHolder" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#addAndRemoveRoleHolderThenIsNotRoleHolder" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#requestRoleAndDenyThenIsNotRoleHolder" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#requestRoleAndDenyWithDontAskAgainReturnsCanceled" /> <!-- No Calendar --> <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.AvailableIntentsTest#testCalendarAddAppointment" /> @@ -45,6 +65,19 @@ <!-- No Dialer --> <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.AvailableIntentsTest#testDialPhoneNumber" /> <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.AvailableIntentsTest#testDialVoicemail" /> + <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.MixedDeviceOwnerTest#testLockTask_defaultDialer" /> + <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.MixedProfileOwnerTest#testLockTask_defaultDialer" /> + <option name="compatibility:exclude-filter" value="CtsTelecomTestCases android.telecom.cts.DefaultDialerOperationsTest#testActionDialHandling" /> + <option name="compatibility:exclude-filter" value="CtsTelecomTestCases android.telecom.cts.DefaultDialerOperationsTest#testDialerUI" /> + + <!-- No Gallery2 --> + <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.ExternalStorageHostTest#testSystemGalleryExists" /> + <option name="compatibility:exclude-filter" value="CtsOsTestCases android.os.cts.StrictModeTest#testFileUriExposure" /> + <option name="compatibility:exclude-filter" value="CtsOsTestCases android.os.cts.StrictModeTest#testVmPenaltyListener" /> + <option name="compatibility:exclude-filter" value="CtsOsTestCases android.os.cts.StrictModeTest#testContentUriWithoutPermission" /> + + <!-- No Gallery2, Music --> + <option name="compatibility:exclude-filter" value="CtsProviderTestCases android.provider.cts.media.MediaStoreIntentsTest" /> <!-- No Launcher and Home --> <option name="compatibility:exclude-filter" value="CtsAccessibilityServiceTestCases android.accessibilityservice.cts.AccessibilityEmbeddedDisplayTest" /> @@ -71,6 +104,7 @@ <option name="compatibility:exclude-filter" value="CtsAppTestCases android.app.cts.ActivityManagerTest#testTimeTrackingAPI_SwitchAwayTriggers" /> <option name="compatibility:exclude-filter" value="CtsAppTestCases android.app.cts.BooleanTileServiceTest" /> <option name="compatibility:exclude-filter" value="CtsAppTestCases android.app.cts.TileServiceTest" /> + <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.QuietModeHostsideTest" /> <option name="compatibility:exclude-filter" value="CtsShortcutManagerLauncher1" /> <option name="compatibility:exclude-filter" value="CtsShortcutManagerLauncher2" /> <option name="compatibility:exclude-filter" value="CtsShortcutManagerLauncher3" /> @@ -93,8 +127,10 @@ <!-- No Settings --> <option name="compatibility:exclude-filter" value="CtsAccessibilityServiceTestCases android.accessibilityservice.cts.AccessibilitySettingsTest" /> <option name="compatibility:exclude-filter" value="CtsAdminTestCases android.admin.cts.DeviceAdminActivationTest" /> + <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.StorageHostTest#testFullDisk" /> <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.SettingsIntentTest" /> <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.AvailableIntentsTest#testAddNetworksIntent" /> + <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.AvailableIntentsTest#testEasyConnectIntent" /> <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.AvailableIntentsTest#testInteractAcrossProfilesSettings" /> <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.AvailableIntentsTest#testLocationScanningSettings" /> <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.AvailableIntentsTest#testNotificationPolicyDetailIntent" /> @@ -105,7 +141,15 @@ <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.AvailableIntentsTest#testTapAnPaySettings" /> <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.AvailableIntentsTest#testUsageAccessSettings" /> <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.AvailableIntentsTest#testVoiceInputSettingsIntent" /> + <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.ManagedProfileTest#testSettingsIntents" /> + <option name="compatibility:exclude-filter" value="CtsOsTestCases android.os.cts.AutoRevokeTest#testAutoRevoke_userWhitelisting" /> + <option name="compatibility:exclude-filter" value="CtsOsTestCases android.os.cts.AutoRevokeTest#testInstallGrants_notRevokedImmediately" /> + <option name="compatibility:exclude-filter" value="CtsPackageInstallTestCases android.packageinstaller.install.cts.ExternalSourcesTestAppOpAllowed#testManageUnknownSourcesExists" /> + <option name="compatibility:exclude-filter" value="CtsProviderTestCases android.provider.cts.SettingsPanelTest" /> + <option name="compatibility:exclude-filter" value="CtsProviderTestCases android.provider.cts.settings.SettingsTest#testUserDictionarySettingsExists" /> <option name="compatibility:exclude-filter" value="CtsSettingsHostTestCases" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleControllerManagerTest#settingsIsNotVisibleForHomeRole" /> + <option name="compatibility:exclude-filter" value="CtsRoleTestCases android.app.role.cts.RoleManagerTest#openDefaultAppListThenIsNotDefaultAppInList" /> <!-- No SettingsIntelligence --> <option name="compatibility:exclude-filter" value="CtsContentTestCases android.content.cts.AvailableIntentsTest#testSettingsSearchIntent" /> @@ -128,14 +172,24 @@ <!-- No WebView --> <option name="compatibility:exclude-filter" value="CtsAssistTestCases android.assist.cts.WebViewTest#testWebView" /> + <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.EphemeralTest#testWebViewLoads" /> + <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.inline.InlineWebViewActivityTest" /> <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.WebViewActivityTest" /> <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.WebViewMultiScreenLoginActivityTest" /> <option name="compatibility:exclude-filter" value="CtsAutoFillServiceTestCases android.autofillservice.cts.inline.InlineWebViewActivityTest" /> + <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.ManagedProfileProvisioningTest#testWebview" /> <option name="compatibility:exclude-filter" value="CtsHostsideWebViewTests" /> + <option name="compatibility:exclude-filter" value="CtsInputMethodTestCases android.view.inputmethod.cts.KeyboardVisibilityControlTest#testShowHideKeyboardOnWebView" /> <option name="compatibility:exclude-filter" value="CtsTextTestCases android.text.cts.EmojiTest" /> - <option name="compatibility:exclude-filter" value="CtsUiRenderingTestCases android.uirendering.cts.testclasses.LayerTests#testWebViewWithParentLayer" /> + <option name="compatibility:exclude-filter" value="CtsUiRenderingTestCases android.uirendering.cts.testclasses.LayerTests#testWebViewScaledWithParentLayer" /> + <option name="compatibility:exclude-filter" value="CtsUiRenderingTestCases android.uirendering.cts.testclasses.LayerTests#testWebViewWithAlpha" /> <option name="compatibility:exclude-filter" value="CtsUiRenderingTestCases android.uirendering.cts.testclasses.LayerTests#testWebViewWithAlphaLayer" /> + <option name="compatibility:exclude-filter" value="CtsUiRenderingTestCases android.uirendering.cts.testclasses.LayerTests#testWebViewWithLayer" /> <option name="compatibility:exclude-filter" value="CtsUiRenderingTestCases android.uirendering.cts.testclasses.LayerTests#testWebViewWithOffsetLayer" /> + <option name="compatibility:exclude-filter" value="CtsUiRenderingTestCases android.uirendering.cts.testclasses.LayerTests#testWebViewWithParentLayer" /> + <option name="compatibility:exclude-filter" value="CtsUiRenderingTestCases android.uirendering.cts.testclasses.LayerTests#testWebViewWithUnclippedLayer" /> + <option name="compatibility:exclude-filter" value="CtsUiRenderingTestCases android.uirendering.cts.testclasses.LayerTests#testWebViewWithUnclippedLayerAndComplexClip" /> <option name="compatibility:exclude-filter" value="CtsUiRenderingTestCases android.uirendering.cts.testclasses.PathClippingTests#testWebViewClipWithCircle" /> + <option name="compatibility:exclude-filter" value="CtsWebkitTestCases" /> </configuration> diff --git a/tools/cts-tradefed/res/config/cts-on-csi-wmd.xml b/tools/cts-tradefed/res/config/cts-on-csi-wmd.xml new file mode 100644 index 00000000..240a1493 --- /dev/null +++ b/tools/cts-tradefed/res/config/cts-on-csi-wmd.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2020 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 for CtsWindowManagerDeviceTestCases"> + + <!-- Troublesome tests that often crash the system --> + <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.ActivityVisibilityTests#testTurnScreenOnActivity_withRelayout" /> + <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.AnrTests" /> + <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.MultiDisplaySecurityTests#testNoInputConnectionForUntrustedVirtualDisplay" /> + <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.MultiDisplaySystemDecorationTests#testImeApiForBug118341760" /> + <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.MultiDisplaySystemDecorationTests#testCrossDisplayBasicImeOperations" /> + <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.StartActivityTests#testStartActivityByNavigateUpToFromDiffUid" /> + + <!-- No Home --> + <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.MultiDisplaySystemDecorationTests#testLaunchHomeActivityOnSecondaryDisplayWithoutDecorations" /> + <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.MultiDisplaySystemDecorationTests#testLaunchSingleSecondaryHomeActivityOnDisplayWithDecorations" /> + <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.MultiDisplaySystemDecorationTests#testLaunchSingleHomeActivityOnDisplayWithDecorations" /> + <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.MultiDisplaySystemDecorationTests#testLaunchHomeActivityOnUntrustedVirtualSecondaryDisplay" /> + <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.MultiDisplaySystemDecorationTests#testLaunchSecondaryHomeActivityOnDisplayWithDecorations" /> + <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.MultiDisplaySystemDecorationTests#testLaunchHomeActivityOnDisplayWithDecorations" /> + <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.StartActivityTests#testStartHomeIfNoActivities" /> + + <!-- No SystemUI --> + <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.SurfaceControlTest" /> + <option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.SurfaceViewSurfaceValidatorTest" /> + +</configuration> diff --git a/tools/cts-tradefed/res/config/cts-on-csi.xml b/tools/cts-tradefed/res/config/cts-on-csi.xml index bb39714f..7ec61d10 100644 --- a/tools/cts-tradefed/res/config/cts-on-csi.xml +++ b/tools/cts-tradefed/res/config/cts-on-csi.xml @@ -19,6 +19,12 @@ <include name="cts-on-csi-no-apks" /> <include name="csi-known-failures" /> + <!-- + CtsWindowManagerDeviceTestCases has about two hundred failed tests on CSI, + so it has its own exclude list. + --> + <include name="cts-on-csi-wmd" /> + <option name="plan" value="cts-on-csi" /> </configuration> diff --git a/tools/cts-tradefed/res/config/cts-on-gsi-exclude.xml b/tools/cts-tradefed/res/config/cts-on-gsi-exclude.xml index f9735912..092074ad 100644 --- a/tools/cts-tradefed/res/config/cts-on-gsi-exclude.xml +++ b/tools/cts-tradefed/res/config/cts-on-gsi-exclude.xml @@ -25,18 +25,11 @@ <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" /> @@ -50,7 +43,6 @@ <!-- 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 @@ -67,39 +59,14 @@ <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/161837932: Fix MediaPlayerTests that use "too small" resolution --> + <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.MediaPlayerTest#testOnSubtitleDataListener" /> + <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.MediaPlayerTest#testChangeSubtitleTrack" /> + <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.MediaPlayerTest#testDeselectTrackForSubtitleTracks" /> + <option name="compatibility:exclude-filter" value="CtsMediaTestCases android.media.cts.MediaPlayerTest#testGetTrackInfoForVideoWithSubtitleTracks" /> <!-- b/74583365: CtsAppSecurityHostTestCases flaky --> <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.AdoptableHostTest#testApps " /> @@ -107,6 +74,9 @@ <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/152359655: ResumeOnReboot can't work on GSI --> + <option name="compatibility:exclude-filter" value="CtsAppSecurityHostTestCases android.appsecurity.cts.ResumeOnRebootHostTest" /> + <!-- b/77175538: CtsViewTestCases failure flaky --> <option name="compatibility:exclude-filter" value="CtsViewTestCases android.view.cts.PixelCopyTest#testWindowProducerCopyToRGBA16F" /> @@ -114,92 +84,6 @@ <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" /> @@ -299,4 +183,96 @@ <!-- b/111167329: CtsCameraTestCases failure --> <option name="compatibility:exclude-filter" value="CtsCameraTestCases android.hardware.camera2.cts.SurfaceViewPreviewTest#testSurfaceSet"/> + + <!-- b/135588722: CtsUsesLibraryHostTestCases (10_r1 waiver) --> + <option name="compatibility:exclude-filter" value="CtsUsesLibraryHostTestCases android.classloaders.cts.UsesLibraryHostTest#testMissingLibrary_full"/> + <option name="compatibility:exclude-filter" value="CtsUsesLibraryHostTestCases android.classloaders.cts.UsesLibraryHostTest#testUsesLibrary_full"/> + <option name="compatibility:exclude-filter" value="CtsCompilationTestCases android.compilation.cts.AdbRootDependentCompilationTest"/> + + <!-- b/145371681: CtsContentSuggestionsTestCases and CtsAppPredictionServiceTestCases (10_r2 waiver) --> + <option name="compatibility:exclude-filter" value="CtsAppPredictionServiceTestCases" /> + <option name="compatibility:exclude-filter" value="CtsContentSuggestionsTestCases" /> + + <!-- b/143513519: CtsCameraTestCases (10_r3 waiver) --> + <option name="compatibility:exclude-filter" value="CtsCameraTestCases android.camera.cts.HeifWriterTest#testHeif"/> + + <!-- b/155107044: CtsNetTestCases --> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testInterfaceCountersUdp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm64Tcp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testInterfaceCountersUdp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacMd5Tcp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha512Tcp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacMd5Tcp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha512Tcp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha1Udp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha1Udp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha1Tcp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha1Tcp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm128Tcp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm128Tcp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm96Tcp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha1Tcp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm96Tcp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testCryptTcp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm128Udp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testCryptUdp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAuthUdp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testCryptUdp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAuthUdp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testCryptTcp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha1Udp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testCryptTcp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAuthUdp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testIkeOverUdpEncapSocket"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm128Udp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm128Udp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha256Tcp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha256Tcp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacMd5Udp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm96Tcp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testInterfaceCountersUdp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha512Udp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha512Udp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha256Tcp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha384Udp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha384Udp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha256Udp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm64Tcp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm64Tcp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha512Udp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm96Udp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha384Tcp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm96Udp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha384Udp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha256Udp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacMd5Udp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAuthTcp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacMd5Udp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAuthTcp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha384Tcp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm128Tcp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testCryptUdp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAuthTcp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacMd5Tcp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm64Udp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha256Udp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm64Udp4"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha384Tcp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm64Udp6"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesGcm96Udp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.IpSecManagerTest#testAesCbcHmacSha512Tcp4UdpEncap"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.TrafficStatsTest#testTrafficStatsForLocalhost"/> + <option name="compatibility:exclude-filter" value="CtsNetTestCases android.net.cts.TrafficStatsTest#testValidTotalStats"/> + + <!-- b/150807956: Temporarily disabled due to bad experiment channel --> + <option name="compatibility:exclude-filter" value="CtsUiRenderingTestCases android.uirendering.cts.testclasses.LayerTests#testWebViewWithLayerAndComplexClip" /> + <option name="compatibility:exclude-filter" value="CtsUiRenderingTestCases android.uirendering.cts.testclasses.PathClippingTests#testWebViewClipWithCircle" /> + + <!-- b/159295445, b/159294948: CtsDevicePolicyManagerTestCases --> + <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegatedCertInstallerDeviceIdAttestation" /> + <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testDelegatedCertInstallerDeviceIdAttestation" /> + <option name="compatibility:exclude-filter" value="CtsDevicePolicyManagerTestCases com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testDeviceIdAttestationForProfileOwner" /> + + <!-- b/153032202: CtsSystemUiTestCases (10_r3 waiver) --> + <option name="compatibility:exclude-filter" value="CtsSystemUiTestCases android.systemui.cts.WindowInsetsBehaviorTests#swipeOutsideLimit_systemUiVisible_allEventsCanceled"/> </configuration> diff --git a/tools/cts-tradefed/res/config/cts-on-gsi-sim.xml b/tools/cts-tradefed/res/config/cts-on-gsi-sim.xml new file mode 100644 index 00000000..5150942c --- /dev/null +++ b/tools/cts-tradefed/res/config/cts-on-gsi-sim.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2020 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 cts-on-gsi on device with SIM card"> + + <include name="cts-on-gsi" /> + + <include name="cts-sim-include" /> + + <option name="plan" value="cts-on-gsi-sim" /> + +</configuration> diff --git a/tools/cts-tradefed/res/config/cts-sim-include.xml b/tools/cts-tradefed/res/config/cts-sim-include.xml new file mode 100644 index 00000000..1614c184 --- /dev/null +++ b/tools/cts-tradefed/res/config/cts-sim-include.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2020 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="Include CTS test that require SIM card"> + + <!-- CTS tests that need SIM card--> + <option name="compatibility:include-filter" value="signed-CtsOmapiTestCases" /> + <option name="compatibility:include-filter" value="signed-CtsSecureElementAccessControlTestCases1" /> + <option name="compatibility:include-filter" value="signed-CtsSecureElementAccessControlTestCases2" /> + <option name="compatibility:include-filter" value="signed-CtsSecureElementAccessControlTestCases3" /> + <option name="compatibility:include-filter" value="CtsCarrierApiTestCases" /> + <option name="compatibility:include-filter" value="CtsJobSchedulerTestCases" /> + <option name="compatibility:include-filter" value="CtsNetTestCases" /> + <option name="compatibility:include-filter" value="CtsNetTestCasesLegacyApi22" /> + <option name="compatibility:include-filter" value="CtsOmapiTestCases" /> + <option name="compatibility:include-filter" value="CtsPermissionTestCases" /> + <option name="compatibility:include-filter" value="CtsPermission2TestCases" /> + <option name="compatibility:include-filter" value="CtsSecureElementAccessControlTestCases1" /> + <option name="compatibility:include-filter" value="CtsSecureElementAccessControlTestCases2" /> + <option name="compatibility:include-filter" value="CtsSecureElementAccessControlTestCases3" /> + <option name="compatibility:include-filter" value="CtsSimRestrictedApisTestCases" /> + <option name="compatibility:include-filter" value="CtsStatsdHostTestCases" /> + <option name="compatibility:include-filter" value="CtsTelecomTestCases" /> + <option name="compatibility:include-filter" value="CtsTelecomTestCases2" /> + <option name="compatibility:include-filter" value="CtsTelecomTestCases3" /> + <option name="compatibility:include-filter" value="CtsTelephonyTestCases" /> + <option name="compatibility:include-filter" value="CtsTelephony2TestCases" /> + <option name="compatibility:include-filter" value="CtsTelephony3TestCases" /> + <option name="compatibility:include-filter" value="CtsTelephonySdk28TestCases" /> + <option name="compatibility:include-filter" value="CtsTetheringTest" /> + <option name="compatibility:include-filter" value="CtsUsageStatsTestCases" /> + +</configuration> diff --git a/tools/cts-tradefed/res/config/cts-sim.xml b/tools/cts-tradefed/res/config/cts-sim.xml index 7f379696..234c33f4 100644 --- a/tools/cts-tradefed/res/config/cts-sim.xml +++ b/tools/cts-tradefed/res/config/cts-sim.xml @@ -17,21 +17,8 @@ <include name="cts" /> - <option name="plan" value="cts-sim" /> + <include name="cts-sim-include" /> - <!-- CTS tests that need SIM card--> - <option name="compatibility:include-filter" value="CtsCarrierApiTestCases" /> - <option name="compatibility:include-filter" value="CtsPermissionTestCases" /> - <option name="compatibility:include-filter" value="CtsPermission2TestCases" /> - <option name="compatibility:include-filter" value="CtsTelecomTestCases" /> - <option name="compatibility:include-filter" value="CtsTelecomTestCases2" /> - <option name="compatibility:include-filter" value="CtsTelecomTestCases3" /> - <option name="compatibility:include-filter" value="CtsTelephonyTestCases" /> - <option name="compatibility:include-filter" value="CtsTelephony2TestCases" /> - <option name="compatibility:include-filter" value="CtsTelephony3TestCases" /> - <option name="compatibility:include-filter" value="CtsTelephonySdk28TestCases" /> - <option name="compatibility:include-filter" value="CtsSimRestrictedApisTestCases" /> - <option name="compatibility:include-filter" value="CtsStatsdHostTestCases" /> - <option name="compatibility:include-filter" value="CtsUsageStatsTestCases" /> + <option name="plan" value="cts-sim" /> </configuration> diff --git a/tools/cts-tradefed/res/config/cts-virtual-device-stable.xml b/tools/cts-tradefed/res/config/cts-virtual-device-stable.xml index 085ef90e..512e8a28 100644 --- a/tools/cts-tradefed/res/config/cts-virtual-device-stable.xml +++ b/tools/cts-tradefed/res/config/cts-virtual-device-stable.xml @@ -53,12 +53,12 @@ <option name="compatibility:include-filter" value="CtsFragmentTestCases" /> <option name="compatibility:include-filter" value="CtsFragmentTestCasesSdk26" /> <option name="compatibility:include-filter" value="CtsGestureTestCases" /> - <option name="compatibility:include-filter" value="CtsHiddenApiBlacklistApi27TestCases" /> - <option name="compatibility:include-filter" value="CtsHiddenApiBlacklistApi28TestCases" /> - <option name="compatibility:include-filter" value="CtsHiddenApiBlacklistCurrentApiTestCases" /> - <option name="compatibility:include-filter" value="CtsHiddenApiBlacklistDebugClassTestCases" /> + <option name="compatibility:include-filter" value="CtsHiddenApiBlocklistApi27TestCases" /> + <option name="compatibility:include-filter" value="CtsHiddenApiBlocklistApi28TestCases" /> + <option name="compatibility:include-filter" value="CtsHiddenApiBlocklistCurrentApiTestCases" /> + <option name="compatibility:include-filter" value="CtsHiddenApiBlocklistDebugClassTestCases" /> <option name="compatibility:include-filter" value="CtsHiddenApiKillswitchDebugClassTestCases" /> - <option name="compatibility:include-filter" value="CtsHiddenApiKillswitchWhitelistTestCases" /> + <option name="compatibility:include-filter" value="CtsHiddenApiKillswitchSdkListTestCases" /> <option name="compatibility:include-filter" value="CtsHiddenApiKillswitchWildcardTestCases" /> <option name="compatibility:include-filter" value="CtsHostsideNumberBlockingTestCases" /> <option name="compatibility:include-filter" value="CtsHostsideTvTests" /> |
