Commit graph

41383 commits

Author SHA1 Message Date
Simran Basi
d63a8153da build/make: Add default suite for all native tests/benchmarks
Not all native tests have the "tests" tag so adjust the logic to be:
NATIVE_TESTS||NATIVE_BENCHMARKS||(APPS&&tags==tests)

Bug: 74339384
Test: Rebuilt module-info.json, verified native tests now have
      their suite set to null-suite and have auto_test_config=True
      Double checked a frameworks App unittest as well.

Change-Id: Idea00adcebfc1a78b0c6d8ade40feddb1e90ed83
2018-03-07 12:36:55 -08:00
Treehugger Robot
f99efebc75 Merge "Add ld.config.txt for wearables" 2018-03-07 07:55:40 +00:00
Justin Yun
61c412ed05 Add ld.config.txt for wearables
When BOARD_VNDK_VERSION is set, the required VNDK libs for vendor
modules are installed in vndk directory.
The default namespace configuration cannot reach those directories
and fails to link the required libs.
By installing ld.config.txt, the namespace configurations for each
build target will be selected automatically. This does not affect
the devices that requires default namespace configurations.

Bug: 74242105
Test: lunch sdk_gwear_x86-userdebug; make -j; emulator
Change-Id: Ib1097846fcd9c123184b13b6fbcfcb9a72ca3d97
2018-03-07 13:27:24 +09:00
Tao Bao
737bc2b082 Merge "releasetools: Separate streaming metadata computation into functions." 2018-03-07 04:24:13 +00:00
Treehugger Robot
1ac4e3c424 Merge "Conditionally generate META/boot_filesystem_config.txt." 2018-03-06 23:32:40 +00:00
Treehugger Robot
0d6a25c73f Merge "Clarify error message for bootclasspath whitelist." 2018-03-06 18:24:11 +00:00
Anton Hansson
53876001bf Merge "Add more control to the java sdk enforcement." 2018-03-06 11:19:38 +00:00
Tao Bao
f5110498c0 releasetools: Separate streaming metadata computation into functions.
And add unittests for ComputeStreamingMetadata().

This prepares for the changes that add additional property-files (for
both of A/B and non-A/B).

Bug: 74210298
Bug: 72751683
Test: python -m unittest test_ota_from_target_files
Test: Generate A/B OTA package. Check the ota-streaming-property-files
      in the METADATA entry.
Change-Id: Ib4b069f61c2c06c035c0cff73a55112f3936b969
2018-03-06 00:06:23 -08:00
Treehugger Robot
9d08769406 Merge "Fix the incorrect turbine flag." 2018-03-06 01:22:39 +00:00
Nan Zhang
78c19aa9ef Fix the incorrect turbine flag.
Test: m -j java TURBINE_ENABLED=false
Change-Id: Id6ca380c97bbcd3731c815e37513b7e949cccdfb
2018-03-05 13:35:45 -08:00
Treehugger Robot
8d36d4b8ea Merge "Remove ApiDemos and other packages modules in /data/app" 2018-03-04 01:04:27 +00:00
Weilun Du
1eb1568ce3 Remove ApiDemos and other packages modules in /data/app
Since API 27, PackageManager would not install random APKs that reside
in /data/app folder. They must be explicitly installed by "adb install"
instead.

BUG: 72750759
Change-Id: Ibc8e4e55e020439f5cf950d61fb7a815aa12fa6f
Signed-off-by: Weilun Du <wdu@google.com>
2018-03-04 00:37:57 +00:00
Tao Bao
395bf274b8 Merge "releasetools: Fix a mismatching close." 2018-03-02 23:32:11 +00:00
Treehugger Robot
903be914bb Merge "releasetools: Call Cleanup() in check_target_files_signatures.py." 2018-03-02 22:06:57 +00:00
Tao Bao
a652c00c8e releasetools: Fix a mismatching close.
There's a mismatch in WriteABOTAPackageWithBrilloScript().

  temp_zip_file = tempfile.NamedTemporaryFile()
  ...
  common.ZipClose(temp_zip_file)

