Skip to content

Commit de24eda

Browse files
author
Steven Noonan
committed
Revert "travis-run-local: if qemu-static binaries are already there, don't replace them"
This reverts commit 80d8ecf. The registration needs to have the binary present for the -p option to work, and the qemu-user-foo binaries aren't present in the Docker guest filesystems, so we can't run there without the -p flag. Signed-off-by: Steven Noonan <[email protected]>
1 parent a3b0410 commit de24eda

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

.travis-run-local.py

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -90,41 +90,21 @@ def kill_and_wait():
9090
time.sleep(3)
9191
log.info("Container has exited.")
9292

93-
def needs_qemu_binaries():
94-
required_bins = [
95-
'/usr/bin/qemu-aarch64-static',
96-
'/usr/bin/qemu-ppc64le-static',
97-
'/usr/bin/qemu-s390x-static',
98-
]
99-
for filename in required_bins:
100-
if not os.path.exists(filename):
101-
log.warning("QEMU userspace emulation binary %s is missing, will use binary from multiarch image", filename)
102-
return True
103-
log.info("QEMU userspace emulation binary %s is present", filename)
104-
return False
105-
10693
def main():
10794
global log
10895
log = init_logging()
10996

11097
log.info("Parsing Travis configuration file")
11198
travis = read_travis_yml()
11299

113-
if needs_qemu_binaries():
114-
multiarch_image = 'multiarch/qemu-user-static:latest'
115-
else:
116-
multiarch_image = 'multiarch/qemu-user-static:register'
117-
118-
log.info("Will run image %s to enable support for foreign architecture containers", multiarch_image)
119-
120100
# Pull the images down first
121101
log.info("Pulling Docker images")
122-
docker_pull(multiarch_image)
102+
docker_pull('multiarch/qemu-user-static')
123103
pull_images(travis)
124104

125105
# Initialize system environment
126106
log.info("Preparing system to run foreign architecture containers")
127-
subprocess.run(['docker', 'run', '--rm', '--privileged', multiarch_image, '--reset', '-p', 'yes'], check=True)
107+
subprocess.run(['docker', 'run', '--rm', '--privileged', 'multiarch/qemu-user-static', '--reset', '-p', 'yes'], check=True)
128108

129109
# Run native tests first
130110
kill_and_wait()

0 commit comments

Comments
 (0)