enable integration test on arm64 platform
Currently, integration test can't be done on arm64 platform due to several issues. Fix points: 1, add busybox.tar with arm64 format 2, add hello-world.tar with arm64 format Signed-off-by: Bin Lu <bin.lu@arm.com>
This commit is contained in:
parent
c4f49e2499
commit
604dbfbe12
|
@ -50,12 +50,13 @@ RUN mkdir -p /usr/src/criu \
|
||||||
|
|
||||||
# setup a playground for us to spawn containers in
|
# setup a playground for us to spawn containers in
|
||||||
ENV ROOTFS /busybox
|
ENV ROOTFS /busybox
|
||||||
RUN mkdir -p ${ROOTFS} \
|
RUN mkdir -p ${ROOTFS}
|
||||||
&& curl -o- -sSL 'https://github.com/docker-library/busybox/raw/a0558a9006ce0dd6f6ec5d56cfd3f32ebeeb815f/glibc/busybox.tar.xz' | tar xfJC - ${ROOTFS}
|
|
||||||
|
|
||||||
|
|
||||||
COPY script/tmpmount /
|
COPY script/tmpmount /
|
||||||
WORKDIR /go/src/github.com/opencontainers/runc
|
WORKDIR /go/src/github.com/opencontainers/runc
|
||||||
ENTRYPOINT ["/tmpmount"]
|
ENTRYPOINT ["/tmpmount"]
|
||||||
|
|
||||||
ADD . /go/src/github.com/opencontainers/runc
|
ADD . /go/src/github.com/opencontainers/runc
|
||||||
|
|
||||||
|
RUN . tests/integration/multi-arch.bash \
|
||||||
|
&& curl -o- -sSL `get_busybox` | tar xfJC - ${ROOTFS}
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
# Root directory of integration tests.
|
# Root directory of integration tests.
|
||||||
INTEGRATION_ROOT=$(dirname "$(readlink -f "$BASH_SOURCE")")
|
INTEGRATION_ROOT=$(dirname "$(readlink -f "$BASH_SOURCE")")
|
||||||
|
|
||||||
|
. ${INTEGRATION_ROOT}/multi-arch.bash
|
||||||
|
|
||||||
RUNC="${INTEGRATION_ROOT}/../../runc"
|
RUNC="${INTEGRATION_ROOT}/../../runc"
|
||||||
RECVTTY="${INTEGRATION_ROOT}/../../contrib/cmd/recvtty/recvtty"
|
RECVTTY="${INTEGRATION_ROOT}/../../contrib/cmd/recvtty/recvtty"
|
||||||
GOPATH="$(mktemp -d --tmpdir runc-integration-gopath.XXXXXX)"
|
GOPATH="$(mktemp -d --tmpdir runc-integration-gopath.XXXXXX)"
|
||||||
|
@ -14,7 +17,8 @@ BUSYBOX_IMAGE="$BATS_TMPDIR/busybox.tar"
|
||||||
BUSYBOX_BUNDLE="$BATS_TMPDIR/busyboxtest"
|
BUSYBOX_BUNDLE="$BATS_TMPDIR/busyboxtest"
|
||||||
|
|
||||||
# hello-world in tar format
|
# hello-world in tar format
|
||||||
HELLO_IMAGE="$TESTDATA/hello-world.tar"
|
HELLO_FILE=`get_hello`
|
||||||
|
HELLO_IMAGE="$TESTDATA/$HELLO_FILE"
|
||||||
HELLO_BUNDLE="$BATS_TMPDIR/hello-world"
|
HELLO_BUNDLE="$BATS_TMPDIR/hello-world"
|
||||||
|
|
||||||
# CRIU PATH
|
# CRIU PATH
|
||||||
|
@ -270,7 +274,7 @@ function setup_busybox() {
|
||||||
BUSYBOX_IMAGE="/testdata/busybox.tar"
|
BUSYBOX_IMAGE="/testdata/busybox.tar"
|
||||||
fi
|
fi
|
||||||
if [ ! -e $BUSYBOX_IMAGE ]; then
|
if [ ! -e $BUSYBOX_IMAGE ]; then
|
||||||
curl -o $BUSYBOX_IMAGE -sSL 'https://github.com/docker-library/busybox/raw/a0558a9006ce0dd6f6ec5d56cfd3f32ebeeb815f/glibc/busybox.tar.xz'
|
curl -o $BUSYBOX_IMAGE -sSL `get_busybox`
|
||||||
fi
|
fi
|
||||||
tar --exclude './dev/*' -C "$BUSYBOX_BUNDLE"/rootfs -xf "$BUSYBOX_IMAGE"
|
tar --exclude './dev/*' -C "$BUSYBOX_BUNDLE"/rootfs -xf "$BUSYBOX_IMAGE"
|
||||||
cd "$BUSYBOX_BUNDLE"
|
cd "$BUSYBOX_BUNDLE"
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash
|
||||||
|
get_busybox(){
|
||||||
|
case $(go env GOARCH) in
|
||||||
|
arm64)
|
||||||
|
echo 'https://github.com/docker-library/busybox/raw/23fbd9c43e0f4bec7605091bfba23db278c367ac/glibc/busybox.tar.xz'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo 'https://github.com/docker-library/busybox/raw/a0558a9006ce0dd6f6ec5d56cfd3f32ebeeb815f/glibc/busybox.tar.xz'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
get_hello(){
|
||||||
|
case $(go env GOARCH) in
|
||||||
|
arm64)
|
||||||
|
echo 'hello-world-aarch64.tar'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo 'hello-world.tar'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
Binary file not shown.
Loading…
Reference in New Issue