summaryrefslogtreecommitdiffhomepage
path: root/test/scripts/build.sh
diff options
context:
space:
mode:
authorMagnus Lindstrom <magnus.lindstrom@mullvad.net>2024-08-16 10:06:33 +0200
committerMagnus Lindstrom <magnus.lindstrom@mullvad.net>2024-08-16 14:17:44 +0200
commitb0ccea7e5c0d2946dea2acf4462977d410c85bab (patch)
tree78bc77d112ddedc88e35159db60edbe4d4271a8c /test/scripts/build.sh
parent172d9da83582d7e2522e4c7861713b4572e08dcc (diff)
downloadmullvadvpn-b0ccea7e5c0d2946dea2acf4462977d410c85bab.tar.xz
mullvadvpn-b0ccea7e5c0d2946dea2acf4462977d410c85bab.zip
Remove cargo dependency when running e2e tests
This commit enables the usage of the dist/ directory, and also adds mullvad-version to it so that test-by-version.sh can operate without rust installed at all. To make use of predefined binaries in a separate directory, refer to that directory by using the env var TEST_DIST_DIR=<dir path> and the binaries will be used if they can be found there. If TEST_DIST_DIR is specified, all of the following binaries need to be there: - connection-checker - mullvad-version - test-manager - test-runner Also added a /dev/null redirect of a cd output so that one's able to use CDPATH while running the tests.
Diffstat (limited to 'test/scripts/build.sh')
-rwxr-xr-xtest/scripts/build.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/scripts/build.sh b/test/scripts/build.sh
index be06dd8eb9..7cfaede311 100755
--- a/test/scripts/build.sh
+++ b/test/scripts/build.sh
@@ -7,6 +7,7 @@ set -eu
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
TEST_FRAMEWORK_ROOT="$SCRIPT_DIR/.."
+REPO_ROOT="$SCRIPT_DIR/../.."
# Build
build_linux() {
@@ -19,6 +20,10 @@ build_linux() {
"$SCRIPT_DIR/build-runner.sh" linux
cp "$TEST_FRAMEWORK_ROOT/target/x86_64-unknown-linux-gnu/release/test-runner" "$TEST_FRAMEWORK_ROOT/dist/"
cp "$TEST_FRAMEWORK_ROOT/target/x86_64-unknown-linux-gnu/release/connection-checker" "$TEST_FRAMEWORK_ROOT/dist/"
+
+ # Build mullvad-version
+ cargo build --manifest-path="$REPO_ROOT/Cargo.toml" --release --bin mullvad-version
+ cp "$REPO_ROOT/target/release/mullvad-version" "$TEST_FRAMEWORK_ROOT/dist/"
}
build_linux