Skip to content

Commit cb1df6a

Browse files
committed
Merge branch 'test-add-test-filter'
2 parents e804454 + 65b0b48 commit cb1df6a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/desktop-e2e.yml

+8
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ on:
2020
default: ''
2121
required: false
2222
type: string
23+
tests:
24+
description: "Tests to run (defaults to all if empty)"
25+
default: ''
26+
required: false
27+
type: string
2328
jobs:
2429
prepare-matrices:
2530
name: Prepare virtual machines
@@ -151,6 +156,7 @@ jobs:
151156
shell: bash -ieo pipefail {0}
152157
run: |
153158
git fetch --tags --force
159+
export TEST_FILTERS="${{ github.event.inputs.tests }}"
154160
./test/scripts/ci-runtests.sh ${{ matrix.os }}
155161
- uses: actions/upload-artifact@v3
156162
if: '!cancelled()'
@@ -226,6 +232,7 @@ jobs:
226232
shell: bash -ieo pipefail {0}
227233
run: |
228234
git fetch --tags --force
235+
export TEST_FILTERS="${{ github.event.inputs.tests }}"
229236
./test/scripts/ci-runtests.sh ${{ matrix.os }}
230237
- uses: actions/upload-artifact@v3
231238
if: '!cancelled()'
@@ -297,6 +304,7 @@ jobs:
297304
shell: bash -ieo pipefail {0}
298305
run: |
299306
git fetch --tags --force
307+
export TEST_FILTERS="${{ github.event.inputs.tests }}"
300308
./test/scripts/ci-runtests.sh ${{ matrix.os }}
301309
- uses: actions/upload-artifact@v3
302310
if: '!cancelled()'

test/scripts/test-utils.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ function run_tests_for_os {
254254
package_dir=$(get_package_dir)
255255
local test_dir
256256
test_dir=$(get_test_utls_dir)/..
257+
read -ra test_filters_arg <<<"${TEST_FILTERS:-}" # Split the string by words into an array
257258
pushd "$test_dir"
258259
if ! RUST_LOG_STYLE=always cargo run --bin test-manager \
259260
run-tests \
@@ -263,7 +264,7 @@ function run_tests_for_os {
263264
"${test_report_arg[@]}" \
264265
--package-dir "${package_dir}" \
265266
--vm "$vm" \
266-
"${TEST_FILTERS:-}" \
267+
"${test_filters_arg[@]}" \
267268
2>&1 | sed -r "s/${ACCOUNT_TOKEN}/\{ACCOUNT_TOKEN\}/g"; then
268269
echo "Test run failed"
269270
exit 1

0 commit comments

Comments
 (0)