Commit Graph

1818 Commits

Author SHA1 Message Date
Paul Duffin
35ff106cda Flatten dependency hierarchy of legacy-android-test
Previous changes statically included legacy-android-test in preparation
for removing android.test.* and junit.* classes from the android.jar.
Unfortunately, that lead to duplicate classes between APKs and the
bootclasspath which caused build problems (Proguard) and also runtime
problems (when targeting and running on older releases).

Switching from statically including the classes to using the runtime
libraries cannot be done in one step because legacy-android-test is
statically included in libraries which are used in many APKs and so
removing it from those libraries requires that all APKs be updated at
once. Doing that atomically across dozens of projects is not practical.

This change modifies APKS that statically include the
legacy-android-test library indirectly.

* If the APK manifest uses the android.test.runner library then the APK
  is modified to stop statically including legacy-android-test and
  instead build against android.test.base/mock/runner libraries instead.

* Otherwise, the APK statically includes legacy-android-test.

Also, any libraries that statically include are modified to stop
statically including it and if it has source dependencies on the classes
is changed to build against the android.test.base/mock/runner libraries.

The following change descriptions were generated automatically and so
may be a little repetitive. They are provided to give the reviewer
enough information to check the comments match what has actually been
changed and check the reasoning behind the changes.

* apps/CtsVerifier/Android.mk
    Removed legacy-android-test from LOCAL_JAVA_LIBRARIES because it is
    unnecessary as CtsVerifier's source does not depend on classes from
    legacy-android-test. The classes do not need to be statically
    included because the classes will be provided by the runtime,
    either from the default bootclasspath or from the
    android.test.runner library that CtsVerifier specifies in its
    manifest.

* common/device-side/device-info/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because compatibility-device-info is not a package so does not need
    to statically include the classes

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    compatibility-device-info has a source dependency on its classes

* common/device-side/device-info/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because compatibility-device-info-tests is not a package so does
    not need to statically include the classes

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    compatibility-device-info-tests has a source dependency on its
    classes

* common/device-side/util/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because compatibility-device-util is not a package so does not need
    to statically include the classes

* hostsidetests/abioverride/app/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsAbiOverrideTestApp was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/appsecurity/test-apps/AccessSerialModern/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsAccessSerialModern was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/appsecurity/test-apps/DocumentClient/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDocumentClient's source depends on its classes and because of
    these changes they are no longer present on the compilation path.
    The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsDocumentClient specifies in its manifest.

* hostsidetests/appsecurity/test-apps/DocumentProvider/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsDocumentProvider was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/appsecurity/test-apps/PermissionPolicy25/Android.mk
    Removed legacy-android-test from LOCAL_JAVA_LIBRARIES because it is
    unnecessary as CtsPermissionPolicyTest25's source does not depend
    on classes from legacy-android-test. The classes do not need to be
    statically included because the classes will be provided by the
    runtime, either from the default bootclasspath or from the
    android.test.runner library that CtsPermissionPolicyTest25
    specifies in its manifest.

* hostsidetests/appsecurity/test-apps/UsePermissionApp22/Android.mk
    Replaced 'legacy-android-test' with 'android.test.base' in
    LOCAL_JAVA_LIBRARIES because CtsUsePermissionApp22's source depends
    on its classes. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that CtsUsePermissionApp22 specifies in its manifest.

* hostsidetests/appsecurity/test-apps/UsePermissionApp23/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsUsePermissionApp23 was statically linked to it through its
    dependency on compatibility-device-util

    Removed legacy-android-test from LOCAL_JAVA_LIBRARIES because it is
    unnecessary as CtsUsePermissionApp23 already statically includes
    legacy-android-test

