Skip to content

Commit 401dcfd

Browse files
authored
chore: do not use a subshell hack when using XVFB (#6884)
This was originally introduced in 9caa61a. However, we no longer save process STDERR.
1 parent f264e85 commit 401dcfd

File tree

3 files changed

+9
-27
lines changed

3 files changed

+9
-27
lines changed

.github/workflows/tests_fyi.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ jobs:
2929
DEBUG: pw:install
3030
- run: npm run build
3131
- run: node lib/cli/cli install-deps ${{ matrix.browser }} chromium
32-
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
33-
# Wrap `npm run` in a subshell to redirect STDERR to file.
34-
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run test -- --project=${{ matrix.browser }}"
32+
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test -- --project=${{ matrix.browser }}
3533
env:
3634
PWTEST_VIDEO: 1
3735
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json

.github/workflows/tests_primary.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ jobs:
3737
DEBUG: pw:install
3838
- run: npm run build
3939
- run: node lib/cli/cli install-deps ${{ matrix.browser }} chromium
40-
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
41-
# Wrap `npm run` in a subshell to redirect STDERR to file.
42-
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run test -- --project=${{ matrix.browser }}"
40+
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test -- --project=${{ matrix.browser }}
4341
- run: node tests/config/checkCoverage.js ${{ matrix.browser }}
4442
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
4543
if: always()

.github/workflows/tests_secondary.yml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ jobs:
3838
DEBUG: pw:install
3939
- run: npm run build
4040
- run: node lib/cli/cli install-deps ${{ matrix.browser }} chromium
41-
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
42-
# Wrap `npm run` in a subshell to redirect STDERR to file.
43-
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run test -- --project=${{ matrix.browser }}"
41+
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test -- --project=${{ matrix.browser }}
4442
- run: node tests/config/checkCoverage.js ${{ matrix.browser }}
4543
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
4644
if: always()
@@ -144,9 +142,7 @@ jobs:
144142
DEBUG: pw:install
145143
- run: npm run build
146144
- run: node lib/cli/cli install-deps ${{ matrix.browser }} chromium
147-
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
148-
# Wrap `npm run` in a subshell to redirect STDERR to file.
149-
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run test -- --project=${{ matrix.browser }}"
145+
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test -- --project=${{ matrix.browser }}
150146
if: ${{ always() }}
151147
env:
152148
HEADFUL: 1
@@ -175,9 +171,7 @@ jobs:
175171
DEBUG: pw:install
176172
- run: npm run build
177173
- run: node lib/cli/cli install-deps chromium
178-
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
179-
# Wrap `npm run` in a subshell to redirect STDERR to file.
180-
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run ctest"
174+
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run ctest
181175
env:
182176
PWTEST_MODE: ${{ matrix.mode }}
183177
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
@@ -202,9 +196,7 @@ jobs:
202196
- run: npm run build
203197
- run: node lib/cli/cli install-deps chromium
204198
- run: node lib/cli/cli install chrome
205-
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
206-
# Wrap `npm run` in a subshell to redirect STDERR to file.
207-
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run ctest"
199+
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run ctest
208200
env:
209201
PWTEST_CHANNEL: chrome
210202
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
@@ -279,9 +271,7 @@ jobs:
279271
- run: npm run build
280272
- run: node lib/cli/cli install-deps firefox
281273
- run: node lib/cli/cli install firefox-stable chromium
282-
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
283-
# Wrap `npm run` in a subshell to redirect STDERR to file.
284-
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run ftest"
274+
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run ftest
285275
env:
286276
PWTEST_CHANNEL: firefox-stable
287277
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
@@ -380,9 +370,7 @@ jobs:
380370
- run: npm run build
381371
- run: node lib/cli/cli install-deps chromium
382372
- run: node lib/cli/cli install chrome-beta
383-
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
384-
# Wrap `npm run` in a subshell to redirect STDERR to file.
385-
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run ctest"
373+
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run ctest
386374
env:
387375
PWTEST_CHANNEL: chrome-beta
388376
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
@@ -454,9 +442,7 @@ jobs:
454442
- run: npm ci
455443
- run: npm run build
456444
- run: node lib/cli/cli install-deps chromium
457-
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
458-
# Wrap `npm run` in a subshell to redirect STDERR to file.
459-
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- bash -c "npm run etest"
445+
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run etest
460446
- run: node tests/config/checkCoverage.js electron
461447
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
462448
if: always()

0 commit comments

Comments
 (0)