Skip to content

Commit eceada0

Browse files
Merge remote-tracking branch 'origin/test-manager-fixes' into figure-out-windows10-crash
2 parents 989c4bf + 4ce7747 commit eceada0

20 files changed

+583
-364
lines changed

test/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -66,27 +66,27 @@ Currently, only `x86_64` platforms are supported for Windows/Linux and `ARM64` (
6666
For example, building `test-runner` for Windows would look like this:
6767

6868
``` bash
69-
./container-run.sh ./build-runner.sh windows
69+
./scripts/container-run.sh ./scripts/build-runner.sh windows
7070
```
7171

7272
## Linux
7373
Using `podman` is the recommended way to build the `test-runner`. See the [Linux section under Prerequisities](#Prerequisities) for more details.
7474

7575
``` bash
76-
./container-run.sh ./build-runner.sh linux
76+
./scripts/container-run.sh ./scripts/build-runner.sh linux
7777
```
7878

7979
## macOS
8080

8181
``` bash
82-
./build-runner.sh macos
82+
./scripts/build-runner.sh macos
8383
```
8484

8585
## Windows
8686
The `test-runner` binary for Windows may be cross-compiled from a Linux host.
8787

8888
``` bash
89-
./container-run.sh ./build-runner.sh windows
89+
./scripts/container-run.sh ./scripts/build-runner.sh windows
9090
```
9191

9292
# Building base images

test/ci-runtests.sh

-246
This file was deleted.
File renamed without changes.

test/scripts/build-runner-image.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ case $TARGET in
3434
-i "${TEST_RUNNER_IMAGE_PATH}" \
3535
"${SCRIPT_DIR}/../target/$TARGET/release/test-runner.exe" \
3636
"${SCRIPT_DIR}/../target/$TARGET/release/connection-checker.exe" \
37-
"${PACKAGES_DIR}/"*.exe \
37+
"${PACKAGE_FOLDER}/"*.exe \
3838
"${SCRIPT_DIR}/../openvpn.ca.crt" \
3939
"::"
4040
mdir -i "${TEST_RUNNER_IMAGE_PATH}"

test/build-runner.sh test/scripts/build-runner.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -eu
44

55
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
6-
REPO_DIR="$SCRIPT_DIR/.."
6+
REPO_DIR="$SCRIPT_DIR/../.."
77
cd "$SCRIPT_DIR"
88

99
source "$REPO_DIR/scripts/utils/log"
@@ -34,5 +34,5 @@ cargo build \
3434

3535
# Only build runner image for Windows
3636
if [[ $TARGET == x86_64-pc-windows-gnu ]]; then
37-
TARGET="$TARGET" ./scripts/build-runner-image.sh
37+
TARGET="$TARGET" ./build-runner-image.sh
3838
fi

test/scripts/ci-runtests.sh

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#!/usr/bin/env bash
2+
3+
set -eu
4+
5+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
6+
cd "$SCRIPT_DIR"
7+
TEST_DIR="$SCRIPT_DIR/.."
8+
9+
if [[ "$#" -lt 1 ]]; then
10+
echo "usage: $0 TEST_OS" 1>&2
11+
exit 1
12+
fi
13+
14+
TEST_OS=$1
15+
16+
PACKAGE_FOLDER="${CACHE_FOLDER}"
17+
18+
source "$SCRIPT_DIR/test-utils.sh"
19+
20+
echo "**********************************"
21+
echo "* Version to upgrade from: $LATEST_STABLE_RELEASE"
22+
echo "* Version to test: $CURRENT_VERSION"
23+
echo "**********************************"
24+
25+
26+
if [[ -z "${ACCOUNT_TOKENS+x}" ]]; then
27+
echo "'ACCOUNT_TOKENS' must be specified" 1>&2
28+
exit 1
29+
fi
30+
if ! readarray -t tokens < "${ACCOUNT_TOKENS}"; then
31+
echo "Specify account tokens in 'ACCOUNT_TOKENS' file" 1>&2
32+
exit 1
33+
fi
34+
35+
mkdir -p "$SCRIPT_DIR/.ci-logs"
36+
echo "$CURRENT_VERSION" > "$SCRIPT_DIR/.ci-logs/last-version.log"
37+
38+
39+
echo "**********************************"
40+
echo "* Downloading app packages"
41+
echo "**********************************"
42+
43+
# Clean up old packages
44+
find "$PACKAGE_FOLDER" -type f -mtime +5 -delete || true
45+
46+
47+
nice_time download_app_package "$LATEST_STABLE_RELEASE" "$TEST_OS"
48+
nice_time download_app_package "$CURRENT_VERSION" "$TEST_OS"
49+
nice_time download_e2e_executable "$CURRENT_VERSION" "$TEST_OS"
50+
51+
echo "**********************************"
52+
echo "* Building test manager"
53+
echo "**********************************"
54+
55+
cargo build -p test-manager
56+
57+
echo "**********************************"
58+
echo "* Running tests"
59+
echo "**********************************"
60+
61+
mkdir -p "$TEST_DIR/.ci-logs/os/"
62+
rm -f "$TEST_DIR/.ci-logs/${TEST_OS}_report"
63+
64+
set -o pipefail
65+
66+
APP_PACKAGE=$(get_app_filename "$CURRENT_VERSION" "$TEST_OS")
67+
APP_PACKAGE_TO_UPGRADE_FROM=$(get_app_filename "$LATEST_STABLE_RELEASE" "$TEST_OS")
68+
ACCOUNT_TOKEN=${tokens[0]} RUST_LOG=debug nice_time run_tests_for_os "${TEST_OS}"

0 commit comments

Comments
 (0)