Commit graph

34238 commits

Author SHA1 Message Date
Paul Duffin
a2fcd19aef Merge "Improve system modules tests" 2021-03-11 15:50:34 +00:00
Christopher Parsons
2bed9ffaf4 Merge "mixed builds for cc_static_library without deps" 2021-03-11 15:11:44 +00:00
Paul Duffin
6f688d03c8 Merge "Convert system modules tests to use fixtures" 2021-03-11 15:11:20 +00:00
Paul Duffin
8075291a94 Merge "Separate system modules tests into their own file" 2021-03-11 15:10:54 +00:00
Paul Duffin
f18ff339a9 Merge "prebuilt_apis should create a java_system_modules_import" 2021-03-11 15:09:47 +00:00
Jaewoong Jung
48b8df14be Merge "Populate baseline_file values." 2021-03-11 15:04:52 +00:00
Paul Duffin
8c004c6c04 Merge "Add preparer for test with variables" 2021-03-11 14:35:57 +00:00
Paul Duffin
e7a055c6a3 Add preparer for test with variables
Bug: 181070625
Test: m nothing
Change-Id: I101826d88e67c63a58007f20f8e24d574dd7c99b
2021-03-11 14:16:49 +00:00
Paul Duffin
01c76ca278 Merge "Add AssertStringListContains to TestHelper" 2021-03-11 14:08:01 +00:00
Paul Duffin
4e1916011c Merge "Convert fuchsia tests to use test fixtures" 2021-03-11 14:07:01 +00:00
Paul Duffin
c52bea9555 Improve system modules tests
The previous approach of looking for substrings in the command that
matched the base name of the jar could not differentiate between
whether the jar was a prebuilt or a source as they both have the same
base name.

The tests also did not cover the case when there was both prebuilts
and source modules.

This change:
1. Checks that the inputs to the command come from the appropriate
   module.
2. Adds a mixed test.
3. Deduped the source and prebuilt module definitions.

The new test reveals the buggy behavior which will be fixed in a follow
up change.

Bug: 182402568
Test: m nothing
Change-Id: I384ecca097cbe3560e7589c23fb99c176a42fd9b
2021-03-11 09:39:18 +00:00
Paul Duffin
f23e346f6c Convert system modules tests to use fixtures
Bug: 182402568
Test: m nothing
Change-Id: I0535e60a692925b141e465d8e1ec92be21d54c88
2021-03-11 08:32:01 +00:00
Paul Duffin
db284be913 Separate system modules tests into their own file
java_test.go is getting too big.

Bug: 182402568
Test: m nothing
Change-Id: I9c3818f1d747a230fcb66687319a3a14d557a57c
2021-03-11 08:21:49 +00:00
Paul Duffin
d6c2a65211 prebuilt_apis should create a java_system_modules_import
Previously it was creating a java_system_modules which worked fine
because apart from the prebuilt nature the two are functionally
identical. However a follow up change will differentiate between them
which would break this code.

Bug: 182402568
Test: m nothing
Change-Id: Ifc13ce31235494e338d730c61a99d8887c5a2c5b
2021-03-11 08:01:19 +00:00
Lukacs T. Berki
21d5c7aaa9 Hard-wire the path to xcrun as /usr/bin/xcrun.
This lets us not leak $PATH to soong_build. It was only needed for
Darwin tests anyway.

Test: Will ask jingwen@ who has a Mac.
Change-Id: I4647e41275b323fe6283580f8f92718c6229f23e
2021-03-11 08:52:39 +01:00
Lukács T. Berki
dfa33be445 Merge "Fix writedocs." 2021-03-11 07:38:42 +00:00
Lukacs T. Berki
81a6983dc2 Fix writedocs.
This probably got broken by aosp/1609473 because soong_build is now
invoked in two different ways:

- By its absolute path during building out/soong/build.ninja
- By its path relative to the source root when generating documentation

