Convert bionic dlext test zips to Android.bp
Use cc_genrules to create the dlext test zips needed by the bionic
tests. The genrules aren't visible to Make, and so don't work with
the `required` property. Move all of the dependencies to `data_bins`,
`data_libs` or `data` for helper binaries, shared libraries or
genrule zip files respectively. The `data*` properties copy the
files into the same directory as a test, respecting the
`bionic-loader-test-libs` relative path specified by each, but
does not put each helper binary in its own subdirectory, so update
the paths in each of the tests.
Bug: 200872604
Test: atest CtsBionicTestCases
Test: atest bionic-unit-tests
Test: cts-tradefed run commandAndExit cts -m CtsBionicTestCases
Test: adb push $OUT/data/nativetest/bionic-unit-tests /data/nativetest/ && adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
Change-Id: Ic4257cb4104ff558326df2363730acd20464b051
diff --git a/tests/cfi_test.cpp b/tests/cfi_test.cpp
index 9a6ed9a..dd65a81 100644
--- a/tests/cfi_test.cpp
+++ b/tests/cfi_test.cpp
@@ -146,7 +146,7 @@
// cfi_test_helper exports __cfi_check, which triggers CFI initialization at startup.
TEST(cfi_test, early_init) {
#if defined(__BIONIC__)
- std::string helper = GetTestlibRoot() + "/cfi_test_helper/cfi_test_helper";
+ std::string helper = GetTestlibRoot() + "/cfi_test_helper";
chmod(helper.c_str(), 0755); // TODO: "x" lost in CTS, b/34945607
ExecTestHelper eth;
eth.SetArgs({ helper.c_str(), nullptr });
@@ -158,7 +158,7 @@
// at startup.
TEST(cfi_test, early_init2) {
#if defined(__BIONIC__)
- std::string helper = GetTestlibRoot() + "/cfi_test_helper2/cfi_test_helper2";
+ std::string helper = GetTestlibRoot() + "/cfi_test_helper2";
chmod(helper.c_str(), 0755); // TODO: "x" lost in CTS, b/34945607
ExecTestHelper eth;
eth.SetArgs({ helper.c_str(), nullptr });