The MTE ELF note is intended to be added to all aarch64 test binaries.
This is already implemented for cc_test in soong, but we should also add
it to makefile-generated tests.
Bug: 156029370
Bug: 181133973
Test: atest CtsBionicTestCases on QEMU+MTE, observe previously-failing
tests will now succeed.
Test: m camera_client_test; readelf -t <snip>/camera_client_test | grep
memtag, make sure there's the elf note.
Change-Id: I2e7c4d1379ccdef04f05dd7aff675e6834d4799b
This reverts commit 224e103308.
Reason for revert: Build Breakage in git_pi-dev-plus-aosp/docs @5366136
make -j110 docs showcommands dist DIST_DIR=/buildbot/dist_dirs/git_pi-dev-plus-aosp-linux-docs/5366136 checkbuild
FAILED:
Dependencies in out found with no rule to create them:
out/target/product/generic/data/app/CtsVerifierTester/CtsVerifierTester.apk
out/target/product/generic/data/app/TradeFedTestApp/TradeFedTestApp.apk
out/target/product/generic/data/app/TradeFedUiTestApp/TradeFedUiTestApp.apk
15:53:46 stopping
and
make -j50 showcommands dist TARGET_PRODUCT=cf_x86_phone DIST_DIR=/buildbot/dist_dirs/git_master-linux-ndk_translation_all/5366149 ndk_translation_all
FAILED: ninja: 'out/target/product/vsoc_x86/data/nativetest/arm/arm_insn_tests_arm_static/arm_insn_tests_arm_static', needed by 'out/target/product/vsoc_x86/obj/PACKAGING/ndk_translation_tests_intermediates/arm_insn_tests_arm_static_result.xml', missing and no known rule to make it
15:55:38 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
Return Code: 2
Change-Id: Idf95ef2e06526a0a31690420c923207db627605f
1. A test can add a runtime dependent test module by just setting
LOCAL_REQUIRED_MODULES or LOCAL_TARGET_REQUIRED_MODULES. Then the dependent test
module will be copied to testcase folder.
2. Do not install to $(TARGET_OUT_DATA) for testcase
BUG: 117224272
Test: 1. (a) vi cts/tests/tests/text/Android.mk
(b) add LOCAL_REQUIRED_MODULES := CtsPrintTestCases
(c) m -j CtsTextTestCases
(d) Then, CtsPrintTestCases should also be built to testcase folder like below.
./target/product/generic_arm64/testcases/CtsPrintTestCases
Change-Id: I24ea3783486c54a05cfa9d3d0375b977afc230f8
We've had this in Soong for a while, but never supported it in Make.
Bug: 33819328
Test: Change LOCAL_GTEST on a module, check m -j ... showcommands
Change-Id: Id8f4b9908c82c05d9a986a38945b33bac578e991
The NDK gtest libs are always suffixed to simplify the make macro
that generates the test modules.
Bug: http://b/16574165
Change-Id: I1c9647e90aff2f1e9da4a88cad30199b1e423757
Now that the source trees all use NATIVE_TESTS for intermediate files
and generated sources, make it a requirement.
Change-Id: Id5718fabe63f6e8dde7981a6f0f5bd89e0ec7ee5
Host native tests have been getting installed into
out/host/linux-x86/bin/..., but this pollutes the bin directory with a
lot of poorly named tests. Also, to support 32-bit and 64-bit tests, we
need to have different names with different suffixes. This causes
problems when tests expect to be named something specific (like gtest).
It's also convenient to store test data next to the test itself.
So with this change, native tests will be installed in
out/host/linux-x86/nativetest[64]/$(LOCAL_MODULE)/$(LOCAL_MODULE_STEM)
just like target tests get installed into /data/nativetest[64].
Implement this using a new NATIVE_TESTS class, which is like
EXECUTABLES, but sets up the install path differently, and configures
the rpath to load shared libraries with the proper relative path.
LOCAL_MODULE_RELATIVE_PATH can be used to control the directory name, it
will default to $(LOCAL_MODULE). This way multiple related tests can be
grouped together.
Target native tests also use NATIVE_TESTS now, but nothing should change
other than LOCAL_MODULE_RELATIVE_PATH can be used.
Change-Id: I535e42b1a6b21c5b8d6a580aa2f944d2be35e27d
libgtest_main uses symbols from libgtest. If libgtest_main is linked
after libgtest, and the test .o files don't reference libgtest (which is
unlikely), then the libgtest .o files will be ignored and libgtest_main
won't be able to find its symbols from libgtest.
Change-Id: Ica3bc679bd9d14e9a3065be927f085cf52faab64
Now that the platforms stlport linked gtest is gone, we don't need the
logic for this any more. All platform tests will use libc++ (which has
been renamed to libgtest without a suffix).
Note that tests built with the NDK will still use stlport, but they
will use the NDK's stlport, not the platform's.
Bug: 15193147
Change-Id: Ifcb2489ed60c41e4ed028096b516c1ee643de907
Previously, code defaulted to using libstdc++ (which was GNU libstdc++
on the host, or Bionic's "libstdc++" on the target). Now we default to
libc++. The exception for this is when using mingw, because we cannot
build libc++ for mingw.
Change-Id: I68726fa26cdcb6263f17c838d3e859debd57fae1
Target tests weren't approrpiately using the libc++ gtest for
libc++_static, and the hosts tests were still using the old check.
Change-Id: I13813d5f09673b144b2dfead93eb81cb4bae0e34
To enable building with coverage, the environment variable
NATIVE_COVERAGE must be set to true.
Set `LOCAL_NATIVE_COVERAGE := true` to generate coverage information for
a given component.
This is currently not supported for clang (b/17574078, b/17583330).
If static library A is included in a binary B (dynamic or static
executable, or shared library), and A is built with coverage
information, B is required to link with libgcov.a. Since the make does
not offer a good way to track this dependency, link libgcov.a even if
LOCAL_NATIVE_COVERAGE is not set (but still guarded by NATIVE_COVERAGE).
This ensures that all of the libgcov dependencies will always be
resolved, and causes no change in the resulting binary if coverage is
not used.
Bug: 10134489
Change-Id: Id5a19f2c215e4be80e6eae27ecc19b582f2f6813
Preparing for migration from stlport to libc++. STL selection is done
with LOCAL_CXX_STL (valid values are default, none, libc++,
libc++_static, stlport, stlport_static, bionic).
The selection of the STL is as follows:
if LOCAL_CXX_STL == 'default'
ifdef LOCAL_SDK_VERSION
Use whatever STL the other NDK options have selected.
else
Use bionic's libstdc++ for target, GNU libstdc++ for host. This
is compatible with the existing build options.
endif
else
if LOCAL_CXX_STL == 'stlport'
Use stlport.
else if LOCAL_CXX_STL == 'libc++'
Use libc++.
else if LOCAL_CXX_STL == ''
Don't use any STL.
endif
endif
Bug: 15193147
Change-Id: If712ba0ae7908d8147a69e29da5c453a183d6540
Set up TARGET_IS_64_BIT and HOST_IS_64_BIT early so we don't need 2
mechanisms to judge if it's 64-bit build;
Remove the unnecessary 32-bit host variables.
Change-Id: I08d6d4d9ea70f91135fe2ee05463fb9a0d1cee42