Merge pull request #8479 from jtattermusch/run_python_aarch64_tests
Run python aarch64 tests on the CIpull/8528/head
commit
7956ad20d6
7 changed files with 90 additions and 8 deletions
@ -0,0 +1,26 @@ |
|||||||
|
#!/bin/bash |
||||||
|
# |
||||||
|
# Setup and configure qemu userspace emulator on kokoro worker so that we can seamlessly emulate processes running |
||||||
|
# inside docker containers. |
||||||
|
|
||||||
|
set -ex |
||||||
|
|
||||||
|
# show pre-existing qemu registration |
||||||
|
cat /proc/sys/fs/binfmt_misc/qemu-aarch64 |
||||||
|
|
||||||
|
# Kokoro ubuntu1604 workers have already qemu-user and qemu-user-static packages installed, but it's and old version that: |
||||||
|
# * prints warning about some syscalls (e.g "qemu: Unsupported syscall: 278") |
||||||
|
# * doesn't register with binfmt_misc with the persistent ("F") flag we need (see below) |
||||||
|
# |
||||||
|
# To overcome the above limitations, we use the https://github.com/multiarch/qemu-user-static |
||||||
|
# docker image to provide a new enough version of qemu-user-static and register it with |
||||||
|
# the desired binfmt_misc flags. The most important flag we need is "F" (set by "--persistent yes"), |
||||||
|
# which allows the qemu-aarch64-static binary to be loaded eagerly at the time of registration with binfmt_misc. |
||||||
|
# That way, we can emulate aarch64 binaries running inside docker containers transparently, without needing the emulator |
||||||
|
# binary to be accessible from the docker image we're emulating. |
||||||
|
# Note that on newer distributions (such as glinux), simply "apt install qemu-user-static" is sufficient |
||||||
|
# to install qemu-user-static with the right flags. |
||||||
|
docker run --rm --privileged multiarch/qemu-user-static:5.2.0-2 --reset --credential yes --persistent yes |
||||||
|
|
||||||
|
# Print current qemu reqistration to make sure everything is setup correctly. |
||||||
|
cat /proc/sys/fs/binfmt_misc/qemu-aarch64 |
@ -0,0 +1,13 @@ |
|||||||
|
#!/bin/bash |
||||||
|
# |
||||||
|
# This is the top-level script we give to Kokoro as the entry point for |
||||||
|
# running the "continuous" and "presubmit" jobs. |
||||||
|
|
||||||
|
set -ex |
||||||
|
|
||||||
|
# Change to repo root |
||||||
|
cd $(dirname $0)/../../.. |
||||||
|
|
||||||
|
kokoro/linux/aarch64/qemu_helpers/prepare_qemu.sh |
||||||
|
|
||||||
|
kokoro/linux/aarch64/test_python_aarch64.sh |
@ -0,0 +1,11 @@ |
|||||||
|
# Config file for running tests in Kokoro |
||||||
|
|
||||||
|
# Location of the build script in repository |
||||||
|
build_file: "protobuf/kokoro/linux/python_aarch64/build.sh" |
||||||
|
timeout_mins: 120 |
||||||
|
|
||||||
|
action { |
||||||
|
define_artifacts { |
||||||
|
regex: "**/sponge_log.xml" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
# Config file for running tests in Kokoro |
||||||
|
|
||||||
|
# Location of the build script in repository |
||||||
|
build_file: "protobuf/kokoro/linux/python_aarch64/build.sh" |
||||||
|
timeout_mins: 120 |
||||||
|
|
||||||
|
action { |
||||||
|
define_artifacts { |
||||||
|
regex: "**/sponge_log.xml" |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue