Commit Graph

5623 Commits

Author SHA1 Message Date
Paul Duffin
533cf74318 Merge "Separate metadata provider from apex contents provider" 2021-03-18 08:46:49 +00:00
Paul Duffin
93b61b49dd Merge "Add emptyFixtureFactory in java package" 2021-03-18 08:40:03 +00:00
Paul Duffin
177cba31cf Merge "Reorganize the platform_compat_config.go file" 2021-03-18 08:39:39 +00:00
Paul Duffin
1efdb30182 Remove javaMockFS()
Also, removes the workaround that allowed preparers to override files
added in javaMockFS().

The performance of the java tests was determined by running:
  m nothing
  rm -fr out/soong/.bootstrap/soong-java/test/
  time m nothing

Prior to starting this work that returned:
  real  1m30.060s
  user  33m3.028s
  sys   13m25.413s

Immediately prior to this change that returned:
  real  1m2.777s
  user  14m14.352s
  sys   9m40.745s

After applying this change that returned:
  real  0m20.282s
  user  3m7.429s
  sys   0m43.601s

So, this reduced the real time cost of running the java tests from 90
seconds to 20 seconds.

Bug: 182638834
Test: m nothing
Change-Id: I30490fd40ddb0684a5a4975ce1811bab5dc79e4e
2021-03-18 08:02:38 +00:00
Paul Duffin
3d9f268437 Fix TestTurbine to work without javaMockFS()
Bug: 182638834
Test: m nothing
Change-Id: Idf400b5f0d171a504acf006425cbfc514b391e74
2021-03-18 08:02:38 +00:00
Paul Duffin
57c4d79c00 Fix testDexpreoptBoot to work without javaMockFS()
Bug: 182638834
Test: m nothing
Change-Id: I1725d6ce7e1201d8d77e95d3cebb7d8cc882d437
2021-03-18 08:02:38 +00:00
Paul Duffin
171de3ef7c Fix TestClasspath to work without javaMockFS()
Bug: 182638834
Test: m nothing
Change-Id: Icd6fe93cbda418cb4eaf5e99800894d4c4cc5e6f
2021-03-18 08:02:38 +00:00
Paul Duffin
76101fa5ec Convert TestClasspath to test fixtures
The main complication with this change was that many of the tests check
paths that are provided by the default java modules. The location of
them is different in the test fixtures that it is when using
testConfig() and so the test needed to be changed.

Bug: 182638834
Test: m nothing
Change-Id: I6d325dbd3ba39e5de7e53c576d7cfe07bd95a965
2021-03-18 08:02:38 +00:00
Paul Duffin
e26e597fc8 Merge "Fix app tests to work without javaMockFS()" 2021-03-18 08:00:29 +00:00
Paul Duffin
9e993c6162 Merge "Convert app tests that depend on javaMockFS() to test fixtures" 2021-03-18 07:59:54 +00:00
Paul Duffin
8a6fef4db3 Merge "Convert TestUsesLibraries to test fixtures" 2021-03-18 07:59:04 +00:00
Paul Duffin
220ddd7a6b Clean up java package use of python build components
Bug: 182885307
Test: m nothing
Change-Id: I206ebc075c568a09008ec8b63122922dd87ba318
2021-03-17 23:56:58 +00:00
Ulyana Trafimovich
f24394fba8 Merge changes from topic "revert-reimplement" into sc-dev
* changes:
  Revert "Reimplement verify_uses_libraries.sh in manifest_check.py."
  Revert "Don't depend on nonexistent manifest when manifest_check is disabled."
2021-03-17 23:32:53 +00:00
Colin Cross
ecd91c9ffa Add explicit rspfile argument to RuleBuilderCommand.FlagWithRspFileInputList am: 70c4741215 am: 37225a7b05 am: 27a4326c78
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634804

Change-Id: I6a33941387ce9d6054c49f61b41d4f9a4b911e36
2021-03-17 22:21:53 +00:00
Treehugger Robot
9847310ba4 Merge "Run InitAndroidArchModule last in factory functions." am: 797b03eec9 am: e3fd959661 am: 299adde645
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1641400

Change-Id: Iaa59d246d5f72fa399fadf7c52bcbdf2f1f431c2
2021-03-17 22:16:47 +00:00
Yuexi Ma
dca38927a5 Merge "Export a few utility methods" am: b96a04ba49 am: b2bfff678e am: f963e4479e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1620219

Change-Id: I099c0ae909a11f95affa10a2867321fb87e056a5
2021-03-17 22:16:26 +00:00
Christian Wailes
2f2708def3 Merge "Add test suite to legacy core platform allowlist." am: 7d1f1cf27c am: ae3f51b415 am: a537f721d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634799

Change-Id: I353fb8de6827f61dd195fd8d6eb30b8fc669aa3f
2021-03-17 22:07:53 +00:00
Ulyana Trafimovich
9d2c7978f2 Revert "Reimplement verify_uses_libraries.sh in manifest_check.py."
Revert submission 1614807-uses-libs-47

