diff options
author | Dan Albert <danalbert@google.com> | 2015-12-14 18:45:47 -0800 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2015-12-14 18:45:47 -0800 |
commit | 041260331d7e8e5e2f9a085f4bd0b4034befa0e0 (patch) | |
tree | ebed8a9c4026577c982a3530389194e6625beae1 /sources | |
parent | f6c836221bebe617a06f20f164e6207d469fa426 (diff) | |
download | ndk-041260331d7e8e5e2f9a085f4bd0b4034befa0e0.tar.gz |
Only do host test config when necessary.
Allows us to run the NDK tests without having ANDROID_HOST_OUT set.
Change-Id: I489d9058ed86eec6fe7c39d7f96268e5d58c42c2
Diffstat (limited to 'sources')
-rw-r--r-- | sources/cxx-stl/llvm-libc++/libcxx/test/libcxx/android/test/format.py | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/sources/cxx-stl/llvm-libc++/libcxx/test/libcxx/android/test/format.py b/sources/cxx-stl/llvm-libc++/libcxx/test/libcxx/android/test/format.py index 228272c18..18a89358a 100644 --- a/sources/cxx-stl/llvm-libc++/libcxx/test/libcxx/android/test/format.py +++ b/sources/cxx-stl/llvm-libc++/libcxx/test/libcxx/android/test/format.py @@ -18,19 +18,21 @@ class HostTestFormat(libcxx.test.format.LibcxxTestFormat): self.use_verify_for_fail = False self.executor = TimeoutExecutor(timeout, LocalExecutor()) - # We need to use LD_LIBRARY_PATH because the build system's rpath is - # relative, which won't work since we're running from /tmp. We can - # either scan `cxx_under_test`/`link_template` to determine whether - # we're 32-bit or 64-bit, scan testconfig.mk, or just add both - # directories and let the linker sort it out. I'm choosing the lazy - # option. - outdir = os.getenv('ANDROID_HOST_OUT') - libpath = os.pathsep.join([ - os.path.join(outdir, 'lib'), - os.path.join(outdir, 'lib64'), - ]) - default_env = {'LD_LIBRARY_PATH': libpath} - self.exec_env = default_env if exec_env is None else exec_env + if exec_env is None: + # We need to use LD_LIBRARY_PATH because the build system's rpath + # is relative, which won't work since we're running from /tmp. We + # can either scan `cxx_under_test`/`link_template` to determine + # whether we're 32-bit or 64-bit, scan testconfig.mk, or just add + # both directories and let the linker sort it out. I'm choosing the + # lazy option. + outdir = os.getenv('ANDROID_HOST_OUT') + libpath = os.pathsep.join([ + os.path.join(outdir, 'lib'), + os.path.join(outdir, 'lib64'), + ]) + self.exec_env = {'LD_LIBRARY_PATH': libpath} + else: + self.exec_env = exec_env class TestFormat(HostTestFormat): |