Commit Graph

7 Commits

Author SHA1 Message Date
Paul Duffin
001d87c81f 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
Change-Id: I8e432950e693ee3c6f0240852e62da6133d31571
2018-02-18 21:47:42 +09:00
Paul Duffin
42cea8f5ad Remove unused target legacy.test.stubs
This target is no longer used so can be safely removed.

Bug: 30188076
Test: make checkbuild
Change-Id: Id15d6916c33647d56cb85bbc4cc926c89ff3d4bd
2018-01-06 11:51:43 +00:00
Colin Cross
2b7d71c7f8 Convert legacy-test, test-runner, and test-mock to Android.bp
See build/soong/README.md for more information.

Test: m checkbuild
Change-Id: I110f752d2fa94c44581f20d4f308d9d429da0517
2017-12-08 21:01:53 +00:00
Paul Duffin
1f090a8d66 Use prebuilt android.test.base.jar for app builds
Bug: 30188076
Test: make checkbuild
Change-Id: I1d7e705baf5728e7a034f3bd32746de3a1d3cd78
2017-12-06 12:43:28 +00:00
Paul Duffin
f90cbc6b14 Remove unused repackaged-legacy-test target
Bug: 30188076
Test: make checkbuild
Change-Id: I0858e706f3e7d55b98156af8a1c54b83d775c089
2017-11-29 14:34:54 +00:00
Paul Duffin
5c99382a19 Added new android.test.base targets
Renames ...-legacy-test-... targets related to stubs generation to
...-android-test-base-....

Bug: 30188076
Test: make checkbuild
Change-Id: I54204733612d6d3f14dd8023973e993a5ddab51d
2017-11-28 15:42:05 +00:00
Paul Duffin
f779efd62c Move legacy-test to test-base
Make it consistent with the test-mock and test-runner directories.
Also renames the files in api/ subdirectory.

Bug: 30188076
Test: make checkbuild
Change-Id: If4f99a65fcca416ede5b3e63481398f0b451bcb7
2017-11-28 12:03:53 +00:00