Reason for revert: broken build 7215516 on git_sc-dev \
  on aosp_blueline-userdebug

Reverted Changes:
Id1b66e4f3:Reimplement verify_uses_libraries.sh in manifest_c...
I386aa1a37:Reimplement verify_uses_libraries.sh in manifest_c...

Bug: 183010666
Change-Id: I4c2d4e1c7d865dabf31339d1a5f6aea09fdcd8ac
Test: treehugger
2021-03-17 19:21:38 +00:00
Ulyana Trafimovich
7c6c1f5c8b Revert "Don't depend on nonexistent manifest when manifest_check is disabled."
This reverts commit a76d6606ce.

Reason for revert: broken build 7215516 on git_sc-dev \
  on aosp_blueline-userdebug

Bug: 183010666
Change-Id: I52f00c9f4712dc5716be527cacd085b9f6e6e65a
Test: treehugger
2021-03-17 19:21:08 +00:00
Paul Duffin
1b29e003f3 Add prebuilt_platform_compat_config
It just provides the metadata needed by the global singleton as the
rest is in the apex.

Bug: 182402754
Test: m nothing
Change-Id: I511df7a3a06dab13ddb9ad63392ae5310dfee9c4
2021-03-17 18:16:31 +00:00
Paul Duffin
29072a9c1e Separate metadata provider from apex contents provider
The platform_compat_config_singleton only needs access to the metadata
so this separates that method into its own interface, distinct from the
one needed by the apex. This also adds a test to ensure that the merging
still works.

Bug: 182402754
Test: m nothing
Change-Id: I5212239786810e5fc5eb99831b1122db93d1329f
2021-03-17 18:16:28 +00:00
Paul Duffin
afeee22c17 Add emptyFixtureFactory in java package
Bug: 182402754
Test: m nothing
Change-Id: I6a01b846a8aee5a0ace9e6ac056ee439bf6f12f7
2021-03-17 17:50:22 +00:00
Paul Duffin
961543309f Reorganize the platform_compat_config.go file
The types and methods are separated and interleaved with each other
so this moves them so that they are together.

Bug: 182402754
Test: m nothing
Change-Id: I275f6af30491d2440499b9ee3f201eea227d23f8
2021-03-17 17:50:22 +00:00
Jaewoong Jung
300fd07df1 Merge "Improve java.go readability." am: 9f315dea28 am: b163cc04ce am: b348954705
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1627239

Change-Id: Ia988226bd3485f2e716c330fc65c914f6f068037
2021-03-17 16:19:00 +00:00
Treehugger Robot
1cf5826a85 Merge "Don't depend on nonexistent manifest when manifest_check is disabled." am: 8974f1706e am: da4eb03a9d am: 7be2dbdc41
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1640322

Change-Id: I6d8aeccc36dbe0853b07363d742920e52130d027
2021-03-17 16:18:45 +00:00
Paul Duffin
8d660568b9 Merge "Fix hiddenapi tests to work without javaMockFS()" am: 248f386558 am: 609df5c2ca am: db6fe68b71
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634630

Change-Id: I9a7fbffaf9e8a3c638cbc34b0567447dc02bb4b7
2021-03-17 16:18:37 +00:00
Paul Duffin
b9a4a0c6dd Merge "Convert hiddenapi tests to use test fixtures" am: af0379ca9c am: 5308375fd4 am: 1a2f26004a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634629

Change-Id: I24182aca5356301804ce068ffa5fe17e91c77af8
2021-03-17 16:18:30 +00:00
Paul Duffin
6ade27941a Merge "Fix TestJavaSdkLibrary... tests to work without javaMockFS()" am: ebca5e6a68 am: a6ece5dde2 am: 971fbecedd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634628

Change-Id: Ib3ec5e55a91dbb5883c1c53154c91a32dbd6a5ee
2021-03-17 16:18:23 +00:00
Paul Duffin
5df5ad660d Merge "Convert JavaSdkLibrary... tests in java package to test fixtures" am: fb3fc0cf40 am: dcdefb6b53 am: b75252399c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634627

Change-Id: I272a50cea888cf1db902e29c647072bca4f308f2
2021-03-17 16:18:16 +00:00
Ulyana Trafimovich
6256f66cd9 Merge "Reimplement verify_uses_libraries.sh in manifest_check.py." am: 2002bfa817 am: 8bd0efdef8 am: 072f40803f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1614807

Change-Id: Ic40dfb25a6e02582ce1399f872cc149bf958cab4
2021-03-17 16:17:29 +00:00
Colin Cross
27a4326c78 Add explicit rspfile argument to RuleBuilderCommand.FlagWithRspFileInputList am: 70c4741215 am: 37225a7b05
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634804

Change-Id: Iec8ea5fdda5786380e52d244d73e3dd182d7bc52
2021-03-17 15:50:48 +00:00
Colin Cross
37225a7b05 Add explicit rspfile argument to RuleBuilderCommand.FlagWithRspFileInputList am: 70c4741215
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634804