It's benign since common.ZipClose() happens to be calling
"temp_zip_file.close()". This CL moves the use of tempfile to
common.MakeTempFile(), so that the tempfile will be cleaned up
automatically as part of the call to common.Cleanup(). (Not fixing the
close() directly, since the nearby lines will be refactored into another
function shortly.)

Also remove one assert in the same function, which trivially holds in
the current code.

Test: Generate an A/B OTA.
Change-Id: I53b375d1150820de718dec0ead55abf5f4951071
2018-03-02 13:20:43 -08:00
Jayant Chowdhary
1fa15d7491 Merge "Collect all lsdump paths and write them to $(OUT_DIR)." 2018-03-02 17:34:33 +00:00
Treehugger Robot
5c93279fbe Merge "releasetools: Don't return ZipFile from common.UnzipTemp()." 2018-03-01 22:21:25 +00:00
Treehugger Robot
e706929161 Merge "Build: Add some dex2oat boot image error message" 2018-03-01 20:46:05 +00:00
Treehugger Robot
16596052cb Merge "Build: Factor out ANDROID_LOG_TAGS" 2018-03-01 19:50:05 +00:00
Tao Bao
da01b211f8 Conditionally generate META/boot_filesystem_config.txt.
if BOARD_BUILD_SYSTEM_ROOT_IMAGE != true:  # case A
  - BOOT/RAMDISK corresponds to the / under normal boot, with matching
    fs_config in META/boot_filesystem_config.txt.
  - RECOVERY/RAMDISK corresponds to the / under recovery, with fs_config
    in META/recovery_filesystem_config.txt.
else:
  if BOARD_USES_RECOVERY_AS_BOOT == true:  # case B
    - ROOT/ corresponds to the / under normal boot, with fs_config in
      META/root_filesystem_config.txt.
    - BOOT/RAMDISK corresponds to the / under recovery, with fs_config
      in META/boot_filesystem_config.txt.
  else:  # case C
    - ROOT/ corresponds to the / under normal boot, with fs_config in
      META/root_filesystem_config.txt.
    - RECOVERY/RAMDISK corresponds to the / under recovery, with fs_config
      in META/recovery_filesystem_config.txt.
    - BOOT/RAMDISK doesn't exist.

This CL fixes case C, where we shouldn't try to generate
'META/boot_filesystem_config.txt' for BOOT/RAMDISK. It wouldn't be fatal
without this fix, but would wrongly scan the current directory and
include a large fs_config output into target-files.zip.

Bug: 72731506
Test: `lunch aosp_bullhead-userdebug` and `m dist`. (case A)
Test: `lunch aosp_marlin-userdebug` and `m dist`. (case B)
Test: Define 'BOARD_BUILD_SYSTEM_ROOT_IMAGE := true' for angler. `m
      dist` and check the generated target-files.zip. (case C)
Change-Id: I5582ce8cca464d535af0718be0fd8e65791bd6c2
2018-03-01 10:53:38 -08:00
Tao Bao
767543a659 releasetools: Call Cleanup() in check_target_files_signatures.py.
Also minor cleanups to make it pylint clean.

Test: Run check_target_files_signatures.py with a target-files.zip.
Test: pylint --rcfile=pylintrc check_target_files_signatures.py
Change-Id: Ife3b54c7805c2f2562e87e91ab4b4de355782012
2018-03-01 10:12:39 -08:00
Tao Bao
dba59eeabd releasetools: Don't return ZipFile from common.UnzipTemp().
In addition to the unzipping work, common.UnzipTemp() kindly bundles an
open ZipFile object as part of the return value. It doesn't look very
helpful to the callers though. It also looks less obvious that the
caller needs to properly close the handle (missing the close here is
benign though). This CL just removes the ZipFile object out of the
return value, and leaves the work to callers.

Test: `m dist` on both of A/B and non-A/B target.
Test: python -m unittest test_add_img_to_target_files
Test: python -m unittest test_common
Test: python -m unittest test_ota_from_target_files
Test: Check the callers to common.UnzipTemp() in code search.
Change-Id: Id47da3fd42a0e76d6ae8851f05780db319ee48cf
2018-03-01 10:03:31 -08:00
Andreas Gampe
5147749d1a Build: Add some dex2oat boot image error message
Typical failure case for boot image dex2oat is an inconsistent boot
classpath left over from incomplete build dependencies. Give advice
to run a top-level build.