* hostsidetests/appsecurity/test-apps/UsePermissionApp25/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsUsePermissionApp25 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/appsecurity/test-apps/UsePermissionApp26/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsUsePermissionApp26 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/appsecurity/test-apps/UsePermissionAppLatest/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsUsePermissionAppLatest was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/devicepolicy/app/Assistant/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsDevicePolicyAssistApp was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/devicepolicy/app/CustomizationApp/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsCustomizationApp was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/devicepolicy/app/DeviceAndProfileOwner/api23/Android.mk
    Replaced 'legacy-android-test' with 'android.test.runner.stubs' in
    LOCAL_JAVA_LIBRARIES because CtsDeviceAndProfileOwnerApp23's source
    depends on its classes. The classes do not need to be statically
    included because the classes will be provided by the runtime,
    either from the default bootclasspath or from the
    android.test.runner library that CtsDeviceAndProfileOwnerApp23
    specifies in its manifest.

* hostsidetests/devicepolicy/app/DeviceAndProfileOwner/api25/Android.mk
    Replaced 'legacy-android-test' with 'android.test.runner.stubs' in
    LOCAL_JAVA_LIBRARIES because CtsDeviceAndProfileOwnerApp25's source
    depends on its classes. The classes do not need to be statically
    included because the classes will be provided by the runtime,
    either from the default bootclasspath or from the
    android.test.runner library that CtsDeviceAndProfileOwnerApp25
    specifies in its manifest.

* hostsidetests/devicepolicy/app/DeviceAndProfileOwner/latest/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsDeviceAndProfileOwnerApp's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that CtsDeviceAndProfileOwnerApp specifies in its manifest.

* hostsidetests/devicepolicy/app/WifiConfigCreator/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsWifiConfigCreator was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/dumpsys/apps/ProcStatsHelperApp/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsProcStatsHelperApp was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/media/app/MediaSessionTest/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsMediaSessionHostTestApp was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/net/app/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsHostsideNetworkTestsApp's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that CtsHostsideNetworkTestsApp specifies in its manifest.

* hostsidetests/os/test-apps/StaticSharedLibConsumerApp1/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsStaticSharedLibConsumerApp1 was statically linked to it through
    its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/launcher1/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupLauncher1 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/launcher2/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupLauncher2 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/launcher3/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupLauncher3 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/launcher4new/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupLauncher4new was statically linked to it through
    its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/launcher4old/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupLauncher4old was statically linked to it through
    its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher1/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher1 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher2/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher2 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher3/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher3 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher4new/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4new was statically linked to it through
    its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher4new_nobackup/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4new_nobackup was statically linked to it
    through its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher4new_nomanifest/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4new_nomanifest was statically linked to
    it through its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher4new_wrongkey/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4new_wrongkey was statically linked to it
    through its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher4old/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4old was statically linked to it through
    its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/backup/publisher4old_nomanifest/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutBackupPublisher4old_nomanifest was statically linked to
    it through its dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/multiuser/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutMultiuserTest was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/shortcuts/deviceside/upgrade/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutUpgradeVersion1 was statically linked to it through its
    dependency on compatibility-device-util

    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutUpgradeVersion2 was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/ui/appA/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsDeviceTaskSwitchingAppA was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/ui/appB/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsDeviceTaskSwitchingAppB was statically linked to it through its
    dependency on compatibility-device-util

* hostsidetests/webkit/app/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsWebViewStartupApp's source depends on its classes and because of
    these changes they are no longer present on the compilation path.
    The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsWebViewStartupApp specifies in its manifest.

* libs/deviceutillegacy/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because ctsdeviceutillegacy is not a package so does not need to
    statically include the classes

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    ctsdeviceutillegacy has a source dependency on its classes

* tests/JobScheduler/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    CtsJobSchedulerTestCases's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that CtsJobSchedulerTestCases specifies in its manifest.

* tests/JobScheduler/jobperm/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsJobSchedulerJobPerm was statically linked to it through its
    dependency on compatibility-device-util

* tests/JobScheduler/shareduid/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsJobSchedulerSharedUid was statically linked to it through its
    dependency on compatibility-device-util