Bug: 182347000
Test: Manual (the long incantation on b/182347000)
Change-Id: I0a3a97e4865ffde4a450a3f7baf3980b5a2016c8
2021-03-11 08:37:01 +01:00
Paul Duffin
93706aeef2 Add AssertStringListContains to TestHelper
Bug: 181070625
Test: m nothing
Change-Id: I5b36b748a2f0b7c189aa9e12cf0ad0f663c92a9a
2021-03-11 07:26:19 +00:00
Paul Duffin
ecdac8a6d6 Convert fuchsia tests to use test fixtures
Bug: 181070625
Test: m nothing
Change-Id: Ic2b86f7c603ff1c4b48884cb58908db536d98f37
2021-03-11 07:26:11 +00:00
Lukács T. Berki
a55aefd57b Merge "Print a correct error message when a non-hermetic tool is not found." 2021-03-11 07:10:08 +00:00
Lukács T. Berki
2373e597ea Merge "Fix the environment of soong_build:" 2021-03-11 07:09:24 +00:00
Treehugger Robot
b3d6edd6c0 Merge "AIDEGen: Add "-fprofile-sample-use" parameter into category." 2021-03-11 04:34:02 +00:00
Jingwen Chen
6aeb2911d8 Merge "bp2build: add python_binary_host converter." 2021-03-11 04:21:41 +00:00
Treehugger Robot
215725913c Merge "update apex/allowed_deps.txt" 2021-03-11 01:35:46 +00:00
Jaewoong Jung
6df5e0307d Merge "Lineage properties support module references." 2021-03-11 00:59:32 +00:00
Paul Duffin
9c2e6d50b4 Merge "Avoid calling DepIsInSameApex when excluded from apex contents" 2021-03-10 23:30:48 +00:00
Paul Duffin
38cf70a088 Merge "Convert etc tests to use test fixtures" 2021-03-10 23:24:04 +00:00
Colin Cross
42e49979f2 Merge "Add comment to lintPaths" 2021-03-10 22:55:03 +00:00
Colin Cross
75a38ba791 Merge "Revert "Skip old file cleanup for non-full builds."" 2021-03-10 22:53:43 +00:00
Paul Duffin
29e98e5ede Merge "Support test fixtures in java package" 2021-03-10 22:27:00 +00:00
Paul Duffin
4ce31e448f Merge "Support test fixtures in dexpreopt package" 2021-03-10 22:04:31 +00:00
Paul Duffin
67e848ab04 Merge changes Ib2c6ac28,I7c76ed6d,I00415f10,I4be2a16c,I6f269c9c, ...
* changes:
  Support test fixtures in sh package
  Support test fixtures in bpf package
  Support test fixtures in cc package
  Add temporary RunTestWithConfig method to simplify migration
  Support test fixtures in etc package
  Convert license tests to use test fixtures
2021-03-10 21:52:17 +00:00
Paul Duffin
6edc952d89 Merge "Convert genrule tests to use test fixtures" 2021-03-10 21:51:47 +00:00
Paul Duffin
3b2636fdf3 Merge "Remove duplicate sdk.TestHelper" 2021-03-10 19:59:56 +00:00
Chris Parsons
808d84c45d mixed builds for cc_static_library without deps
Test: Manual mixed builds testing of `libc` target with manually
migrated "libc_nopthread" and "libc_init_dynamic".

Change-Id: If7d67e95eca9899271b1eeb662c7c2e571f64afa
2021-03-10 13:24:59 -05:00
Colin Cross
068f33f6cf Merge changes from topic "lint_rbe"
* changes:
  Pass ANDROID_SDK_HOME to metalava so it doesn't write to ~/.android
  Support remoting lint commands with RBE
