Commit graph

17666 commits

Author SHA1 Message Date
Dan Shi
6fe5bf0adb Copy shared libraries used by tests to testcases directory
This change collects the shared libraries files used by tests in
suite, and deploy the files to testcases/lib*. The shared libraries then
can be zipped in general-tests.zip and device-tests.zip. And the host
test can be run in TradeFed host based on build artifacts.

Bug: 111486845
Test: m -j general-tests; m -j device-tests
Confirm the test can run in testcases directory:
out/host/linux-x86/testcases$ ./net_test_avrcp/x86_64/net_test_avrcp
unzip general-tests.zip, confirm net_test_avrcp can run.

Change-Id: I4f9322118aa4891226ea318cbd1bcee6ca48b050
2018-11-04 19:51:59 -08:00
Colin Cross
4c9399d988 Merge "Use protoc-gen-javalite for java lite protos" 2018-11-05 01:13:15 +00:00
Jaewoong Jung
761b58065b Merge "Produce NOTICE files for static libraries." 2018-11-02 21:59:21 +00:00
Treehugger Robot
b966219142 Merge "Revert "Revert "Create bundle modules suitable for bundletool""" 2018-11-02 20:55:30 +00:00
David Brazdil
67828c207c Merge "Remove 'ro.art.hiddenapi.warning' system property" 2018-11-02 10:17:28 +00:00
Dan Willemsen
2066a5cc27 Exempt Soong from LOCAL_TEST_DATA checks
Soong is already checking for reasonable paths, and it supports
generated test data as well, which this does not.

Test: OUT_DIR=$PWD/out m nothing
Change-Id: I62dd09b74f0f3347930fd51c213e2f66c7dfeb2d
2018-11-01 19:37:03 -07:00
Jaewoong Jung
3d90562b7c Produce NOTICE files for static libraries.
Bug: 36073965
Test: mma + visual check.
Change-Id: I3ff341a0668cc6d6de8a54418a7e0db8af28c85c
2018-11-01 16:40:15 -07:00
Evgenii Stepanov
ed90746cbd Link hwasan static library to native tests.
They are executables, but they are not EXECUTABLES.

Bug: 112438058
Test: make SANITIZE_TARGET=hwaddress tests
Change-Id: I0f5d8d6259d7df4196bde50ec553b73099f2c8ac
2018-11-01 15:43:14 -07:00
Dan Willemsen
e0e0cadb21 Merge "Remove obsolete (CLANG|LLVM)_TBLGEN" 2018-11-01 20:51:11 +00:00
Colin Cross
35eb2e32bb Revert "Revert "Create bundle modules suitable for bundletool""
This reverts commit 3451e0ddf2.

Reason for revert: zip2zip now handles recursive globs better.

Bug: 117295826
Change-Id: Ifa30add28d6dbef03d08f8ef7826bb82ed702af6
2018-11-01 20:34:28 +00:00
Paul Duffin
50537afe99 Merge "Allow UnsupportedAppUsage annotations to be in separate target" 2018-11-01 10:22:53 +00:00
Treehugger Robot
5e48a5c62e Merge "Remove host- prefix from protobuf libraries" 2018-11-01 10:12:38 +00:00
David Brazdil
7bdde125b5 Remove 'ro.art.hiddenapi.warning' system property
Toasts/dialog have been removed, so this is now unused.

Test: m, phone boots
Change-Id: Ia0c443a2561f276514337365a7b7d991fd5183a8
2018-11-01 09:59:20 +00:00
Dan Willemsen
b93d898312 Remove obsolete (CLANG|LLVM)_TBLGEN
The last users have been removed.

Test: treehugger
Change-Id: Iafbf5228020bad26e1c241d46473ec559920b2fb
2018-11-01 00:24:44 -07:00
Treehugger Robot
0764d72f14 Merge "De-dup INTERNAL_SYSTEMIMAGE_FILES to fix PDK builds" 2018-11-01 06:57:11 +00:00
Treehugger Robot
cb0e71fd72 Merge "Revert "Create bundle modules suitable for bundletool"" 2018-11-01 03:32:21 +00:00
Colin Cross
3451e0ddf2 Revert "Create bundle modules suitable for bundletool"
This reverts commit afc4604f67.

