Skip to content

Commit

Permalink
Use app build container for building test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Dec 8, 2023
1 parent 8fab0ca commit 1e09e14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 0 additions & 6 deletions test/Dockerfile

This file was deleted.

7 changes: 4 additions & 3 deletions test/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
set -eu

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
APP_DIR="$SCRIPT_DIR/.."
cd "$SCRIPT_DIR"

if [[ $TARGET == x86_64-unknown-linux-gnu ]]; then
mkdir -p .container/cargo-registry
podman build -t mullvadvpn-app-tests .
container_image=$(cat "$APP_DIR/building/linux-container-image.txt")

podman run --rm -it \
-v "${SCRIPT_DIR}/.container/cargo-registry":/root/.cargo/registry \
-v "${SCRIPT_DIR}/..":/src:Z \
-v "${APP_DIR}":/src:Z \
-e CARGO_HOME=/root/.cargo/registry \
mullvadvpn-app-tests \
"${container_image}" \
/bin/bash -c "cd /src/test/; cargo build --bin test-runner --release --target ${TARGET}"
else
cargo build --bin test-runner --release --target "${TARGET}"
Expand Down

0 comments on commit 1e09e14

Please sign in to comment.