mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-04 18:10:18 +00:00
93f6a9b91b
Currently, at the time of 2020/03/11, testing on AArch64 is not supported in the upstream repository
36 lines
843 B
Bash
Executable File
36 lines
843 B
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
# Small script to run tests for a target (or all targets) inside all the
|
|
# respective docker images.
|
|
|
|
set -e
|
|
|
|
echo "${HOME}"
|
|
pwd
|
|
|
|
TARGET="${1}"
|
|
shift
|
|
|
|
echo "Building docker container for target $target"
|
|
|
|
# use -f so we can use ci/ as build context
|
|
image_tag=test-"$TARGET"
|
|
docker build -t "$image_tag" -f "ci/docker/${TARGET}/Dockerfile" ci/
|
|
mkdir -p target
|
|
|
|
set -x
|
|
|
|
docker run \
|
|
--rm \
|
|
--user "$(id -u)":"$(id -g)" \
|
|
--env CARGO_HOME=/cargo \
|
|
--env CARGO_TARGET_DIR=/checkout/target \
|
|
--volume "$(dirname "$(dirname "$(command -v cargo)")")":/cargo \
|
|
--volume "$(rustc --print sysroot)":/rust:ro \
|
|
--volume "$(pwd)":/checkout:ro \
|
|
--volume "$(pwd)"/target:/checkout/target \
|
|
--init \
|
|
--workdir /checkout \
|
|
"$image_tag" \
|
|
sh -c "HOME=/tmp PATH=\$PATH:/rust/bin exec cargo test --target ${TARGET} $@"
|