* tests/admin/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAdminTestCases's source depends on its classes and because of
    these changes they are no longer present on the compilation path.
    The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsAdminTestCases specifies in its manifest.

* tests/app/app2/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsAppTestStubsDifferentUid was statically linked to it through its
    dependency on compatibility-device-util

* tests/backup/app/fullbackup/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsFullBackupApp was statically linked to it through its dependency
    on compatibility-device-util

* tests/backup/app/keyvalue/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsKeyValueBackupApp was statically linked to it through its
    dependency on compatibility-device-util

* tests/framework/base/windowmanager/alertwindowservice/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsAlertWindowService was statically linked to it through its
    dependency on compatibility-device-util

* tests/leanbackjank/app/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsLeanbackJankApp was statically linked to it through its
    dependency on compatibility-device-util

* tests/tests/alarmclock/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAlarmClockTestCases's source depends on its classes and because
    of these changes they are no longer present on the compilation
    path. The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsAlarmClockTestCases specifies in its manifest.

* tests/tests/assist/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsAssistTestCases's source depends on its classes and because of
    these changes they are no longer present on the compilation path.
    The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsAssistTestCases specifies in its manifest.

* tests/tests/dpi/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because android.cts.dpi is not a package so does not need to
    statically include the classes

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    android.cts.dpi has a source dependency on its classes

* tests/tests/dpi2/Android.mk
    Removed legacy-android-test from LOCAL_JAVA_LIBRARIES because it is
    unnecessary as CtsDpiTestCases2's source does not depend on classes
    from legacy-android-test. The classes do not need to be statically
    included because the classes will be provided by the runtime,
    either from the default bootclasspath or from the
    android.test.runner library that CtsDpiTestCases2 specifies in its
    manifest.

* tests/tests/externalservice/service/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsExternalServiceService was statically linked to it through its
    dependency on compatibility-device-util

* tests/tests/mediastress/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsMediaStressTestCases's source depends on its classes and because
    of these changes they are no longer present on the compilation
    path. The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsMediaStressTestCases specifies in its manifest.

* tests/tests/openglperf/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsOpenGlPerfTestCases's source depends on its classes and because
    of these changes they are no longer present on the compilation
    path. The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsOpenGlPerfTestCases specifies in its manifest.

* tests/tests/provider/Android.mk
    Replaced 'legacy-android-test' with 'android.test.base' and
    'android.test.runner' in LOCAL_JAVA_LIBRARIES because
    CtsProviderTestCases's source depends on their classes. The classes
    do not need to be statically included because the classes will be
    provided by the runtime, either from the default bootclasspath or
    from the android.test.runner library that CtsProviderTestCases
    specifies in its manifest.

* tests/tests/selinux/selinuxTargetSdk/Android.mk
    Removed legacy-android-test from LOCAL_JAVA_LIBRARIES because it is
    unnecessary as CtsSelinuxTargetSdkTestCases's source does not
    depend on classes from legacy-android-test. The classes do not need
    to be statically included because the classes will be provided by
    the runtime, either from the default bootclasspath or from the
    android.test.runner library that CtsSelinuxTargetSdkTestCases
    specifies in its manifest.

* tests/tests/shortcutmanager/packages/launchermanifest/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerLauncher1 was statically linked to it through its
    dependency on compatibility-device-util

    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerLauncher2 was statically linked to it through its
    dependency on compatibility-device-util

    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerLauncher3 was statically linked to it through its
    dependency on compatibility-device-util

* tests/tests/shortcutmanager/packages/launchermanifest_nonshared/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerLauncher4 was statically linked to it through its
    dependency on compatibility-device-util

* tests/tests/shortcutmanager/packages/packagemanifest/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerPackage1 was statically linked to it through its
    dependency on compatibility-device-util

    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerPackage2 was statically linked to it through its
    dependency on compatibility-device-util

    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerPackage3 was statically linked to it through its
    dependency on compatibility-device-util