2021-03-10 18:13:31 +00:00
Colin Cross
ad22bc2995 Add comment to lintPaths
Test: none
Change-Id: Ia7db6e27fedd95df2ebfc573e35a44a93acb031b
2021-03-10 10:10:40 -08:00
Paul Duffin
19afb3c0c3 Merge "Simplify TestSdkInstall" 2021-03-10 17:31:41 +00:00
Paul Duffin
8bee400a74 Merge "Extract sdk registration code into function for reuse" 2021-03-10 17:31:26 +00:00
Paul Duffin
3d3f7a0c3f Merge "Extract apex registration code into function for reuse" 2021-03-10 17:31:13 +00:00
Paul Duffin
e9612824ea Avoid calling DepIsInSameApex when excluded from apex contents
While debugging an issue with some work I was doing on boot image
modules I noticed that markPlatformAvailability() is calling
DepIsInSameApex() even when the dependency tag indicates that it is
excluded from the apex contents.

Test: m droid
Change-Id: Iac49049546a886f7a3a0d9640ffd31ce24c61364
2021-03-10 16:44:57 +00:00
Lukacs T. Berki
b4ced9d886 Fix the environment of soong_build:
- Incorporate BAZEL_* variables in soong.environment.available
- Set SOONG_DELVE when requested

Test: Manual.
Change-Id: I3ac675f4876220b788cc48d288b402ac6016c37b
2021-03-10 15:43:06 +01:00
Paul Duffin
a3cb2b396f Remove duplicate sdk.TestHelper
As part of the work on the new fixture mechanism some of the TestHelper
functionality was moved into the android/fixture.go package. This moves
the rest and removes the now duplicated TestHelper from the sdk
package.

Also removed some unnecessary & operators.

Bug: 181070625
Test: m nothing
Change-Id: Ia09a5d05e4fab3a4e28cf44b2d947a33541e3925
2021-03-10 14:07:20 +00:00
Paul Duffin
282671d696 Merge "Rename SetErrorHandler to ExtendWithErrorHandler" 2021-03-10 11:51:29 +00:00
Paul Duffin
95bdab4000 Support test fixtures in java package
Restructures the java package test setup code to create FixturePreparer
instances for setting up a test fixture and converts some tests to
use it.

The goal with this change is not to switch all the java tests over to
directly using the new model but instead to ensure that the majority of
the java tests run with the new model, to allow existing tests to
easily switch to the new model when needed and to allow dependent
packages to be switched to the new model.

Bug: 181070625
Test: m nothing
Change-Id: I1c9d96ddbc973aaf9733dcd7fa0479f79b0f471f
2021-03-10 10:13:09 +00:00
Paul Duffin
4fced5582d Support test fixtures in dexpreopt package
The tests in dexpreopt are unit tests that don't require the use of
test fixtures but there are a number of tests in java and apex packages
that need to configure dexpreopt behavior so this changes adds support
for modifying the dexpreopt configuration in test fixtures.

Bug: 181070625
Test: m nothing
Change-Id: I7b64c9cf0a94cc548c27b55c5a7875be5ff0e18d
2021-03-10 10:13:09 +00:00
Lukács T. Berki
5ce36b4a96 Merge "Make $PATH available when building soong_build." 2021-03-10 10:04:04 +00:00
Lukacs T. Berki
73ab928daa Make $PATH available when building soong_build.
This is exclusively used by tests so it's awful, but Darwin builds are
currently broken so let's unbreak them first then start thinking.

Test: "m nothing" on Linux (I don't have access to a mac OS machine)
Change-Id: I1ea9ca71a5aff36a3454282a4c87ad368138baaa
2021-03-10 11:02:39 +01:00
Paul Duffin
921fac7cf9 Convert etc tests to use test fixtures
Bug: 181070625
Test: m nothing
Change-Id: Ic248e233f57f966164284d7cab813398305482c9
2021-03-10 09:51:30 +00:00
Nicolas Geoffray
a0acfa8b85 Merge "Reinstate the enforcement of stable core platform API usage" 2021-03-10 09:45:52 +00:00