Reason for revert: zip2zip fails for multiple resources with the same name in different directories

Bug: 117295826
Change-Id: I807dffdaced999b5514ff49fb732a461c1fc90a2
2018-11-01 00:22:26 +00:00
Dan Willemsen
37a1986454 De-dup INTERNAL_SYSTEMIMAGE_FILES to fix PDK builds
On PDK builds, we sometimes end up with multiple entries in
INTERNAL_SYSTEMIMAGE_FILES, if we've got the definition for it, and it's
in PDK_FUSION_SYSIMG_FILES. This causes us to define multiple rules in
sdk_font.mk, leading to overriding commands errors.

Bug: 118634643
Test: attempt PDK build
Change-Id: Ieb4f46c0eece96cf246197af4b03e693493cc6a1
2018-10-31 16:39:29 -07:00
Colin Cross
c66c317460 Merge changes from topics "soong-aar", "soong-bundle"
* changes:
  Store AAR path from Soong for dist
  Create bundle modules suitable for bundletool
  Dist bundle modules from Soong
2018-10-31 22:12:43 +00:00
Paul Duffin
79d8bf25ea Allow UnsupportedAppUsage annotations to be in separate target
Previously, all the UnsupportedAppUsage annotations were assumed to be
in the same target as was used at runtime. e.g. frameworks,
core-libart, etc. This change allows separate targets to be specified
in the EXTRA_HIDDENAPI_JARS. It is needed to avoid maintaining local
patches for those annotations in the libcore/ojluni/src/main/java code
which comes from upstream OpenJDK.

This was tested by making and then manually checking that the generated
out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt was the
same (after sorting) before and after this change.

Test: see above
Bug: 117818301
Change-Id: Icfadbe52601371f6a4cabef106750b16f6c6d4c8
2018-10-31 10:33:38 +00:00
Colin Cross
74e4cf10bf Store AAR path from Soong for dist
Store the path to the AAR file from Soong so that it will be picked
up by dist if requested in TARGET_BUILD_APPS.

Test: m checkbuild
Change-Id: Ifeaf2b5ca3f405fbe79a966ceee9989a38d77f6e
2018-10-30 15:48:33 -07:00
Colin Cross
afc4604f67 Create bundle modules suitable for bundletool
Create a bundle module in addition to creating an APK, which can
then optionally be merged with bundle modules from builds for
other architectures and then be passed to bundletool to create an
app bundle.

Bug: 117295826
Test: tapas Gallery2 && m dist
Change-Id: Ib9b5558888d6d6e841e8a5dcd7037dd0fd65a730
2018-10-30 15:48:25 -07:00
Colin Cross
0fb8c97b02 Dist bundle modules from Soong
Dist bundle modules when requested by TARGET_BUILD_APPS.

Bug: 117295826
Test: tapas RecoveryLocalizer && m dist
Change-Id: Iad63ceafc2a60e6735b50eca65cc4859f9d71b52
2018-10-30 15:47:59 -07:00
David Brazdil
4438e0bb8e Merge "Revert^4: Change command-line flags of hiddenapi" 2018-10-30 10:02:20 +00:00
David Brazdil
9007e530aa Revert^4: Change command-line flags of hiddenapi
The `hiddenapi` build tool now reads a dex file from one filename
and writes a modified dex file to another. Change the build rule
to reflect it.

This reverts commit d8c427fbba.

Change-Id: Ic9a4188a65f7a6fb28edae1aeda7422e93800c58
Test: m
2018-10-27 21:46:19 +00:00
Colin Cross
84f0a11205 Use protoc-gen-javalite for java lite protos
Protobuf 3.5.2 does not natively support lite protos, instead they
are generated by the protoc-gen-javalite plugin compiled from
external/protobuf-javalite.

