Skip to content

Commit 6dd59d1

Browse files
Merge branch 'reuse-test-manager-windows'
2 parents 49efba2 + ed28219 commit 6dd59d1

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

.github/workflows/desktop-e2e.yml

+26-3
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,13 @@ jobs:
360360
path: .\dist\*.exe
361361

362362
e2e-test-windows:
363-
needs: [prepare-matrices, build-windows, get-app-version]
363+
needs:
364+
[
365+
prepare-matrices,
366+
build-windows,
367+
get-app-version,
368+
build-test-manager-linux,
369+
]
364370
if: |
365371
!cancelled() &&
366372
needs.get-app-version.result == 'success' &&
@@ -374,19 +380,36 @@ jobs:
374380
matrix:
375381
os: ${{ fromJSON(needs.prepare-matrices.outputs.windows_matrix) }}
376382
steps:
383+
- name: Checkout repository
384+
uses: actions/checkout@v4
385+
- name: Create binaries directory & add to PATH
386+
shell: bash -ieo pipefail {0}
387+
run: |
388+
mkdir "${{ github.workspace }}/bin"
389+
echo "${{ github.workspace }}/bin/" >> "$GITHUB_PATH"
390+
- name: Download Test Manager
391+
uses: actions/download-artifact@v4
392+
if: ${{ needs.build-test-manager-linux.result == 'success' }}
393+
with:
394+
name: linux-test-manager-build
395+
path: ${{ github.workspace }}/bin
396+
- name: chmod binaries
397+
run: |
398+
chmod +x ${{ github.workspace }}/bin/*
377399
- name: Download App
378400
uses: actions/download-artifact@v4
379401
if: ${{ needs.build-windows.result == 'success' }}
380402
with:
381403
name: windows-build
382404
path: ~/.cache/mullvad-test/packages
383-
- name: Checkout repository
384-
uses: actions/checkout@v4
385405
- name: Run end-to-end tests
386406
shell: bash -ieo pipefail {0}
387407
env:
388408
CURRENT_VERSION: ${{needs.get-app-version.outputs.mullvad-version}}
389409
run: |
410+
# A directory with all the binaries is required to run test-manager.
411+
# The test scripts which runs in CI expects this folder to be available as the `TEST_DIST_DIR` variable.
412+
export TEST_DIST_DIR="${{ github.workspace }}/bin/"
390413
export TEST_FILTERS="${{ github.event.inputs.tests }}"
391414
./test/scripts/run/ci.sh ${{ matrix.os }}
392415
- name: Upload test report

test/scripts/utils/lib.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,7 @@ function run_tests_for_os {
161161
exit 1
162162
fi
163163

164-
if [ -n "${TEST_DIST_DIR+x}" ]; then
165-
if [ ! -x "${TEST_DIST_DIR%/}/test-runner" ]; then
166-
executable_not_found_in_dist_error test-runner
167-
fi
168-
164+
if [ -n "${TEST_DIST_DIR+x}" ] && [ -x "${TEST_DIST_DIR%/}/test-runner" ]; then
169165
echo "**********************************"
170166
echo "* Using test-runner in $TEST_DIST_DIR"
171167
echo "**********************************"

0 commit comments

Comments
 (0)