Bug: 73749543
Test: m
Change-Id: I81c4ce9d02b2b360fe867b594d0a2b21c763e473
2018-03-01 08:47:44 -08:00
Andreas Gampe
fc2fefcd83 Build: Factor out ANDROID_LOG_TAGS
Factor out ANDROID_LOG_TAGS for boot image compilation. Do not use
the setting when ART_BOOT_IMAGE_EXTRA_ARGS is set.

Bug: 73749543
Test: m
Test: ART_BOOT_IMAGE_EXTRA_ARGS="--runtime-arg -verbose:verifier" m art-boot-image
Change-Id: Ia599381991f74f243fee966184715b0172742e78
2018-03-01 08:47:44 -08:00
Anton Hansson
f5f29aa976 Add more control to the java sdk enforcement.
I plan on turning the error on for APPS in AOSP soon, and in preparation for
that I'm introducing a finer granularity of warning/error control.

Also add an almost-empty whitelist, which will likely need to be expanded
in the future.

Bug: 73535841
Test: make
Change-Id: I2fc6700a504b7af50aa7bde727047bc56b167937
2018-03-01 14:28:47 +00:00
Treehugger Robot
01670eb141 Merge "emulator: use 4.4 kernel for x86 and x86_64" 2018-03-01 05:28:50 +00:00
Treehugger Robot
690aaa95ad Merge "Change name of droiddoc target output to *-stubs.srcjar" 2018-03-01 02:06:54 +00:00
Jayant Chowdhary
67e0cc5d63 Collect all lsdump paths and write them to $(OUT_DIR).
$(OUT_DIR)/target/product/$(TARGET_DEVICE)/lsdump_paths.txt will contain all
.lsdump paths relative to $(ANDROID_BUILD_TOP). This helps faster lookup while
running scripts to generate reference dumps.

Test: m -j findlsdumps for aosp_arm64_ab.
      $OUT_DIR/lsdump_paths/generic_arm64_ab/paths.txt has paths to lsdump files
      generated for the build.

Test: m -j findlsdumps for aosp_arm_ab.
      $OUT_DIR/target/product/generic_arm_ab/lsump_paths.txt has paths to
      lsdump files generated for the build.

Change-Id: Iab1640f57bf9d0af5e88e6dda64a610fedcbe87e
2018-02-28 16:29:51 -08:00
Nan Zhang
9c98cb4815 Change name of droiddoc target output to *-stubs.srcjar
Test: m -j core-docs
Bug: b/70351683
Change-Id: I3fa696517175764b64a3b66d25ab04f02e561e51
2018-02-28 16:11:47 -08:00
Treehugger Robot
cacaf6ba6e Merge "Build: Silence patchoat" 2018-02-28 23:36:26 +00:00
Treehugger Robot
a7a5e15f72 Merge "releasetools: Move one case of mkdtemp() to common.MakeTempDir()." 2018-02-28 21:07:51 +00:00
bohu
856954ca6a emulator: use 4.4 kernel for x86 and x86_64
BUG: 72886167

Test: build aosp_x86 and aosp_x86_64
emulator boots complete

Change-Id: I388a775fe50ca60c938b097faf6bf4296d5c9a54
2018-02-28 11:41:41 -08:00
Tao Bao
04bce3a696 releasetools: Move one case of mkdtemp() to common.MakeTempDir().
This should be the last case to be moved over.

Test: Generate an incremental BBOTA (which exercises the changed code).
Test: `rgrep mkdtemp` gives no more instance.
Change-Id: I76db069476201cdfaf3a2de9d9635dfe54507f7a
2018-02-28 11:13:29 -08:00
Treehugger Robot
39acbe6446 Merge "Add board name for emulator" 2018-02-28 18:33:15 +00:00
Jeff Gaston
c4343864ed Merge "Clearer error if module doesn't declare any source files" 2018-02-28 16:26:36 +00:00
Andreas Gampe
10c86d588e Build: Silence patchoat
Move it to only log error-level messages, similar to dex2oat.