Change-Id: Id1d3d6b1047f0492eaa88ada521dd8c4cdb22670
2021-03-17 15:31:16 +00:00
Colin Cross
45a4971808 Merge changes from topic "rule_builder_rsp"
* changes:
  Remove unescaped spans support from RuleBuilder
  Add explicit rspfile argument to RuleBuilderCommand.FlagWithRspFileInputList
  Ninja escape RuleBuilder rule params
2021-03-17 15:14:19 +00:00
Paul Duffin
2645a2912f Fix app tests to work without javaMockFS()
Bug: 182638834
Test: m nothing
Change-Id: Ia1815557e6d9dba1cb24f824a988c7599263bf85
2021-03-17 14:01:02 +00:00
Paul Duffin
cdb88a996a Convert app tests that depend on javaMockFS() to test fixtures
Bug: 182638834
Test: m nothing
Change-Id: Ice668cf58695839d4929a0744822c0ded441d9c4
2021-03-17 14:01:02 +00:00
Paul Duffin
d234b418a5 Convert TestUsesLibraries to test fixtures
This test relies on files provided by javaMockFS() so has been
converted to test fixtures to allow it to remove that dependency which
will allow javaMockFS() to be removed.

Bug: 182638834
Test: m nothing
Change-Id: I77b0205c91ff94b1c3c9ca00d4711451e3671571
2021-03-17 14:01:02 +00:00
Andrei Onea
f1f738e653 Replace source based system server stubs
Use the ones obtained by merging the ones in non-updatable code, and the
ones exposed in mainline module jars that are part of
SYSTEMSERVERCLASSPATH.

Test: builds
Bug: 177640454
Change-Id: Ib4719d7eb8b76a0e5af79c1270e2f1e344682423
2021-03-17 13:37:19 +00:00
Treehugger Robot
299adde645 Merge "Run InitAndroidArchModule last in factory functions." am: 797b03eec9 am: e3fd959661
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1641400

Change-Id: I360027624f4e5773bb2851b53025f3c56f823c36
2021-03-17 12:34:15 +00:00
Treehugger Robot
797b03eec9 Merge "Run InitAndroidArchModule last in factory functions." 2021-03-17 11:07:13 +00:00
Yuexi Ma
f963e4479e Merge "Export a few utility methods" am: b96a04ba49 am: b2bfff678e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1620219

Change-Id: I78ea84a8ab77b6df96f98ab0e6ee766ce4397892
2021-03-17 03:07:35 +00:00
Yuexi Ma
b96a04ba49 Merge "Export a few utility methods" 2021-03-17 01:40:51 +00:00
Martin Stjernholm
b79c7f1101 Run InitAndroidArchModule last in factory functions.
It calls InitAndroidModule which retrieves the properties, so all
AddProperties must go before it.

Test: `m nothing` with new ART prebuilt drop that has a
  prebuilt_boot_image module.
Bug: 177892522
Change-Id: Ia09db9ef17148d36d8d4f25df3f1bf4f528a2fc8
2021-03-17 00:31:15 +00:00
Colin Cross
70c4741215 Add explicit rspfile argument to RuleBuilderCommand.FlagWithRspFileInputList
Using $out.rsp as the rsp file adds extra complexity around keeping
the $ unescaped.  Make callers to FlagWithRspFileInputList provide
an explicit path for the rsp file instead.

Bug: 182612695
Test: rule_builder_test.go
Change-Id: I3f531d80c1efa8a9d09aac0a63790c5b11a9f0c6
2021-03-16 16:52:56 -07:00
Christian Wailes
a537f721d5 Merge "Add test suite to legacy core platform allowlist." am: 7d1f1cf27c am: ae3f51b415
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634799

Change-Id: Ib38b47e0cd3579a0041a6446c12d2843607f77e5
2021-03-16 23:35:50 +00:00
Christian Wailes
7d1f1cf27c Merge "Add test suite to legacy core platform allowlist." 2021-03-16 23:02:39 +00:00
Yuexi Ma
627263fece Export a few utility methods
Add a few utility methods to support generating TradeFed test plan in C-Suite

Test: go test .
Change-Id: I86a505068b5d5aa0f5a37b3e3a2465839a7480ef
2021-03-16 15:57:59 -07:00
Jaewoong Jung
b348954705 Merge "Improve java.go readability." am: 9f315dea28 am: b163cc04ce
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1627239

Change-Id: Ia0b76e8b4bb0c366a9254052e2f2fe5bfc74701d
2021-03-16 22:34:59 +00:00
Jaewoong Jung
9f315dea28 Merge "Improve java.go readability." 2021-03-16 21:32:48 +00:00
Treehugger Robot
7be2dbdc41 Merge "Don't depend on nonexistent manifest when manifest_check is disabled." am: 8974f1706e am: da4eb03a9d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1640322

Change-Id: I493923edaea177492800a001dfd80a7d3ea17c3d
2021-03-16 21:11:26 +00:00
Treehugger Robot
8974f1706e Merge "Don't depend on nonexistent manifest when manifest_check is disabled." 2021-03-16 20:02:42 +00:00