* tests/tests/shortcutmanager/packages/packagemanifest_nonshared/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerPackage4 was statically linked to it through its
    dependency on compatibility-device-util

* tests/tests/shortcutmanager/throttling/Android.mk
    Added 'legacy-android-test' to LOCAL_STATIC_JAVA_LIBRARIES because
    CtsShortcutManagerThrottlingTest was statically linked to it
    through its dependency on compatibility-device-util

* tests/tests/voiceinteraction/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsVoiceInteractionTestCases's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that CtsVoiceInteractionTestCases specifies in its manifest.

* tests/tests/webkit/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    CtsWebkitTestCases's source depends on its classes and because of
    these changes they are no longer present on the compilation path.
    The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsWebkitTestCases specifies in its manifest.

* tests/ui/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    CtsUiDeviceTestCases's source depends on its classes and because of
    these changes they are no longer present on the compilation path.
    The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    CtsUiDeviceTestCases specifies in its manifest.

* tools/cts-reference-app-lib/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because android.cts.refapp is not a package so does not need to
    statically include the classes

    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    android.cts.refapp has a source dependency on its classes

Bug: 30188076
Test: make checkbuild
Change-Id: Ief6940eacf333043e2324462d37d1fd35db15165
2017-12-07 07:38:54 +00:00
Amith Yamasani
1241e9aaf2 Test app standby APIs
Also revert a workaround for incorrect state in
AppIdleHistory.

Bug: 69867516
Bug: 63527785
Test: cts-tradefed run cts-dev -m CtsAppUsageHostTestCases

Change-Id: If3edb88f12d949ab78788e5ea27f0aee76cc4235
2017-12-01 13:55:54 -08:00
Sudheer Shanka
9198dd3580 Add a workaround to fix CtsHostsideNetworkTests.
Fixes: 68765448
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: Iea93416916cf2f700f48e69f269a8851c492efd7
2017-11-28 17:09:24 -08:00
Manoj Boopathi Raj
8116e4594a Merge "Test more transforms and more socket types." am: d292f764bd am: 129129a6ad
am: e2309491e9

Change-Id: Ide9ab9b568f762b34d951446794575072802dd9a
2017-11-16 18:12:32 +00:00
Manoj Boopathi Raj
e2309491e9 Merge "Test more transforms and more socket types." am: d292f764bd
am: 129129a6ad

Change-Id: I6ad35065b267b9f7549aca0d5f5b506759d6a9cb
2017-11-16 18:07:11 +00:00
Manoj Boopathi Raj
129129a6ad Merge "Test more transforms and more socket types."
am: d292f764bd

Change-Id: Icdf454b74803f0bdf4f42caaccd34ec6bd72a224
2017-11-16 18:02:38 +00:00
Lorenzo Colitti
bca5ed9431 Test more transforms and more socket types.
Added CTS test to check the transform (for IPv4 & IPv6) with
various authentication & encryptions types

Bug: 34812052
Test: Ran CTS on angler using aosp/run_cts.sh
Change-Id: I51b4d13847ed0f8ad8d5f19132fdb35b1bd2950c
2017-11-15 14:12:31 -08:00
Xin Li
aaed1d09b3 Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD
am: 49b97c8053

Change-Id: I51fd0ba6886aa440388c53976633b4de10905b35
2017-11-15 02:19:36 +00:00
Xin Li
49b97c8053 Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD
Change-Id: I08d90f09595783ecc235a95c3ab1b02f1bf1c21b
2017-11-14 16:42:59 -08:00
Xin Li
6e0e8f25d8 Merge commit 'ba1e9e7f7893a079138330d2962ff75c35d4cae2' from
oc-mr1-dev-plus-aosp into stage-aosp-master.

Change-Id: I1172a1501c65f67b9c2829b739cadeb9e9ff1983
2017-11-14 11:40:13 -08:00
Adam Vartanian
804a70d3f7 Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa am: c210cc1a90 am: 5d8ba63f42 am: e88ef1b832 am: 1e1de4f052 am: 2204809646 am: fb73667810 am: 83f1303285 am: f259a8e37a am: 3d7e43b226 am: 2516305c8c am: cd4ab882f0
am: 66bf6ff3a2