Test: m
Change-Id: I2884fa19aa084ac2f4cb115b0600dbe061685266
2018-02-27 20:38:00 -08:00
Treehugger Robot
08e604e741 Merge "Revert "Revert "Better error for missing LOCAL_SRC_FILES in prebuilts""" 2018-02-28 03:07:21 +00:00
Yahan Zhou
12b5395c2f Add board name for emulator
VTS checks for ro.product.board before running. Emulator does not have
that value and causes an exception.

So let's add it to the emulator and call it goldfish_$(TARGET_ARCH).

BUG: 73741117
Test: vts-tradefed run vts, should run the tests
Change-Id: I6b00f2923bc9609d4d05c45d47ceddd2bd7be091
2018-02-27 18:11:48 -08:00
Jeff Gaston
960acf1b88 Clearer error if module doesn't declare any source files
Bug: 72552006
Test: Make a module with no source files,
      run `m -j nothing`, notice that the error tells
      which module has no sources

Change-Id: Ib169e7b3cb86d840a3acd644e42cd1f9f65e1304
2018-02-27 20:52:53 -05:00
Dan Willemsen
926ee44603 Revert "Revert "Better error for missing LOCAL_SRC_FILES in prebuilts""
This reverts commit f78069865b.

Reason for revert: fixed mips

Bug: 73904572
Test: lunch aosp_mips-eng; m nothing
Change-Id: I4f51f91210f1d78ec97e450ac6e0509797c62bb9
2018-02-27 23:32:49 +00:00
Dan Willemsen
e752292f26 Merge "Revert "Better error for missing LOCAL_SRC_FILES in prebuilts"" 2018-02-27 23:17:43 +00:00
Dan Willemsen
f78069865b Revert "Better error for missing LOCAL_SRC_FILES in prebuilts"
This reverts commit 8d5dc6be57.

Reason for revert: broke mips targets

Change-Id: Ib8cb21e6d480b0745911efeba1f23932ddc7c2f8
2018-02-27 23:16:12 +00:00
Dan Willemsen
3279e0c267 Merge "Better error for missing LOCAL_SRC_FILES in prebuilts" 2018-02-27 22:19:49 +00:00
Tao Bao
6e2a8ae094 Merge "releasetools: Remove the unneeded 'prefix' parameters." 2018-02-27 22:13:06 +00:00
Treehugger Robot
7889d64db2 Merge "core_base: Remove duplicated Wifi modules from PRODUCT_PACKAGES" 2018-02-27 21:47:23 +00:00
Dan Willemsen
76d45d8ddf Merge "Remove some uses of export/unexport" 2018-02-27 21:22:20 +00:00
Tao Bao
886d883d61 releasetools: Remove the unneeded 'prefix' parameters.
... from the following functions in add_img_to_target_files.py.

  AddSystem
  AddSystemOther
  AddVendor
  AddProduct
  AddDtbo
  AddUserdata
  AddVBMeta
  AddPartitionTable
  AddCache

The last user of the parameter in img_from_target_files.py has been
removed in commit 2bb109709a (in O).

Test: pylint --rcfile=pylintrc add_img_to_target_files.py
Test: Check all the callers to the above functions.
Test: m dist
Change-Id: I551d1683def8f8535062fc90f68dafa0f4252822
2018-02-27 11:47:11 -08:00
Treehugger Robot
d6fa5bbc51 Merge "remove nnk from OWNERS" 2018-02-27 19:04:47 +00:00
Nick Kralevich
0aa64275e8 remove nnk from OWNERS
See https://android-review.googlesource.com/c/platform/system/sepolicy/+/626014

Also remove klyubin who is no longer at Google.

Test: none
Change-Id: I98534c0cc676e41129b73331ad0e71e7fc1aa1ab
2018-02-27 09:15:10 -08:00
Treehugger Robot
3d4fb4e335 Merge "Make mksquashfs generate a fs_config-friendly root entry" 2018-02-27 16:24:21 +00:00