diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2020-02-04 18:55:06 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2020-02-04 18:55:06 +0000 |
| commit | 418fa86dd465b4fd8394373cf83db8fa65d7611c (patch) | |
| tree | 32c7b846eb5e9c7506c7026b80125628e0e6f498 /tests/docker/docker.py | |
| parent | 7bd9d0a9e26c7a3c67c0f174f0009ba19969b158 (diff) | |
| parent | 68e5b85e41fe7684e58cd077772b7d1e8bc092c7 (diff) | |
| download | focaccia-qemu-418fa86dd465b4fd8394373cf83db8fa65d7611c.tar.gz focaccia-qemu-418fa86dd465b4fd8394373cf83db8fa65d7611c.zip | |
Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-040220-1' into staging
Testing updates and build fixes: - move more cross compilers to buster - fix build breakage (hppa Kconfig) - disable docs on shippable - build docs under bionic with python3 - travis.yml re-factoring - check capabilities of non-docker compilers - smarter make -j parallelism # gpg: Signature made Tue 04 Feb 2020 17:16:40 GMT # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-testing-040220-1: .travis.yml: ensure python3-sphinx installed for docs .travis.yml: single thread build-tcg .travis.yml: drop cris-linux-user from the plugins test .travis.yml: drop the travis_retry from tests .travis.yml: introduce TEST_BUILD_CMD and use it for check-tcg tests/tcg: gate pauth-% tests on having compiler support tests/tcg: add a configure compiler check for ARMv8.1 and SVE .travis.yml: probe for number of available processors .travis.yml: move cache flushing to early common phase .travis.yml: build documents under bionic .travis.yml: Add description to each job .travis.yml: Drop superfluous use of --python=python3 parameter .shippable: --disable-docs for cross-compile tests travis.yml: Install genisoimage package tests/docker: better handle symlinked libs tests/docker: move most cross compilers to buster base Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/docker/docker.py')
| -rwxr-xr-x | tests/docker/docker.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 31d8adf836..d8268c1111 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -106,18 +106,19 @@ def _get_so_libs(executable): """Return a list of libraries associated with an executable. The paths may be symbolic links which would need to be resolved to - ensure theright data is copied.""" + ensure the right data is copied.""" libs = [] - ldd_re = re.compile(r"(/.*/)(\S*)") + ldd_re = re.compile(r"(?:\S+ => )?(\S*) \(:?0x[0-9a-f]+\)") try: ldd_output = subprocess.check_output(["ldd", executable]).decode('utf-8') for line in ldd_output.split("\n"): search = ldd_re.search(line) - if search and len(search.groups()) == 2: - so_path = search.groups()[0] - so_lib = search.groups()[1] - libs.append("%s/%s" % (so_path, so_lib)) + if search: + try: + libs.append(s.group(1)) + except IndexError: + pass except subprocess.CalledProcessError: print("%s had no associated libraries (static build?)" % (executable)) @@ -145,7 +146,8 @@ def _copy_binary_with_libs(src, bin_dest, dest_dir): if libs: for l in libs: so_path = os.path.dirname(l) - _copy_with_mkdir(l, dest_dir, so_path) + real_l = os.path.realpath(l) + _copy_with_mkdir(real_l, dest_dir, so_path) def _check_binfmt_misc(executable): |