Change-Id: I9f3d2f2669456d7c1de45cbc32848293b19b7846
2017-11-08 01:29:35 +00:00
Adam Vartanian
66bf6ff3a2 Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa am: c210cc1a90 am: 5d8ba63f42 am: e88ef1b832 am: 1e1de4f052 am: 2204809646 am: fb73667810 am: 83f1303285 am: f259a8e37a am: 3d7e43b226 am: 2516305c8c
am: cd4ab882f0

Change-Id: Ib873b84dc95df60368a259ffd37401bc8bc2a6d3
2017-11-08 01:03:35 +00:00
Adam Vartanian
cd4ab882f0 Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa am: c210cc1a90 am: 5d8ba63f42 am: e88ef1b832 am: 1e1de4f052 am: 2204809646 am: fb73667810 am: 83f1303285 am: f259a8e37a am: 3d7e43b226
am: 2516305c8c

Change-Id: I7e7f5363c4747289c9817e58cb6636839aa2da05
2017-11-08 00:29:47 +00:00
Adam Vartanian
2516305c8c Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa am: c210cc1a90 am: 5d8ba63f42 am: e88ef1b832 am: 1e1de4f052 am: 2204809646 am: fb73667810 am: 83f1303285 am: f259a8e37a
am: 3d7e43b226

Change-Id: I318a6c318db25c5d4dd4be3426b480a9de0b9b11
2017-11-08 00:05:43 +00:00
Adam Vartanian
3d7e43b226 Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa am: c210cc1a90 am: 5d8ba63f42 am: e88ef1b832 am: 1e1de4f052 am: 2204809646 am: fb73667810 am: 83f1303285
am: f259a8e37a

Change-Id: Iaf798faba75cb1f543e012eee98707e20a08e8ce
2017-11-07 23:41:55 +00:00
Adam Vartanian
83f1303285 Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa am: c210cc1a90 am: 5d8ba63f42 am: e88ef1b832 am: 1e1de4f052 am: 2204809646
am: fb73667810

Change-Id: Ib6d1cc2531123894f917b13d388845164e6eec32
2017-11-07 22:56:57 +00:00
Adam Vartanian
fb73667810 Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa am: c210cc1a90 am: 5d8ba63f42 am: e88ef1b832 am: 1e1de4f052
am: 2204809646

Change-Id: Ic96d9b4693178421303c45ac628c456b66cdf655
2017-11-07 22:35:33 +00:00
Adam Vartanian
2204809646 Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa am: c210cc1a90 am: 5d8ba63f42 am: e88ef1b832
am: 1e1de4f052

Change-Id: I4153cfa021655ba19b4b6dca19b70aaf91b5caa8
2017-11-07 22:08:32 +00:00
Adam Vartanian
1e1de4f052 Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa am: c210cc1a90 am: 5d8ba63f42
am: e88ef1b832

Change-Id: Ie60c0885bc52b26fa900d2908946a56169d2f04c
2017-11-07 21:52:12 +00:00
Adam Vartanian
5d8ba63f42 Add CTS test for URI fix. am: a01da8536c am: b1b5379591 am: 73105d42aa
am: c210cc1a90

Change-Id: I276a0be85c41f823506fc8397050d406257324e9
2017-11-07 21:26:57 +00:00
Adam Vartanian
73105d42aa Add CTS test for URI fix. am: a01da8536c
am: b1b5379591

Change-Id: Ib1bcf1c84ee878161f812e8a9ba762a746329a3b
2017-11-07 20:49:55 +00:00
Adam Vartanian
b1b5379591 Add CTS test for URI fix.
am: a01da8536c

