Commit graph

34404 commits

Author SHA1 Message Date
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
6a1160e749 Convert cc/prebuilt_test.go to use fixtures
Bug: 181070625
Test: m nothing
Change-Id: I6048812962382e2adaf79d941a24e5c0ffdd9b25
2021-03-11 15:04:43 +00:00
Paul Duffin
6c9da044f8 Add preparer for test to use AndroidMk
Bug: 181070625
Test: m nothing
Change-Id: I6b408d44e82d3bac6661bf6b54020c5c4051900e
2021-03-11 15:04:43 +00:00
Paul Duffin
7d8a8ad0d1 Convert cc/cc_test.go tests that use CreateTestContext to fixtures
Bug: 181070625
Test: m nothing
Change-Id: I7e57c978fa07ee8c0f35d567753751bd7b128b1e
2021-03-11 15:04:39 +00:00
Paul Duffin
8c004c6c04 Merge "Add preparer for test with variables" 2021-03-11 14:35:57 +00:00
Paul Duffin
25259e93e1 Add preparer for test to allow missing dependencies
Bug: 181070625
Test: m nothing
Change-Id: I426fcb19d9bea8b9551dc5c3a803228a34768fc0
2021-03-11 14:34:10 +00:00
Paul Duffin
1ef166e411 Correct error in documentation of AssertDeepEquals
Bug: 181070625
Test: m nothing
Change-Id: Ie9bb46a7c29e800822d4bc67b23a457e17e5e29a
2021-03-11 14:34:10 +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
981b94b460 Switch CheckSnapshot from a testSdkResult method to a function
This will allow the testSdkResult to be replaced with the TestResult
when switching sdk package to use test fixtures.

Bug: 181070625
Test: m nothing
Change-Id: Ieca63f4c189f5e804102aeb4073289ea03143b6e
2021-03-11 13:39:24 +00:00
Paul Duffin
8306f25679 Make testSdkResult compatible with android.TestResult
This change makes it easier to switch the sdk package over to using the
new fixture mechanism by removing inconsistencies between the
testSdkResult and TestResult structures.

Bug: 181070625
Test: m nothing
Change-Id: Ic4c06e08ea5060fd09123f2ca65580e18b4d2ef6
2021-03-11 13:38:56 +00:00
Paul Duffin
4f0a75abde Ensure java_system_modules_import uses prebuilts
Make sure that java_system_modules_import always depends on the
prebuilt by adding dependencies in the ComponentDepsMutator() method
which is called before prebuilts without a corresponding source are
renamed from prebuilt_<x> to <x>. That requires the prebuilt_ prefix
to be provided but it ensures that the dependencies are safe.

Similar logic also makes sure java_system_modules always depends on
the source module and not on a renamed prebuilt module.

Bug: 182402568
Test: m nothing
Change-Id: I30db95978f5d9b205951011edf40585ee36c0c4c
2021-03-11 09:40:02 +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
Paul Duffin
f7f65dafb4 Add prebuilt_boot_image and add boot_images to sdk
Bug: 177892522
Test: m nothing
Change-Id: I640359acd6840507f32d7034c97d4d1c7ff591e9
2021-03-11 07:24:26 +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
Colin Cross
9c78cb83d0 Propagate LANG environment variable to lint in RBE
Without LANG, lint's text output is ASCII instead of UTF-8, causing
differences between local and remote execution.

Bug: 181681346
Bug: 182415460
Test: m USE_RBE=true RBE_LINT=true
Change-Id: I0ad54aa731582c9b54abb80f50ba508c75992b91
2021-03-10 18:03:05 -08:00
Colin Cross
9b93af488b Default lint RBE to local exec strategy
Match other tools by defaulting to local exec strategy.

Also use the local absolute path when using the local exec strategy.

Bug: 181681346
Test: m USE_RBE=true RBE_LINT=true
Test: m USE_RBE=true RBE_LINT=true RBE_LINT_EXEC_STRATEGY=remote
Change-Id: I1d6d20ec69663b99d6d9af1d8e5e67b48a5cd050
2021-03-10 18:03:05 -08:00
Treehugger Robot
215725913c Merge "update apex/allowed_deps.txt" 2021-03-11 01:35:46 +00:00
Cindy Zhou
e0c14678d4 Enable cfi for 32bit arch
Enabling cfi for 32-bit arch; b/35157333 seems to have been resolved in b/67507331.

Bug: 158010610

Test: manual interaction with Wimbley device: youtube video, chrome
navigations, gmail
MPTS testing on Sargo
Change-Id: I9eb034deed9938710f0f7b690fa57108d9bc5669

Change-Id: I434748ede352f998e64a6639de6ba162762ee7f0
2021-03-10 17:14:02 -08: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
Jaewoong Jung
75c7cead62 Delete defaultsFactory in java.go.
The factory function became obsolete a long time ago. The module
description text will be correctly extracted with this change.

Test: TreeHugger
Change-Id: If4eb936d34e5a71e6f298f53827a887f34af7cae
2021-03-10 11:41:50 -08: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