Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
devops: support msys2 (#13194)
liuxingbaoyu297edb02f128
diff --git a/browser_patches/checkout_build_archive_upload.sh b/browser_patches/checkout_build_archive_upload.shindex 3cf688b54d..cd85b75648 100755--- a/browser_patches/checkout_build_archive_upload.sh+++ b/browser_patches/checkout_build_archive_upload.sh@@ -332,7 +332,7 @@ if [[ "$CURRENT_HOST_OS_VERSION" != "$EXPECTED_HOST_OS_VERSION" ]]; thenexit 1fi-if [[ $(uname) == MINGW* ]]; then+if [[ $(uname) == MINGW* || "$(uname)" == MSYS* ]]; thenZIP_PATH="$PWD/archive-$BROWSER_NAME.zip"LOG_PATH="$PWD/log-$BROWSER_NAME.zip"elsediff --git a/browser_patches/chromium/goma.sh b/browser_patches/chromium/goma.shindex 8d3fc2105f..d621811477 100755--- a/browser_patches/chromium/goma.sh+++ b/browser_patches/chromium/goma.sh@@ -34,7 +34,7 @@ export GOMA_START_COMPILER_PROXY=truefunction print_gn_args() {PLAYWRIGHT_GOMA_PATH="${SCRIPT_FOLDER}/electron-build-tools/third_party/goma"- if [[ $(uname) == MINGW* ]]; then+ if [[ $(uname) == MINGW* || "$(uname)" == MSYS* ]]; thenPLAYWRIGHT_GOMA_PATH=$(cygpath -w "${PLAYWRIGHT_GOMA_PATH}")fiecho 'use_goma = true'diff --git a/browser_patches/chromium/mirror.sh b/browser_patches/chromium/mirror.shindex 168a8ec1b7..3b66b93450 100755--- a/browser_patches/chromium/mirror.sh+++ b/browser_patches/chromium/mirror.sh@@ -39,7 +39,7 @@ mirror_chromium() {PLATFORM="--mac"elif [[ "${CURRENT_HOST_OS}" == "Linux" ]]; thenPLATFORM="--linux"- elif [[ "${CURRENT_HOST_OS}" == MINGW* ]]; then+ elif [[ "${CURRENT_HOST_OS}" == MINGW* || "${CURRENT_HOST_OS}" == MSYS* ]]; thenPLATFORM="--win64"elseecho "ERROR: unsupported host platform - ${CURRENT_HOST_OS}"diff --git a/browser_patches/firefox-beta/archive.sh b/browser_patches/firefox-beta/archive.shindex 5b2af282d3..cfd280aef3 100755--- a/browser_patches/firefox-beta/archive.sh+++ b/browser_patches/firefox-beta/archive.sh@@ -56,7 +56,7 @@ fi# TODO(aslushnikov): this won't be needed with official builds.if [[ "$(uname)" == "Linux" ]]; thencp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 "${OBJ_FOLDER}/dist/firefox/libstdc++.so.6"-elif [[ "$(uname)" == MINGW* ]]; then+elif [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; then# Bundle vcruntime14_1.dll - see https://github.com/microsoft/playwright/issues/9974cd "$(printMSVCRedistDir)"cp -t "${OBJ_FOLDER}/dist/firefox" vcruntime140_1.dlldiff --git a/browser_patches/firefox-beta/build.sh b/browser_patches/firefox-beta/build.shindex 3d746c9136..0e774479a5 100755--- a/browser_patches/firefox-beta/build.sh+++ b/browser_patches/firefox-beta/build.sh@@ -32,7 +32,7 @@ if [[ "$(uname)" == "Darwin" ]]; thenecho "-- building on Mac"elif [[ "$(uname)" == "Linux" ]]; thenecho "-- building on Linux"-elif [[ "$(uname)" == MINGW* ]]; then+elif [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; thenecho "ac_add_options --disable-update-agent" >> .mozconfigecho "ac_add_options --disable-default-browser-agent" >> .mozconfigecho "ac_add_options --disable-maintenance-service" >> .mozconfig@@ -67,7 +67,7 @@ elseecho "ac_add_options --enable-release" >> .mozconfigfi-if [[ "$(uname)" == MINGW* || "$(uname)" == "Darwin" ]]; then+if [[ "$(uname)" == MINGW* || "$(uname)" == "Darwin" || "$(uname)" == MSYS* ]]; then# This options is only available on win and mac.echo "ac_add_options --disable-update-agent" >> .mozconfigfidiff --git a/browser_patches/firefox/archive.sh b/browser_patches/firefox/archive.shindex cb64aeb0e5..78ad1d6526 100755--- a/browser_patches/firefox/archive.sh+++ b/browser_patches/firefox/archive.sh@@ -58,7 +58,7 @@ fi# TODO(aslushnikov): this won't be needed with official builds.if [[ "$(uname)" == "Linux" ]]; thencp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 "${OBJ_FOLDER}/dist/firefox/libstdc++.so.6"-elif [[ "$(uname)" == MINGW* ]]; then+elif [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; then# Bundle vcruntime14_1.dll - see https://github.com/microsoft/playwright/issues/9974cd "$(printMSVCRedistDir)"cp -t "${OBJ_FOLDER}/dist/firefox" vcruntime140_1.dlldiff --git a/browser_patches/firefox/build.sh b/browser_patches/firefox/build.shindex e0f85049c8..0b7df1f791 100755--- a/browser_patches/firefox/build.sh+++ b/browser_patches/firefox/build.sh@@ -32,12 +32,12 @@ if [[ "$(uname)" == "Darwin" ]]; thenecho "-- building on Mac"elif [[ "$(uname)" == "Linux" ]]; thenecho "-- building on Linux"-elif [[ "$(uname)" == MINGW* ]]; then+elif [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; thenecho "ac_add_options --disable-update-agent" >> .mozconfigecho "ac_add_options --disable-default-browser-agent" >> .mozconfigecho "ac_add_options --disable-maintenance-service" >> .mozconfig- echo "-- building win64 build on MINGW"+ echo "-- building on Windows"echo "ac_add_options --target=x86_64-pc-mingw32" >> .mozconfigecho "ac_add_options --host=x86_64-pc-mingw32" >> .mozconfigDLL_FILE=$("C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find '**\Redist\MSVC\*\x64\**\vcruntime140.dll')@@ -67,7 +67,7 @@ elseecho "ac_add_options --enable-release" >> .mozconfigfi-if [[ "$(uname)" == MINGW* || "$(uname)" == "Darwin" ]]; then+if [[ "$(uname)" == MINGW* || "$(uname)" == "Darwin" || "$(uname)" == MSYS* ]]; then# This options is only available on win and mac.echo "ac_add_options --disable-update-agent" >> .mozconfigfidiff --git a/browser_patches/upload.sh b/browser_patches/upload.shindex cbaa20bc95..7eaaaa0ddb 100755--- a/browser_patches/upload.sh+++ b/browser_patches/upload.sh@@ -62,7 +62,7 @@ if [[ "${ZIP_PATH}" != *.zip && "${ZIP_PATH}" != *.gz ]]; thenecho "ERROR: ${ZIP_PATH} is not an archive (must have a .zip or .gz extension)"exit 1fi-if [[ $(uname) == MINGW* ]]; then+if [[ $(uname) == MINGW* || "$(uname)" == MSYS* ]]; then# Convert POSIX path to MSYSWIN_PATH=$({ cd $(dirname "$ZIP_PATH") && pwd -W; } | sed 's|/|\\|g')WIN_PATH="${WIN_PATH}\\$(basename "$ZIP_PATH")"diff --git a/browser_patches/webkit/archive.sh b/browser_patches/webkit/archive.shindex 4f84bb4336..6a1e00c6f7 100755--- a/browser_patches/webkit/archive.sh+++ b/browser_patches/webkit/archive.sh@@ -41,7 +41,7 @@ main() {createZipForMacelif [[ "$(uname)" == "Linux" ]]; thencreateZipForLinux- elif [[ "$(uname)" == MINGW* ]]; then+ elif [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; thencreateZipForWindowselseecho "ERROR: cannot upload on this platform!" 1>&2diff --git a/browser_patches/webkit/build.sh b/browser_patches/webkit/build.shindex 4449614454..3036b3a27c 100755--- a/browser_patches/webkit/build.sh+++ b/browser_patches/webkit/build.sh@@ -81,7 +81,7 @@ elif [[ "$(uname)" == "Linux" ]]; thenechobuild_wpefi-elif [[ "$(uname)" == MINGW* ]]; then+elif [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; then/c/Windows/System32/cmd.exe "/c $(cygpath -w "${SCRIPT_FOLDER}"/buildwin.bat)"elseecho "ERROR: cannot upload on this platform!" 1>&2diff --git a/browser_patches/winldd/archive.sh b/browser_patches/winldd/archive.shindex ad086375a1..062dc9186c 100755--- a/browser_patches/winldd/archive.sh+++ b/browser_patches/winldd/archive.sh@@ -10,7 +10,7 @@ if [[ ("$1" == "-h") || ("$1" == "--help") ]]; thenexit 0fi-if [[ "$(uname)" != MINGW* ]]; then+if [[ "$(uname)" != MINGW* || "$(uname)" == MSYS* ]]; thenecho "ERROR: this script only supports MINGW (windows)"exit 1fidiff --git a/browser_patches/winldd/build.sh b/browser_patches/winldd/build.shindex 7eb65d261b..5f02e935a0 100755--- a/browser_patches/winldd/build.sh+++ b/browser_patches/winldd/build.sh@@ -5,7 +5,7 @@ set +xtrap "cd $(pwd -P)" EXITcd "$(dirname $0)"-if [[ "$(uname)" == MINGW* ]]; then+if [[ "$(uname)" == MINGW* || "$(uname)" == MSYS* ]]; then/c/Windows/System32/cmd.exe "/c buildwin.bat"elseecho "ERROR: cannot upload on this platform!" 1>&2