12 Commits

Author SHA1 Message Date
Paul Duffin
bedfae9801 Remove repackaged.android.test.mock
The repackaged.android.test.mock uses internal APIs so cannot be built
against the SDK which means that anything that depends on it cannot
guarantee to run if those internal APIs change.

That library was built because the classes in
repackaged.android.test.runner depend on them. However, the
repackaged.android.test.runner library is only used by the
cts-api-signature-test target and it does not use any android.test.mock
classes directly, or indirectly. Therefore, this simply excludes any
classes from repackaged.android.test.runner that depend on
android.test.mock classes so that repackaged.android.test.mock can be
removed altogether.

Bug: 69899800
Bug: 30188076
Test: make checkbuild
Change-Id: If4528e6a4ec2b08faffd6d413672c5004d85e0a9
2018-02-26 11:57:26 +00:00
Jiyong Park
029925aa04 Build android.test.runner and its variants with SDK
They are not using any private APIs, thus eligible to be built with SDK.

Test: m -j
Change-Id: I82c7e2a739a40d6d2f1488164b25503a8a454b0d
2018-02-22 14:16:35 +09:00
TreeHugger Robot
db69b25f44 Merge "Build android.test.base/legacy against SDK" 2018-02-21 15:56:08 +00:00
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
2d86c7a4c7 Turn on DepAnn for test-base and test-runner
Bug: 30188076
Test: m -j20 RUN_ERROR_PRONE=true android.test.base android.test.runner
Change-Id: I735e3fbfcc710f1dc1b96e04f91b9feda8727b6c
2018-02-16 15:40:24 +00:00
Tobias Thierer
2bbf12aa78 Merge "Pin jarjar targets to java_version 1.8." 2018-02-07 00:16:04 +00:00
Paul Duffin
f24612b176 Correct inaccurate comments in build files
Bug: 30188076
Test: make checkbuild
Change-Id: I3881e66a949bfc5fbc34db0a104ef7a6995abe35
2018-02-06 13:38:44 +00:00
Tobias Thierer
d65595a94e Pin jarjar targets to java_version 1.8.
This CL pins the following make targets to java_version 1.8,
which is currently the default:
  framework-protos
  repackaged.android.test.base
  repackaged.android.test.mock
  repackaged.android.test.runner

For consistency, their dependencies,
  android.test.base
  android.test.mock
  android.test.runner
which contain .java source files, are also pinned to 1.8.

This is so that the two steps:
 a) update jarjar to support v53 class files
 b) support -target 1.9 in the rest of the toolchain
can be completed in any order, in future CLs. Before this CL,
they would have needed to be completed in order a), b).

Bug: 72703434
Test: EXPERIMENTAL_USE_OPENJDK9=true USE_R8=true make checkbuild docs
      (in a client where CL http://r.android.com/596874 was reverted)

Change-Id: If78067294ae7ab78997aa109b0e08be427bdf0b8
2018-02-05 21:14:24 +00:00
Paul Duffin
b36eb542a9 Replace legacy-test with android.test.base in bp files
The legacy-test target is deprecated and will be replaced by
android.test.base. This replaces a few usages of the legacy-test target
in Android.bp files with android.test.base.

Bug: 30188076
Test: make checkbuild
Change-Id: I3575f638114fe2a3b703e67837496346bde24472
2018-01-15 15:47:47 +00:00
Paul Duffin
a88eb29f9e Remove junit classes from legacy-android-test
A mistake during the conversion of the legacy-android-test target from
Android.mk to Android.bp caused some junit classes to be accidentally
included in the legacy-android-test target. That caused some warnings
about duplicate classes to be output during the build.

The junit classes are being included as part of the static library
android.test.runner. This fixes that by adding a new
android.test.runner-minus-junit which excludes the junit classes
and then using that instead.

Test: make checkbuild
Change-Id: Icd00b38c64d3416a55c1055f9716ddb78ec278f8
2018-01-13 09:37:37 +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
Colin Cross
fc7ba9e61f 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
Merged-In: I110f752d2fa94c44581f20d4f308d9d429da0517
(cherry-picked from commit 2b7d71c7f8028741c2200bfeba8913b7f4f55cde)
2017-12-12 23:24:40 +00:00