diff options
author | 2018-10-31 11:00:19 -0700 | |
---|---|---|
committer | 2018-11-06 10:34:35 -0800 | |
commit | 680cbf205f4560c22d96ed6f3296eb25125d99d6 (patch) | |
tree | 7e455c872744007bb04dcda59221d0288466d986 /libartbase/base/file_utils_test.cc | |
parent | 23d3ed8c124f239d26a583f9d096b22f7f6677d1 (diff) |
Enable building art and tests with linux_bionic
A linux_bionic built runtime can be created by modifying the
$OUT_DIR/soong/soong.config json file to add a '"Host_bionic": true'
entry and then running the following command:
% m --skip-make $OUT_DIR/soong/host/linux_bionic-x86/<target-file>
A script 'tools/build_linux_bionic_tests.sh' was also added that will
build linux-bionic versions of host-test related files.
Also modify tests so they can be run. Currently all run-tests pass
when run on a linux_bionic host build. All gtests pass except for the
following 9 tests:
ArmVIXLAssemblerTest.VixlJniHelpers
ArmVIXLAssemblerTest.VixlLoadFromOffset
ArmVIXLAssemblerTest.VixlStoreToOffset
DwarfTest.DebugFrame
DwarfTest.DebugFrame64
DwarfTest.x86_64_RegisterMapping
DwarfTest.DebugLine
DwarfTest.DebugLineSpecialOpcodes
DwarfTest.DebugInfo
Since these tests must be run manually without the standard
(makefile-based) testrunner it's not clear yet whether these failures
are important or what must be done to fix them. Several tests had
dependencies on the actual location of the libart library that needed
to be fixed, these tests might as well.
Test: ./tools/build_linux_bionic_tests.sh
Test: ./test/testrunner/testrunner.py --no-build --host --64 --run-test-option=--bionic
Test: find $OUT_DIR/soong/host/linux_bionic-x86/nativetest64 -mindepth 2 -type f | while read abc; do $abc; done | tee all-tests.txt
Test: tail -n +0 -f all-tests.txt | grep FAILED
Bug: 31559095
Bug: 118778408
Change-Id: I5fae4e54371e7410678619f18fcb54a3bd34e9b0
Diffstat (limited to 'libartbase/base/file_utils_test.cc')
-rw-r--r-- | libartbase/base/file_utils_test.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libartbase/base/file_utils_test.cc b/libartbase/base/file_utils_test.cc index f7c9c5e264..c9173076d1 100644 --- a/libartbase/base/file_utils_test.cc +++ b/libartbase/base/file_utils_test.cc @@ -83,11 +83,15 @@ TEST_F(FileUtilsTest, GetAndroidRootSafe) { ASSERT_EQ(0, unsetenv("ANDROID_ROOT")); std::string android_root3 = GetAndroidRootSafe(&error_msg); // This should be the same as the other root (modulo realpath), otherwise the test setup is - // broken. - UniqueCPtr<char> real_root(realpath(android_root.c_str(), nullptr)); + // broken. On non-bionic. On bionic we can be running with a different libart that lives outside + // of ANDROID_ROOT UniqueCPtr<char> real_root3(realpath(android_root3.c_str(), nullptr)); +#if !defined(__BIONIC__ ) || defined(__ANDROID__) + UniqueCPtr<char> real_root(realpath(android_root.c_str(), nullptr)); EXPECT_STREQ(real_root.get(), real_root3.get()); - +#else + EXPECT_STRNE(real_root3.get(), ""); +#endif // Reset ANDROID_ROOT, as other things may depend on it. ASSERT_EQ(0, setenv("ANDROID_ROOT", android_root_env.c_str(), /* overwrite */ 1)); |