Commit Graph

20583 Commits

Author SHA1 Message Date
Makoto Onuki d3cd2f5793 Merge "Repeat metalava errors at the end to make it easy to find them" 2020-07-18 02:29:36 +00:00
Makoto Onuki 0df103ae71 Repeat metalava errors at the end to make it easy to find them
Also suppress "unresolved import" messages.

Bug: 161374683
Test: Introduce a lint error, run "m update-api" and make sure the
    error shows up at the end.
Change-Id: Ib5250f7f9593dc4f89f9e7f6dc614e230a966e8f
2020-07-17 15:38:10 -07:00
Dan Willemsen 59415ca60d Merge "Add support for macOS 11 SDK" 2020-07-17 21:33:26 +00:00
Treehugger Robot f8b85dedde Merge changes Ide9c7a6a,I706c1433
* changes:
  Add Validations to android.BuildParams
  Use validations for blueprint tests
2020-07-17 19:54:49 +00:00
Martin Stjernholm 3044394329 Merge "Add support for SDK tests with LinuxBionic OS type." 2020-07-17 11:46:12 +00:00
Ramy Medhat 59b611d138 Merge "Generate RBE socket address randomly for each invocation of soong." 2020-07-16 23:42:06 +00:00
Treehugger Robot e34e5b5442 Merge "Fix non-determinism in tests." 2020-07-16 23:17:14 +00:00
Colin Cross 70f0b53000 Merge changes from topic "lint-unbundled-apps"
* changes:
  Build a zip of transitive lint reports for apps
  Add DepSets
2020-07-16 23:06:22 +00:00
Dan Albert 4fea65086f Merge changes I2ac22f7c,I7fc9d55a
* changes:
  Get NDK python script tests running.
  Fix pylint issues in gen_stub_libs.
2020-07-16 23:06:12 +00:00
Treehugger Robot bf81ed4fd1 Merge "Pass unstripped JNI libraries to Make" 2020-07-16 22:43:53 +00:00
Martin Stjernholm 7feceb2354 Add support for SDK tests with LinuxBionic OS type.
Break apart test helpers a bit to make it possible to enable
LinuxBionic in a single test, and add LinuxBionic support to
cc.GatherRequiredDepsForTest.

Test: m nothing
Bug: 160349757
Change-Id: Iace1024c964cee2308c130c945daef9e46c18c66
2020-07-16 21:55:15 +01:00
Dan Albert 38a224dc7e Fix non-determinism in tests.
The stdlib's xml apparently cares about ordering but also doesn't
preserve it. There are a number of different recommendations of other
ways to do this, but they all depend on packages we don't have
available (lxml or xml.dom.ext, in particular).

Test: pytest
Bug: None
Change-Id: I07108d8977c302404e7c90ca75a4bf7a1144750f
2020-07-16 13:23:33 -07:00
Dan Albert 06f58afd81 Get NDK python script tests running.
Imports weren't working in tests because the package had been created.
The Python "binaries" built by Soong don't seem to take their own
pkg_path into account, so I split the separate pieces of code here out
into their own packages.

Note that the ndk_api_coverage_parser tests do not actually pass
before or after this change (seems like it might be a
non-deterministic ordering issue in the attributes of the generated
output?), but they can at least be run now.

Test: pytest ndkstubgen
Test: pytest symbolfile
Test: pytest ndk_api_coverage_parser
Test: out/host/linux-x86/nativetest64/test_ndkstubgen/test_ndkstubgen
Test: out/host/linux-x86/nativetest64/test_symbolfile/test_symbolfile
Test: out/host/linux-x86/nativetest64/test_ndk_api_coverage_parser/test_ndk_api_coverage_parser
Bug: None
Change-Id: I2ac22f7ced7566e4808070f2f72fd04355846e0b
2020-07-16 13:23:29 -07:00
Dan Albert 802cc82af6 Fix pylint issues in gen_stub_libs.
Test: pylint scriptlib
Bug: None
Change-Id: I7fc9d55a033bab98c318cfb4db1af4eda7187af3
2020-07-16 13:21:43 -07:00
Colin Cross 824f11614e Add Validations to android.BuildParams
Pass Validations through to blueprint.

Test: m checkbuild
Change-Id: Ide9c7a6afe627277df09a9e594849a971916f044
2020-07-16 13:10:57 -07:00
Colin Cross 6e17ad5937 Use validations for blueprint tests
Pass -n to blueprint to make it use validation dependencies for tests,
which will let them run in parallel with soong_build.

Bug: 156428456
Test: m nothing
Change-Id: I706c14330543e2a7728e5dc385976900c67cb2f5
2020-07-16 13:07:06 -07:00
Colin Cross c0efd1db13 Build a zip of transitive lint reports for apps
Add a rule to build a zip containing the lint reports from transitive
dependencies for apps, and pass it to Make.