Change-Id: I21c707648e6cc02b267f663bd02140dd66b6bd80
2017-11-07 20:40:20 +00:00
Adam Vartanian
a01da8536c Add CTS test for URI fix.
Bug: 68341964
Test: cts -m CtsNetTestCases (on NYC branch)
Change-Id: If532123542155ea3be281044a3ea4ca0b6cf2db5
2017-11-07 14:02:08 +00:00
Jonathan Basseri
6898ec144b Merge "Use random available port in CTS tests." am: 59d9f58467 am: 1ffbf5accc
am: 60b9bbdda1

Change-Id: Ie910c069c0a4048ce7d1257a55044194f1cc56cf
2017-10-31 18:28:00 +00:00
Jonathan Basseri
60b9bbdda1 Merge "Use random available port in CTS tests." am: 59d9f58467
am: 1ffbf5accc

Change-Id: Idf5e8a928f6bdfe2e075d61ac0cf5866059ed39a
2017-10-31 18:22:26 +00:00
Jonathan Basseri
382ea38fc0 Use random available port in CTS tests.
Let the OS pick a random unused port so that the test never gets
EADDRINUSE.

Bug: 68657805
Test: Run tests in android.net.cts.IpSecManagerTest
Change-Id: I7f6c68f3c92f5cbed856eda52adcdffb8adc4734
2017-10-31 09:43:26 -07:00
Sudheer Shanka
719216aca9 Fix CtsHostsideNetworkTests.
Newly installed packages are now idle by default.

Fixes: 67585516
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: Ief06cec1c21bfdd85d1db6673479df2431affe61
2017-10-30 15:26:21 -07:00
Chad Brubaker
044054f5af Merge "Add CTS tests for cleartext traffic default change" 2017-10-24 19:28:27 +00:00
Etan Cohen
4160e25384 Merge "Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev am: d5c00ceee0 am: 8e699c86fc am: 294f9ae45b am: 66aec9074f" into oc-mr1-dev-plus-aosp
am: 410168a364

Change-Id: I3fd82fef086b959ebd95707bff48758e5e4a7f90
2017-10-24 18:30:01 +00:00
Etan Cohen
5b0b9f0690 Merge "Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev am: d5c00ceee0" am: eedaf74628 am: fb02e14772
am: 1b7972c3ad

Change-Id: I42f297ae31332ef5e430f928758a2d94d3b2c5e8
2017-10-24 18:23:23 +00:00
Android Build Merger (Role)
410168a364 Merge "Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev am: d5c00ceee0 am: 8e699c86fc am: 294f9ae45b am: 66aec9074f" into oc-mr1-dev-plus-aosp 2017-10-24 18:18:22 +00:00
Etan Cohen
722df6a982 Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev am: d5c00ceee0 am: 8e699c86fc am: 294f9ae45b
am: 66aec9074f

Change-Id: I475225124fd5e0143bd379c6c2a463b2ac73796e
2017-10-24 18:15:44 +00:00
Etan Cohen
1b7972c3ad Merge "Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev am: d5c00ceee0" am: eedaf74628
am: fb02e14772

Change-Id: I7c58480a13841513cfeec082daafc2bc4764fc83
2017-10-24 18:15:39 +00:00
Etan Cohen
fb02e14772 Merge "Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev am: d5c00ceee0"
am: eedaf74628

Change-Id: Id1dd3f957f911db94c291484a0f313a7239634e8
2017-10-24 18:09:00 +00:00
Etan Cohen
66aec9074f Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev am: d5c00ceee0 am: 8e699c86fc
am: 294f9ae45b

Change-Id: Id6806b4936ec7e3ae9bcc2ae3b62ff37b370e69b
2017-10-24 18:08:45 +00:00
Etan Cohen
294f9ae45b Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev am: d5c00ceee0
am: 8e699c86fc

Change-Id: I7860a70a1cb206f4af24441886efa2cb9512b3b5
2017-10-24 18:02:30 +00:00
Android Merger
eedaf74628 Merge "Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev am: d5c00ceee0" 2017-10-24 17:58:16 +00:00
Etan Cohen
1b5d253694 Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev
am: d5c00ceee0

