6 Commits

Author SHA1 Message Date
Sundong Ahn
f24779c8c7 Build android.test.* with java_sdk_library
android.test.* are built with java_sdk_library and api files are added
by running "make update-api".

android.test.base_static is created for allowing to use
android.test.base as a static library.

Bug:77577799
Test: make -j
Test: make checkapi
Test: make checkapi fails with a random change in the txt file
Test: adb shell cmd package list libraries |\
      grep android.test.*
      And check the android.test.* libraries

Change-Id: Ia27612657532e50b077a9c55dbef59ee3ec04b8a
2018-08-16 12:16:28 +09:00
Nan Zhang
3fece48098 Migrate android.test.base.stubs generation to Soong.
Bug: b/70351683
Test: m clean && m check-android-test-base-api
and compare the old and new stubs.jar using md5sum.

Change-Id: Ia9273016c4d3472888f970cbddf0ed85c0501eb3
2018-04-13 14:55:16 -07:00
Paul Duffin
4cdec67417 Build android.test.base/legacy against SDK
android.test.legacy is now build against SDK, thus available to apps
build with SDK.

In doing so, android.test.mock.stubs had to be built with SDK (because
it is used by android.test.legacy). However, this wasn't trivial.

The problem was that some classes in test-mock implemented abstract
methods of platform classes. Even though they are marked as @hide,
doclava automatically emit them to the stub file because otherwise the
class in the stub file does not implement some abstract methods from its
parent class, which in turn makes the stub file non-compilable.

This CL solves the problem by introducing an adapter class in between
the class in test-mock and the class in the framework. The adapter class
implements abstract methods which are @hide and having reference to
types that aren't available to SDK. The abstract methods are removed
from the original class. Then doclava does not emit the abstract
methods.

Also by @hide'ing the adapter classes, they are not compiled when
building the stub library.

Bug: 30188076
Bug: 73339598
Test: m -j android.test.base
Test: m -j android.test.legacy
Test: m -j android.test.mock.stubs
are successful and do not show link-check warning
Merged-In: I8e432950e693ee3c6f0240852e62da6133d31571
Change-Id: I8e432950e693ee3c6f0240852e62da6133d31571
2018-02-21 15:59:56 +00:00
Paul Duffin
09336b5618 Use prebuilt android.test.base.jar for app builds
(cherry picked from commit 1f090a8d66126a936e40f0e872c5fe5b655fa335)

Bug: 30188076
Test: make checkbuild
Change-Id: I09a70f3e79d0935394332870613b96c653af5e85
Merged-In: I1d7e705baf5728e7a034f3bd32746de3a1d3cd78
2018-01-30 12:38:47 +00:00
Paul Duffin
e95a895ef4 Added new android.test.base targets
Renames ...-legacy-test-... targets related to stubs generation to
...-android-test-base-....

(cherry picked from commit 5c99382a1995723637814221cd5432c458c622ad)

Bug: 30188076
Test: make checkbuild
Change-Id: I40b39c5250b7d990a903052c0b1ebd694242b5b3
Merged-Id: I54204733612d6d3f14dd8023973e993a5ddab51d
2018-01-12 16:31:08 +00:00
Paul Duffin
2141827700 Move legacy-test to test-base
Make it consistent with the test-mock and test-runner directories.
Also renames the files in api/ subdirectory.

(cherry picked from commit f779efd62cd579f67bd3b387d59fda11ee0cbe90)

Bug: 30188076
Test: make checkbuild
Change-Id: Ied3621e6201d8717223fe1ccd4ea77d458126b25
Merged-In: If4f99a65fcca416ede5b3e63481398f0b451bcb7
2018-01-12 15:52:39 +00:00