Bug: 153485543
Test: m TARGET_BUILD_APPS=Gallery2 lint-check
Change-Id: I523c09016251377ff89d76084769be7401b95425
2020-07-16 12:51:42 -07:00
Colin Cross 9e44e21e91 Add DepSets
Add DepSets to efficiently support tracking transitive Paths without
copying, based on Bazel's depsets:
https://docs.bazel.build/versions/master/skylark/depsets.html

Test: depset_test.go
Change-Id: If744affdf1ed850113166ba611a79a891262040c
2020-07-16 12:50:11 -07:00
Ramy Medhat ca1e44cb4b Generate RBE socket address randomly for each invocation of soong.
Test: started soong multiple times and saw different socket files in
out/soong/.temp

Change-Id: Ib0087dd3867bdbf584c6868196070840cff291aa
2020-07-16 12:18:37 -04:00
Jeff Vander Stoep 6e97a7b4a1 rust: Use host linker when building for Mac host.
This behavior is non-hermetic, but matches the behavior of the C++
support. On Linux, using lld works, but on OSX, this fails because lld
does not support Apple's new .tbd files.

Bug: 155302034
Test: On both Linux and Mac hosts:
    cd external/rust; mma

Change-Id: I0ad489113d720bdb9c3b7a67cce9d1e72266f428
2020-07-15 22:02:18 +02:00
Ivan Lozano ec7f59c7df Merge "Fix incorrect Rust dylib extension on darwin." 2020-07-15 17:24:19 +00:00
Treehugger Robot 7e32313ef2 Merge "Do not consider disabled prebuilt variants." 2020-07-15 17:18:40 +00:00
Treehugger Robot 29e4029f5a Merge "Disable all SDK snapshot generation tests on mac." 2020-07-15 16:58:02 +00:00
Martin Stjernholm 3ff2e661bd Disable all SDK snapshot generation tests on mac.
We frequently miss putting in the per-test skip condition, and since
mac isn't tested in presubmit this leads to build breakages and time
consuming reverts. To avoid that this blanket disables all the SDK
tests on mac. It's not used there and we got test coverage in many
linux-based builds.

Bug: 145598135
Bug: 161315642
Test: `go test -v ./sdk` in build/soong on mac and linux
Change-Id: I2aea92fef2c0f8c2742396fe36610501dc5a6f0f
2020-07-15 16:58:05 +01:00
Ivan Lozano 33c05281a5 Fix incorrect Rust dylib extension on darwin.
rustc expects Rust dylibs to have a .dylib extension on darwin.

Bug: 155302034
Test: rust_library_host outputs have correct extension on darwin.
Change-Id: I17b0d7eaf0f42f8186185e3f14c3a8e992c74fde
2020-07-15 11:35:30 -04:00
Makoto Onuki 7bbcc22858 Merge "Proper API hierarchy between MODULE_LIBS and PRIV_APPS system APIs" 2020-07-15 15:26:06 +00:00
Martin Stjernholm f467732447 Do not consider disabled prebuilt variants.
This relands https://r.android.com/1356826 without changes. It got
reverted as part of b/161315642 but is not related to that issue.

Test: m nothing
Test: `m` with prebuilt SDKs in the manifest
Bug: 151303681
Bug: 161315642
Change-Id: I7af892ae28a8208113e0801b1b8a8204edb61ec8
2020-07-15 14:27:13 +01:00
Jakub Pawlowski 75b1005f77 Merge "Revert "Do not consider disabled prebuilt variants."" 2020-07-15 10:33:41 +00:00
Jakub Pawlowski ca7b2c3eb7 Merge "Revert "Add compile_multilib properties to all native prebuilts."" 2020-07-15 10:33:41 +00:00
Charles Chen 6ffbe57270 Revert "Do not consider disabled prebuilt variants."
This reverts commit 235e2fdbd3.

Reason for revert: <build break>

Bug: 161315642
Change-Id: Ie741252dc1d0749591f141c71c3d59ce45f0234f
2020-07-15 08:56:22 +00:00
Charles Chen 29936ae5a7 Revert "Add compile_multilib properties to all native prebuilts."
This reverts commit 1e9c2677fd.

Reason for revert: Break build

