Commit graph

11341 commits

Author SHA1 Message Date
Dan Willemsen
d07ba4e2a6 Implement LOCAL_TEST_DATA to ship data with tests
This can be used to ship source data as test artifacts next to native
tests. It works for both local builds and the test bundles using
package_modules.mk.

You just specify a file list relative to the local directory, and those
files will be copied next to the executable under
/data/nativetest*/<module>/...:

  LOCAL_MODULE := mytest
  LOCAL_TEST_DATA := data/file1 file2

  /data/nativetest/mytest/mytest
  /data/nativetest/mytest/data/file1
  /data/nativetest/mytest/file2

If the data is in another directory, you may also specify a different
prefix for the source files:

  LOCAL_TEST_DATA := external/skia:resources/f.xml

  /data/nativetest/skia_test/resources/f.xml

And there's a new convenience macro to find a list of files in this
format:

  LOCAL_TEST_DATA := $(call find-test-data-in-subdirs,external/skia,"*.xml",resources)

I'll expand this to native benchmarks and fuzz tests in a later change,
since they don't have their own module classes yet.

Bug: 30564705
Test: m -j minikin_tests; ls $OUT/data/nativetest*/minikin_tests
Test: m -j continuous_native_tests dist; zipinfo -1 out/dist/*continuous_native_tests*.zip
Change-Id: Ic76a7b62e7f567f259c4ab1510ee97d26600ba9a
2016-12-13 17:18:36 -08:00
Dan Willemsen
e26036ad5e Merge "Sort and reorganize clear_vars.mk to make merges easier" 2016-12-13 22:22:59 +00:00
Dan Willemsen
d78d6c9fc0 Sort and reorganize clear_vars.mk to make merges easier
Moved common variables from other sections back to the common section,
then sort each section.

Test: build-aosp_angler.ninja is identical before/after
Change-Id: Ibb75935205aa80aaa392c358f8d0599ba624f90d
Merged-In: Ibb75935205aa80aaa392c358f8d0599ba624f90d
2016-12-13 21:14:25 +00:00
Paul Duffin
e28eb9ff0e Merge "Use legacy-test instead of core-junit" 2016-12-13 09:34:17 +00:00
Treehugger Robot
d1b10b20f6 Merge "Fix PDK dupbuild issues" 2016-12-10 07:14:12 +00:00
Dan Willemsen
e0bba6fa12 Fix PDK dupbuild issues
The PDK uses pattern rules in order to install files from the PDK. When
those files already have build rules, the explicit rules override the
pattern rules, and everything works. But because Make (and Kati) doesn't
attempt to clean the file paths, if one of the rules has a redundant /,
we'll export two ninja rules, and ninja will error out with a dupbuild
error.

The PDK pattern rules are clean, but the explicit notice file creation
was not, it was always adding a double // in between NOTICE_FILES/src
and the module path.

Some modules were also setting a LOCAL_MODULE_PATH with a trailing /,
which is redundant, and also hits the above problem. Instead of fixing
all of the modules, just strip a trailing / from my_module_path.

Bug: 33451638
Test: Build with a PDK
Change-Id: Iff3e98fd191ea90626b9b89f179537e8a75f5ef2
2016-12-09 21:15:41 -08:00
Colin Cross
d76e2e63ae Add more module targets for host, host-cross, host32, host64
Previously, clang-host would build the clang module for 32-bit and
64-bit for the host and for windows.  Make clang-host only compile
for host, and add clang-host-cross for windows.  Also add targets
that only build 32-bit or 64-bit: clang-host32, clang-host64,
clang-host-cross32, clang-host-cross64, clang-target32, and
clang-target64.

Test: inspect build.ninja
Change-Id: I7676f9497dfc852f2a0255dda8da06c88eec0db8
2016-12-09 13:08:27 -08:00
Paul Duffin
5bf0587461 Use legacy-test instead of core-junit
The core-junit library has been replaced with the legacy-test
library. The latter included everything that was in core-junit
plus some android.test classes that were in frameworks.

Bug: 30188076
Test: make checkbuild
Change-Id: Id2ba827705dbd2c27a1183e1153b03c11a8a4074
2016-12-09 15:21:45 +00:00
Colin Cross
3753e8a335 Pass eng product varible to soong
Test: mmma -j frameworks/compile/libbcc
Change-Id: I79a903528948b728f730385a9de5e431617ff257
2016-12-08 10:05:55 -08:00
Treehugger Robot
6d4123aeb8 Merge "Build: Skip JNI lib symlink in second-stage build" 2016-12-07 17:35:53 +00:00
Patrick Tjin
a1900841bb build_image: add support for specifying number of inodes
Add support for specifying number of inodes when creating
system, vendor, oem partitions.  These are all read-only
and have no use for extra inodes.  Removing extra inodes
saves a lot of space.

Bug: 32246383
Change-Id: I13f1d4614b64a4abc752c42a1c65d3d151481c21
(cherry picked from commit b59eca3586)
2016-12-06 21:07:23 -08:00
Treehugger Robot
52897d4ecb Merge "custom_image: fix build break" 2016-12-07 03:20:13 +00:00
Andreas Gampe
445553f4e7 Build: Skip JNI lib symlink in second-stage build
When creating a sanitized image, skip creating JNI library
symlinks in the second round.

Bug: 33279120
Test: m && m SANITIZE_TARGET=address & ls -l $OUT/system/app/NfcNci/lib/*
Change-Id: Ib5eace9a49eb8b693603ba5cc59e392d575c44e3
2016-12-06 17:56:29 -08:00
Benoit Lamarche
fcf364b15a Merge "Disable Jack's NNode cache"
am: 3c731228ba

Change-Id: Iea59e0c4cd0fa11277913d70a9de698565ae13fc
2016-12-06 15:54:45 +00:00
Benoit Lamarche
3c731228ba Merge "Disable Jack's NNode cache" 2016-12-06 15:47:35 +00:00
Benoit Lamarche
9e0d21d96b Disable Jack's NNode cache
Test: N/A
Bug: 33367537
Change-Id: Idf7a518dfcbf5665917465b1ae2f0e09f4532688
2016-12-06 15:00:03 +01:00
Benoit Lamarche
0e61b46673 resolve merge conflicts of e04c941 to stage-aosp-master
Change-Id: I92ca7c5a10532220031dc799ad8900c9b20dc6fe
2016-12-06 11:32:41 +01:00
Benoit Lamarche
e04c941668 Merge "Set platform min sdk for Jack to o-b1" 2016-12-06 10:16:26 +00:00
bowgotsai
0f72bca96b custom_image: fix build break
Fix build break caused by
https://android-review.googlesource.com/#/c/305575/.

Bug: 33358681
Test: make custom_images

Change-Id: I1ba7cf61491c8593b20bdac58e984f1928697b8c
2016-12-06 17:36:31 +08:00
Dan Willemsen
0deb783a52 Merge "Tell Soong about TARGET_COPY_OUT_VENDOR"
am: 47b0322534

Change-Id: I55ac26073caf34173f6c051f87e10b651c23589b
2016-12-06 03:32:05 +00:00
Treehugger Robot
47b0322534 Merge "Tell Soong about TARGET_COPY_OUT_VENDOR" 2016-12-06 03:27:01 +00:00
Dan Willemsen
55b1651181 Merge "Remove aidl, proto, objc from soong_problems"
am: bbc072f716

Change-Id: Ifba3b1ebb0e9ca018495fc1f93104823d51a516e
2016-12-06 02:32:30 +00:00
Treehugger Robot
bbc072f716 Merge "Remove aidl, proto, objc from soong_problems" 2016-12-06 02:28:36 +00:00
Dan Willemsen
f1e23b77f4 Merge "Soong now exports AIDL_CPP"
am: 06a2daac72

Change-Id: I704c568b71cd95c6a17545d6694095b72e5c097c
2016-12-06 02:25:36 +00:00
Treehugger Robot
06a2daac72 Merge "Soong now exports AIDL_CPP" 2016-12-06 02:20:40 +00:00
Dan Willemsen
c077871f68 Tell Soong about TARGET_COPY_OUT_VENDOR
So that it can properly install proprietary components in system/vendor/
or vendor/

Test: lunch aosp_arm-eng; m -j vulkan.default
Test: lunch aosp_flounder-eng; m -j vulkan.default
Change-Id: I98384d2b4f09c3b5de2ed04417880f366828234e
2016-12-05 17:46:30 -08:00
Dan Willemsen
a1c3183455 Remove aidl, proto, objc from soong_problems
We support these in Soong now, so stop marking them in soong_to_convert.

Test: Compare soong_to_convert.txt
Change-Id: I89befdfd8c4eaa04ab626d8be090765a1b879d8b
2016-12-05 16:38:14 -08:00
Dan Willemsen
32b283171e Soong now exports AIDL_CPP
So remove it here.

Test: mmma -j system/tools/aidl
Change-Id: Ia92ce6499881c1aec42900fcfdb4e790a67b62b5
2016-12-05 15:16:38 -08:00
The Android Automerger
ada51f3b8f Manually merge commit 'c13da91' into stage-aosp-master
* commit 'c13da91':
  Add support for creating ext4 images with mke2fs

BUG:33304034
2016-12-03 04:02:09 +00:00
Treehugger Robot
c13da91023 Merge "Add support for creating ext4 images with mke2fs" 2016-12-02 22:48:23 +00:00
Colin Cross
51c1eeefb3 Merge "Fix warning with AAPT2 and LOCAL_STATIC_ANDROID_LIBRARIES"
am: 1498712a6b

Change-Id: Iec7d58d837879bc4a63818d09881873f56d14779
2016-12-02 22:00:26 +00:00
Colin Cross
1498712a6b Merge "Fix warning with AAPT2 and LOCAL_STATIC_ANDROID_LIBRARIES" 2016-12-02 21:47:58 +00:00
Yohann Roussel
5360e0160b Set platform min sdk for Jack to o-b1
Test: m core-all
(cherry picked from commit 94acfe908b3e70cdd11920c92715ef06de7ed212)

Change-Id: I26a558677f2fa8ede09ad1ae7f31b786c4ba0a43
2016-12-02 08:36:24 +00:00
Paul Duffin
74f8ee05de Merge "Replace core-junit with legacy-test"
am: 32cc1f80e5

Change-Id: Id425eff2aaafdf8ad63bc66ef2d28f71d32d6e8b
2016-12-01 10:42:16 +00:00
Paul Duffin
6470f4fa99 Replace core-junit with legacy-test
m -j32 checkbuild cts droid
adb reboot bootloader
fastboot flashall -w
cts-tradefed run cts -m CtsLibcoreTestCases

Bug: 30188076
Test: As above
Change-Id: I2d49cb3c451cb265d026f9a700a61b3fc0d2ed82
2016-11-30 13:50:56 +00:00
Dan Willemsen
dc556b4bc0 Prohibit host modules from using LOCAL_COPY_HEADERS
am: 6e51ef61a7

Change-Id: Id7c80e4dba5a505a04ce47d459c0a525debc4d53
2016-11-29 20:42:37 +00:00
Dan Willemsen
323efd3035 Add basic VNDK support in Make
am: bab0fa6928

Change-Id: Ie2bc9062891b2f8000b1db471b27f58c74190e92
2016-11-29 20:42:32 +00:00
Dan Willemsen
28cf7d49ab Remove GLOBAL_LD_DIRS
am: e5836c4bb0

Change-Id: I6683ed19bff601075e82065c5c1dc783d62249b4
2016-11-29 20:42:26 +00:00
Colin Cross
fe10963496 Fix warning with AAPT2 and LOCAL_STATIC_ANDROID_LIBRARIES
Building with LOCAL_STATIC_ANDROID_LIBARIES and LOCAL_USE_APPT2
causes a warning:
build/core/package_internal.mk:143: Empty argument supplied to find-subdir-assets

Only call find-subdir-assets if my_res_dir is not empty.

Also improve the warning message to make it easier to find the module
that caused it.

Test: m -j
Change-Id: I9a71162c7e2ed82f64d6844baca256968ac77317
2016-11-29 11:12:56 -08:00
Dan Willemsen
6e51ef61a7 Prohibit host modules from using LOCAL_COPY_HEADERS
There are no users left, so remove all of this.

Test: lunch aosp_arm-eng; m -j native
Test: build/tools/kati_all_products.sh on aosp and internal master
Change-Id: I32f5c8b470a43dd203d7e20c192167630e4e6888
2016-11-28 13:46:17 -08:00
Dan Willemsen
bab0fa6928 Add basic VNDK support in Make
Add BOARD_VNDK_VERSION and LOCAL_USE_VNDK to specify the version of the
VNDK that will be used globally, and whether to use the VNDK on a module
basis.

If the board is using the VNDK:

* LOCAL_COPY_HEADERS may only be used by modules defining LOCAL_USE_VNDK
* LOCAL_USE_VNDK modules will compile against the NDK headers and stub
  libraries, but continue to use the platform libc++.
* LOCAL_USE_VNDK modules will not have the global includes like
  system/core/include, but it will use device-specific kernel headers.

This change does not attempt to enforce any linking constraints, that
will come in a later patch.

Test: out/build-aosp_arm.ninja is identical before/after
Change-Id: Icce65d4974f085093d500b5b2516983788fe2905
2016-11-28 13:46:17 -08:00
Dan Willemsen
e5836c4bb0 Remove GLOBAL_LD_DIRS
The last user of this was the NDK, which has been using full paths in
binary.mk. So remove it.

Test: lunch aosp_arm-eng; m -j native
Change-Id: Ida2523a2d19131ee3ef005edb3e5bcf830710b11
2016-11-28 13:46:17 -08:00
Tao Bao
3b35352e1b Makefile: Pack verity_verifier into otatools.zip.
am: 7f02f3413b

Change-Id: Ib9c73dd16016b582dbaf2c40ebfc9b20c1adabe3
2016-11-28 18:13:43 +00:00
Tao Bao
31543713fc Merge "Makefile: Pack verity_verifier into otatools.zip." 2016-11-28 18:04:04 +00:00
Tao Bao
7f02f3413b Makefile: Pack verity_verifier into otatools.zip.
verity_verifier is needed when verifying verity metadata.

Bug: 32173582
Test: `m otatools-package`
Change-Id: I63fdeb75cdca10ea38c1df978d64701acdd4c1db
2016-11-22 15:36:57 -08:00
Adrien Schildknecht
9a072cc0b0 Add support for creating ext4 images with mke2fs
We are investigating replacing make_ext4fs with the upstream tool mke2fs.
To mitigate the trouble that may arise if the new tool behave differently
compared to the old one, there will be a transition period.

Devices that want to use the new way of creating ext4 images can set the
variable "TARGET_USES_MKE2FS" to true in their BoardConfig.mk
By default, the build system will choose the old tool 'make_ext4fs'.

Test: m otapackage with TARGET_USES_MKE2FS={,false,true}
Change-Id: I282bcb9efe335a86c53986283090ca947d65c7f8
2016-11-18 17:06:29 -08:00
Dan Albert
6cac9ba834 Merge "Support LOCAL_SDK_VERSION := current for NDK."
am: c7d2fe614e

Change-Id: Ibf9a4ffa74f5d05f68bd34db908fe4e5a67fe173
2016-11-18 19:09:36 +00:00
Treehugger Robot
c7d2fe614e Merge "Support LOCAL_SDK_VERSION := current for NDK." 2016-11-18 19:04:40 +00:00
Dan Willemsen
676610e090 Merge "Use new -ninja flag to aidl-cpp"
am: 7d4c926ed7

Change-Id: I165926e0c23a8a9a7dd8f3e46956b53f53d7fc9f
2016-11-13 20:00:16 +00:00
Dan Willemsen
fb84281342 Use new -ninja flag to aidl-cpp
This make aidl-cpp write out a dep file that ninja parses correctly.

Test: Manually inspect ninja depfile
Change-Id: I4890a91eb29a6388e17b1ffac23a3dc0ffe6c212
2016-11-13 09:44:25 -08:00