Bug: 117607748
Test: m checkbuild
Change-Id: I166d55111435762f099503db83c1a658f78e98e9
2018-10-26 23:57:26 -07:00
Colin Cross
615212e1a2 Remove host- prefix from protobuf libraries
Test: m checkbuild
Change-Id: I3e7e5f22a5becd2f37db89b6681ff21737b29267
2018-10-26 23:55:49 -07:00
Treehugger Robot
df45f28a82 Merge "Really mark sdk_addon as PHONY to fix m snod" 2018-10-27 00:28:23 +00:00
Yifan Hong
779dc30020 Merge changes from topic "dpgroup"
* changes:
  Add dynamic partition info to target files
  BOARD_{GROUP}_SIZE must not be empty.
  Add _a and _b to group names to super.
2018-10-26 18:23:53 +00:00
Dan Willemsen
ea898f1c53 Really mark sdk_addon as PHONY to fix m snod
When we're using a dont_bother_goals (including snod), we don't load
build/make/core/tasks/*.mk, so sdk_addon isn't defined as a PHONY rule.

This causes a build break because build/make/core/Makefile uses
dist-for-goals with sdk_addon. dist-for-goals requires its arguments to
be PHONY targets.

Test: m snod
Change-Id: I69937fe9360be57766d17ed4c28b5d2a1e348308
2018-10-26 11:17:25 -07:00
Paul Hobbs
27ec8b868e Merge "Revert "Revert^2: Change command-line flags of hiddenapi"" 2018-10-26 17:22:35 +00:00
Luman Qu
d8c427fbba Revert "Revert^2: Change command-line flags of hiddenapi"
This reverts commit e9540386e2.

Reason for revert: Caught by droidcop https://b.corp.google.com/issues/118481351

Change-Id: I66e45ef5a84d63682e5c33c9aa1e708160606611
2018-10-26 16:53:09 +00:00
Treehugger Robot
43930504e1 Merge "Mark BUILD_NUMBER as obsolete, more vars as readonly" 2018-10-26 15:42:36 +00:00
David Brazdil
6d0b0f6103 Merge "Revert^2: Change command-line flags of hiddenapi" 2018-10-26 09:19:23 +00:00
Colin Cross
e0006c91ca Merge "Pass privileged dexpreopt module configuration to Soong" 2018-10-26 00:00:12 +00:00
Yifan Hong
07d3d79e6e Add dynamic partition info to target files
Test: builds and manual inspect
Bug: 117182932
Change-Id: Ic84860d976d18ef7aa8d050fd1118d1e75a0456d
2018-10-25 16:23:42 -07:00
Yifan Hong
a50b5e34a4 BOARD_{GROUP}_SIZE must not be empty.
Otherwise, OTA generation will fail.
Test: OTA generation
Test: do not define it, build error

Change-Id: I63da80bd35d1982db0510428560727c759212771
2018-10-25 16:23:42 -07:00
Yifan Hong
16a07e1806 Add _a and _b to group names to super.
For A/B devices, append slot suffix to dynamic
partition group names. This ensures that during an
update, partitions from target slot doesn't take
more than half of the super partition.

Test: flash and lpdump
Bug: 111610495
Change-Id: I07a082b67d0f9faada150c7ac3527eb737a81655
2018-10-25 16:23:42 -07:00
David Brazdil
e9540386e2 Revert^2: Change command-line flags of hiddenapi
Change command-line flags of hiddenapi

The `hiddenapi` build tool now reads a dex file from one filename
and writes a modified dex file to another. Change the build rule
to reflect it.

This reverts commit 5381eb684e.

Test: m
Change-Id: I8d37935c5ea381348278ec668d474f6ffb8e8411
2018-10-25 17:25:23 +00:00
Treehugger Robot
1bc81731c8 Merge "build_image: improvements to right size for dynamic partitions" 2018-10-25 15:25:49 +00:00
Treehugger Robot
73b998ad2e Merge "Revert "ATest: GTest auto gen config support run-test-as."" 2018-10-25 08:53:24 +00:00
Bill Yang
a8fcf6c893 Revert "ATest: GTest auto gen config support run-test-as."
This reverts commit fab820c5f1.

Reason for revert: sed -i requires an argument on mac, break build on mac.

Change-Id: I0b72e28968072afbbb862bd827ee59764dd8a0be
2018-10-25 07:11:26 +00:00
Victor Hsieh
e53dd7b20b Allow target to specify LOCAL_PREFER_INTEGRITY
The option will:
 - Produce APK with uncompressed dex
 - Declare to prefer integrity in manifest

Test: unzip -vl, dex compression looks correct with the option provided
      or not.
Test: similarly, aapt dump correct attribute
Bug: None

Change-Id: I16b9a37255150c2ad84af84087dfabb536a3b07a
2018-10-24 11:40:07 -07:00
Colin Cross
aefeae367e Merge "Reduce the propagation of LOCAL_DEX_PREOPT := nostripping" 2018-10-24 16:47:12 +00:00
Treehugger Robot
2fc5669b62 Merge "ATest: GTest auto gen config support run-test-as." 2018-10-24 13:53:50 +00:00
David Brazdil
5381eb684e Revert "Change command-line flags of hiddenapi"
This reverts commit 6b00bfd2fb.

Reason for revert: marlin running out of space

Exempted-From-Owner-Approval: Needed to unblock build, no
  buildcops on call in EMEA today.
Change-Id: I9e86545c8ada2523bc21116c6e958f69fb94dc26
2018-10-24 12:37:41 +00:00
David Brazdil
7658657ee4 Merge "Change command-line flags of hiddenapi" 2018-10-24 09:19:00 +00:00
Colin Cross
3aa2f8f69b Pass privileged dexpreopt module configuration to Soong
Pass DONT_UNCOMPRESS_PRIV_APPS_DEXS, PRODUCT_LOADED_BY_PRIVILEGED_MODULES,
DEX_PREOPT_DEFAULT, and WITH_DEXPREOPT to Soong so it can determine when
to store uncompressed dex files in APKs and when to strip them.

Also convert DEXPREOPT.$(TARGET_PRODUCT).$(LOCAL_MODULE).CONFIG=disabled
to a DEXPREOPT_DISABLED_MODULES list, and export it to Soong.

Test: m checkbuild
Change-Id: I8652032d4b9f5d2e119e73acdf91b8148563eedd
2018-10-23 22:33:07 -07:00
Colin Cross
fc782ad949 Reduce the propagation of LOCAL_DEX_PREOPT := nostripping
nostripping causes confusing double negatives, allow nostripping
in LOCAL_DEX_PREOPT and DEFAULT_DEX_PREOPT, but convert to
LOCAL_STRIP_DEX outside of dex_preopt_odex_install.mk.

Test: m checkbuild
Change-Id: I996e9258ce20c394900d9fe937d638bc2ab8589d
2018-10-23 22:33:07 -07:00
Mark Salyzyn
780f595fac build_image: improvements to right size for dynamic partitions
If partition_reserved_size is 0 or undefined, and
use_dynamic_partition_size is true, we should approach no space
and no free inodes automatically.

Estimate the space and number of inodes required, then do a first
pass build to see how much space actually used, and use those values
to refine the estimate.

Depends on tune2fs to report the characteristics of the filesystem,
so only support for ext filesystems.  In the future if there has to
be a more generic ability, either a tool per a filesystem has to be
found, or we will need root capabilities to mount the filesystem to
acquire the characteristics live from the host system.

Test: manual + python -m unittest test_build_image
Bug: 111302946
Change-Id: I933a388be43516b6de7b5007b296765bd5556fde
2018-10-23 15:14:00 -07:00