@@ -24,7 +24,9 @@ LATEST_STABLE_RELEASE=$(jq -r '[.[] | select(.prerelease==false)] | .[0].tag_nam
24
24
function get_current_version {
25
25
local app_dir
26
26
app_dir=" $( get_test_utls_dir) /../.."
27
- cargo run -q --manifest-path=" $app_dir /Cargo.toml" --bin mullvad-version
27
+ # HACK:
28
+ echo " 2024.4-dev-7781ac"
29
+ # cargo run -q --manifest-path="$app_dir/Cargo.toml" --bin mullvad-version
28
30
}
29
31
30
32
CURRENT_VERSION=$( get_current_version)
@@ -150,6 +152,13 @@ function download_app_package {
150
152
fi
151
153
}
152
154
155
+ function is_linux {
156
+ case $1 in
157
+ debian* |ubuntu* |fedora* ) true ;;
158
+ * ) false ;;
159
+ esac
160
+ }
161
+
153
162
function get_e2e_filename {
154
163
local version=$1
155
164
local os=$2
@@ -224,11 +233,15 @@ function run_tests_for_os {
224
233
exit 1
225
234
fi
226
235
227
- echo " **********************************"
228
- echo " * Building test runner"
229
- echo " **********************************"
236
+ # TMP: Assume test-manager has been built already!
237
+ # If we are testing Linux, spood that we compile test-manager and test-runner. Actually use-precompiled artifacts.
238
+ if ! is_linux " $TEST_OS " ; then
239
+ echo " **********************************"
240
+ echo " * Building test runner"
241
+ echo " **********************************"
230
242
231
- nice_time build_test_runner " $vm "
243
+ nice_time build_test_runner " $vm "
244
+ fi
232
245
233
246
234
247
echo " **********************************"
@@ -255,7 +268,11 @@ function run_tests_for_os {
255
268
local test_dir
256
269
test_dir=$( get_test_utls_dir) /..
257
270
pushd " $test_dir "
258
- if ! RUST_LOG_STYLE=always cargo run --bin test-manager \
271
+ TEST_MANAGER_BIN=" cargo run --bin test-manager"
272
+ if is_linux " $vm " ; then
273
+ TEST_MANAGER_BIN=" ./dist/test-manager"
274
+ fi
275
+ if ! RUST_LOG_STYLE=always " $TEST_MANAGER_BIN " \
259
276
run-tests \
260
277
--account " ${ACCOUNT_TOKEN:? Error: ACCOUNT_TOKEN not set} " \
261
278
--app-package " ${APP_PACKAGE:? Error: APP_PACKAGE not set} " \
@@ -278,7 +295,7 @@ function build_current_version {
278
295
app_dir=" $( get_test_utls_dir) /../.."
279
296
local app_filename
280
297
# TODO: TEST_OS must be set to local OS manually, should be set automatically
281
- app_filename=$( get_app_filename " $CURRENT_VERSION " " ${TEST_OS:? Error: TEST_OS not set} " )
298
+ app_filename=$( get_app_filename " $CURRENT_VERSION " " ${TEST_OS:? Error: TEST_OS not set} " )
282
299
local package_dir
283
300
package_dir=$( get_package_dir)
284
301
local app_package=" $package_dir " /" $app_filename "
@@ -309,4 +326,4 @@ function build_current_version {
309
326
else
310
327
echo " GUI e2e executable for current version already exists at $gui_test_bin , skipping build"
311
328
fi
312
- }
329
+ }
0 commit comments