Commit Graph

34282 Commits

Author SHA1 Message Date
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
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
Lukacs T. Berki 8158356421 Print a correct error message when a non-hermetic tool is not found.
The old error message was wrong because this message is emitted
specifically when a non-hermetic tool is not found.

Test: Manual ("m nothing")
Change-Id: I857c1c2bb059aff894e8bd3dd0c09b030c82035d
2021-03-10 10:43:13 +01:00
Paul Duffin 533274a2d3 Merge "Allow customization of product variables in a test fixture" 2021-03-10 08:17:27 +00:00
Paul Duffin 6f3d6df708 Merge "Allow customization of the env configuration in a test fixture" 2021-03-10 08:17:14 +00:00
Paul Duffin df13e97666 Merge "Distinguish between integration test and other tests" 2021-03-10 08:16:55 +00:00
Martin Stjernholm 5fae0ea155 Merge "Build heapprofd_client_api for use in the ART chroot." 2021-03-10 07:50:41 +00:00
Lukács T. Berki 4dc6eaab9a Merge "Run Ninja in a clean environment." 2021-03-10 07:03:28 +00:00
Jaewoong Jung 1a97ee0b20 Populate baseline_file values.
Set baseline_file properties of droidstubs generated in sdk_libary.go to
incompatibilities modules auto-generated by prebuilt_api. This requires
prebuilt_api to generate the modules whether next_api_dir is set or not.

Test: TreeHugger
Bug: 180123247
Change-Id: I690604a8a54e9d9419f072a28a0c0e7734abbd85
2021-03-09 16:26:03 -08:00
Jingwen Chen 13b9b42f8f bp2build: add python_binary_host converter.
This CL adds a simple python_binary_host to native py_binary converter
for standalone modules that don't depend on libs. It also adds support
for the conditional py2/py3 build target based on the version prop.

Test: milestone-2/demo.sh full
Test: bazel query 'kind("py_binary rule", //bionic/...)'
Test: bazel run //bionic/libc/tools:genfunctosyscallnrs
Test: bazel run //bionic/libc/tools:genseccomp
Test: go tests
Fixes: 182236395
Change-Id: Ibe5ec6cd0dc12a61b3a449a8c723d80b891fae42
2021-03-09 18:58:42 -05:00