Change-Id: I0d937d53fd3c151b67d8dd263d2c5d5f7f89dd50
2017-10-24 17:57:49 +00:00
Etan Cohen
8e699c86fc Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev
am: d5c00ceee0

Change-Id: I9b42b412355a641f2bb8a06f031fced7575bab44
2017-10-24 17:57:29 +00:00
Treehugger Robot
d5c00ceee0 Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev 2017-10-24 17:50:46 +00:00
Benedict Wong
0c9badeec9 Merge "Add UDP encap socket test to CTS tests" am: 9b85584096 am: 59c10d21d4
am: 6b2dcb1981

Change-Id: I46a496a4732e6a558d5ab068d8fadb990b041ec2
2017-10-24 16:58:17 +00:00
Benedict Wong
6b2dcb1981 Merge "Add UDP encap socket test to CTS tests" am: 9b85584096
am: 59c10d21d4

Change-Id: I4bb69fe63bdcba3c92f27f0542c282b505f64dcf
2017-10-24 16:43:44 +00:00
Benedict Wong
59c10d21d4 Merge "Add UDP encap socket test to CTS tests"
am: 9b85584096

Change-Id: Ic819770bb02cfc08018068ad43b05dc39aa0e170
2017-10-24 16:38:42 +00:00
Benedict Wong
9b85584096 Merge "Add UDP encap socket test to CTS tests" 2017-10-24 16:31:12 +00:00
Chad Brubaker
2a880aee40 Add CTS tests for cleartext traffic default change
Cleartext traffic permitted now defaults to False for apps targetting P,
this test splits the previous cleartext test into pre-P and P+ targetSDK
versions.

Tests which depended on cleartext traffic have been opted in to
cleartext traffic.

Test: This is the test
Bug: 63931636
Change-Id: I5c4aa39e4055380a54bfe09f668894240be713f8
2017-10-24 09:06:38 -07:00
Etan Cohen
591518f378 [CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network
Before calling the testAddPasspointConfigWithCertCredential
we need to check number of network already present in device

Bug: 67630919
Test: android.server.cts.CtsNetTestCases, WifiManagerTest
Change-Id: If643ab7bde760a65e9a5b1e9d47af53378a178fd
2017-10-23 23:07:59 +00:00
Benedict Wong
d777ed231c Add UDP encap socket test to CTS tests
Tests basic functionality of UDP encap sockets:
> Creates SPIs
> Creates & applies transforms
> Creates UDP encap socket
> Ensures UDP encap socket port is non-zero
> Validates that ESP, IKE packets can be sent correctly

Test: Ran on aosp_angler-eng
Bug: 67662580
Change-Id: Ia7eca384cd779e663d53cbede97ec70da33d28ec
2017-10-23 15:59:09 -07:00
Chih-hung Hsieh
93b6fc1201 Merge "Use -Werror in cts/.../Anroid.mk" am: 3012fb2ba0 am: c4e5ef0549 am: 07c17c56d6
am: 9905ef8518

Change-Id: Ibbc77d28e3d3d42963f10f223155a7a5e2b2dcbb
2017-10-20 23:16:15 +00:00
Chih-hung Hsieh
9905ef8518 Merge "Use -Werror in cts/.../Anroid.mk" am: 3012fb2ba0 am: c4e5ef0549
am: 07c17c56d6

Change-Id: Ie8ccfeb1c924aaa16c6c63cabea7609ec0946082
2017-10-20 22:54:33 +00:00
Chih-hung Hsieh
07c17c56d6 Merge "Use -Werror in cts/.../Anroid.mk" am: 3012fb2ba0
am: c4e5ef0549

Change-Id: Ife6fc1f5f1ebfd0a956bfa6564cb709898cdc52b
2017-10-20 22:48:21 +00:00