From 3c714de200e2159e94d953e9b73316317eacb9b0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 27 Jun 2021 18:46:29 +0100 Subject: [PATCH] Launch Xvfb before running non-GUI tests in GitHub wxMSW workflow We must be able to create windows even in non-GUI tests for the windows used internally, e.g. the one created during wxSocket initialization, so ensure Xvfb is running before the tests start. --- .github/workflows/ci_msw_cross.yml | 40 ++++++++++++++++-------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci_msw_cross.yml b/.github/workflows/ci_msw_cross.yml index f96e898680..e7843e0079 100644 --- a/.github/workflows/ci_msw_cross.yml +++ b/.github/workflows/ci_msw_cross.yml @@ -161,22 +161,7 @@ jobs: make $wxMAKE_ARGS failtest make $wxMAKE_ARGS "CXXFLAGS=$wxMAKEFILE_ERROR_CXXFLAGS" - - name: Run non-GUI tests - working-directory: tests - run: | - . ../build/tools/httpbin.sh - - httpbin_launch - - $WINERUN ./test || rc=$? - - if [ -n "$rc" ]; then - httpbin_show_log - exit $rc - fi - - - name: Run GUI tests - working-directory: tests + - name: Launch Xvfb run: | echo 'Launching Xvfb...' sudo mkdir /tmp/.X11-unix @@ -202,5 +187,24 @@ jobs: echo "Still waiting for Xvfb (attempt #$num_tries)" sleep 3 done - echo 'Launching the GUI test:' - DISPLAY=:10 $WINERUN ./test_gui + echo 'Xvfb is running on display :10' + echo 'DISPLAY=:10' >> $GITHUB_ENV + + - name: Run non-GUI tests + working-directory: tests + run: | + . ../build/tools/httpbin.sh + + httpbin_launch + + $WINERUN ./test || rc=$? + + if [ -n "$rc" ]; then + httpbin_show_log + exit $rc + fi + + - name: Run GUI tests + working-directory: tests + run: | + $WINERUN ./test_gui