Bug: 161315642
Change-Id: Ibf3d5e88412327e8f08d08272b75cd3df34a71e5
2020-07-15 04:01:45 +00:00
Treehugger Robot 6da69732e4 Merge "Add compile_multilib properties to all native prebuilts." 2020-07-15 02:51:21 +00:00
Makoto Onuki d92d515048 Proper API hierarchy between MODULE_LIBS and PRIV_APPS system APIs
Test: build / treehugger
Bug: 146727827
Exempt-From-Owner-Approval: Cherry-picking from goog/master to aosp/master
Merged-in: Ia6a1c3a795ceb168f0f478a50e5e2415d6a92ba4
Change-Id: Ia6a1c3a795ceb168f0f478a50e5e2415d6a92ba4
2020-07-15 01:34:32 +00:00
Dan Willemsen 695dc69ac4 Add support for macOS 11 SDK
Test: try building on the xcode 12 beta 2 macOS 11 SDK
Change-Id: Ic7e245ca418914798ba737106c6a345844e7a6ac
2020-07-14 16:53:43 -07:00
Treehugger Robot 3058878cc7 Merge "Use the build start time from Soong main UI for metrics build timestamp." 2020-07-14 21:04:48 +00:00
Liz Kammer 40be9bb8e1 Merge "Set sdk_version for prebuilt_api to scope" 2020-07-14 18:17:44 +00:00
Patrice Arruda 73c790f59e Use the build start time from Soong main UI for metrics build timestamp.
Currently, the build timestamp saved to the build_date_timestamp
field in the MetricsBase metrics protobuf usually comes from a text
file named build_date.txt. It may not be accurate for metrics purposes.
Instead, use the build start time from Soong main UI for a better
timestamp.

Bug: b/140638454
Test: Ran and checked the build_date_timestamp by running the printproto
      command.
Change-Id: I4d893fbbf9830ba21911e56ae13bc5272be47ae6
2020-07-14 17:23:23 +00:00
Treehugger Robot 75fd488028 Merge "Use monotonic clock instead of wall time clock for metrics." 2020-07-13 23:48:42 +00:00
Liz Kammer f971af7997 Set sdk_version for prebuilt_api to scope
Remove old TODO setting sdk_version to "current" as the associated bug
appears to have been fixed.

Test: m checkapi
Change-Id: I7737fbd17d2f54fc4578e04d07875b4b8d408ef9
2020-07-13 15:41:20 -07:00
Colin Cross 562b6ee5cf Merge "Support lint on unbundled builds" 2020-07-13 21:33:09 +00:00
Patrice Arruda 958b89c0b5 Use monotonic clock instead of wall time clock for metrics.
From several dashboards, there are high spikes from several
builds where the real time of executing a part of the build
system took many many hours. This is due to using the wall
time clock when calculating the duration. For metrics, the
monotonic clock should be used for more accurate measurement.
Also, cleaned up the time.go file to use the proper proto
functions when marshalling perf protobuf and deleted
unnecessary functions.

Bug: b/143492984
Test: Wrote and ran unit test case.
Change-Id: I1540cfbf37915e3045ecedaa2595c1f9429bcd62
2020-07-13 21:14:34 +00:00
Treehugger Robot aeaffeb710 Merge "Add array type property flags, equivalent to args" 2020-07-13 20:52:20 +00:00
Liz Kammer 585cac22d9 Add array type property flags, equivalent to args
The property args is currently a string, but represents a collection of
arguments to metalava/doclava. This has resulted in variables being used
rather than default modules to share arguments.

Test: go test java_tests
Bug: 145644363
Change-Id: I670235e8f1cf19bfe8909049c4765637d0accd47
2020-07-13 08:57:49 -07:00
Treehugger Robot 775c8e1af7 Merge "Do not consider disabled prebuilt variants." 2020-07-13 13:59:30 +00:00
Treehugger Robot 20efa41af8 Merge "Set LOCAL_APKCERTS_FILE for apk_set modules in apexes" 2020-07-13 11:39:43 +00:00
Colin Cross b7cea24fe3 Merge "Use unzip -DD" 2020-07-13 05:58:42 +00:00
Treehugger Robot 9d98ac15bb Merge "Fix string concatenation error" 2020-07-12 23:08:40 +00:00
Colin Cross d783bbbace Use unzip -DD
We put reproducible timestamps in zip files so that the artifacts
are consistent, but that leads to old timestamps in the output
directory if they are unzipped as part of the build.  Use
unzip -DD when unzipping to update the timestamps.

Bug: 161015009
Test: touch -d 2020-01-01 ref; find $OUT/system -not -newer ref
Change-Id: I70407a627cb070e24be510faa6a774e3d9eae3a8
2020-07-12 05:37:46 +00:00
Inseob Kim 41405cc275 Merge "Nullify stl and sanitize of llndk_headers" 2020-07-11 05:19:17 +00:00
Colin Cross 4fb652d681 Set LOCAL_APKCERTS_FILE for apk_set modules in apexes
I321e80fd636a955213761f56a3ac64bfe7f7f7c0 missed setting
LOCAL_APKCERTS_FILE for apk_set modules in apexes, which causes
invalid apkcerts.txt files.

Bug: 160652723
Test: m apkcerts-list
Change-Id: I1ccaafd04978374d0da10363a1d782cfeae428e7
Merged-In: I1ccaafd04978374d0da10363a1d782cfeae428e7
(cherry picked from commit 7e2b36c7d5)
2020-07-10 20:38:50 -07:00