From c36c1ba8b287e85cddab9c9602650fa3f3e99544 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 19 Aug 2026 15:23:35 -0400 Subject: [PATCH] Wait for the browser process in Windows test runs zotero.exe is the Mozilla launcher process, which spawns the browser process and exits, so the test runner checked for the success file and cleaned up the profile while the app was still starting, and passing runs were reported as failures that ended at arbitrary points. --- test/runtests.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/runtests.sh b/test/runtests.sh index f4380a9ced..70e0ef4709 100755 --- a/test/runtests.sh +++ b/test/runtests.sh @@ -171,6 +171,13 @@ else Z_ARGS="$Z_ARGS -jsconsole" fi +# On Windows, zotero.exe is the Mozilla launcher process, which spawns the browser process +# and exits, so tell it to wait -- the success check and profile cleanup below otherwise +# run while the app is still starting +if [ ! -z $IS_CYGWIN ]; then + Z_ARGS="$Z_ARGS --wait-for-browser" +fi + # Clean up on exit trap "{ rm -rf \"$TEMPDIR\"; }" EXIT