Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

devops: fix Chromium build win upload (#13320)

Andrey Lushnikovffa9ba4a7bac
diff --git a/browser_patches/chromium/archive.sh b/browser_patches/chromium/archive.sh
index b219bde765..a222efc4c9 100755
--- a/browser_patches/chromium/archive.sh
+++ b/browser_patches/chromium/archive.sh
@@ -52,7 +52,7 @@ elif [[ $(uname) == "Linux" ]]; then
CHROMIUM_FOLDER_NAME="chrome-linux"
IFS=$'\n' CHROMIUM_FILES_TO_ARCHIVE=($(node "${SCRIPT_PATH}/compute_files_to_archive.js" "${CR_CHECKOUT_PATH}/src/infra/archive_config/linux-archive-rel.json"))
unset IFS
-elif [[ $(uname) == "MINGW" ]]; then
+elif [[ $(uname) == "MINGW" || "$(uname)" == MSYS* ]]; then
CHROMIUM_FOLDER_NAME="chrome-win"
IFS=$'\n\r' CHROMIUM_FILES_TO_ARCHIVE=($(node "${SCRIPT_PATH}/compute_files_to_archive.js" "${CR_CHECKOUT_PATH}/src/infra/archive_config/win-archive-rel.json"))
unset IFS
@@ -78,7 +78,7 @@ for ((i = 0; i < ${#CHROMIUM_FILES_TO_ARCHIVE[@]}; i++)) do
$COPY_COMMAND "${CR_CHECKOUT_PATH}/src/out/Default/${file}" "output/${CHROMIUM_FOLDER_NAME}/${file}"
done
-if [[ $(uname) == "MINGW" ]]; then
+if [[ $(uname) == "MINGW" || "$(uname)" == MSYS* ]]; then
$COPY_COMMAND "${CR_CHECKOUT_PATH}/src/out/Default/"*.manifest "output/${CHROMIUM_FOLDER_NAME}/"
mkdir -p "output/${CHROMIUM_FOLDER_NAME}/locales"
$COPY_COMMAND "${CR_CHECKOUT_PATH}/src/out/Default/locales/"*.pak "output/${CHROMIUM_FOLDER_NAME}/locales/"
diff --git a/browser_patches/chromium/build.sh b/browser_patches/chromium/build.sh
index 6dc9193e9e..822f051b76 100755
--- a/browser_patches/chromium/build.sh
+++ b/browser_patches/chromium/build.sh
@@ -95,7 +95,7 @@ compile_chromium() {
fi
TARGETS="${args[@]}"
- if [[ $(uname) == "MINGW" ]]; then
+ if [[ $(uname) == "MINGW" || "$(uname)" == MSYS* ]]; then
if [[ -n "$TARGETS" ]]; then
echo "ERROR: cannot compile custom targets on windows yet."
echo "Requested to compile chromium targets - ${TARGETS}"
diff --git a/browser_patches/chromium/ensure_depot_tools.sh b/browser_patches/chromium/ensure_depot_tools.sh
index d6204f5cac..c746fe5362 100644
--- a/browser_patches/chromium/ensure_depot_tools.sh
+++ b/browser_patches/chromium/ensure_depot_tools.sh
@@ -15,7 +15,7 @@ function ensure_depot_tools() {
# Install depot_tools if they are not in system, and modify $PATH
# to include depot_tools
if ! command -v autoninja >/dev/null; then
- if [[ $(uname) == "MINGW"* ]]; then
+ if [[ $(uname) == "MINGW"* || "$(uname)" == MSYS* ]]; then
# NOTE: as of Feb 8, 2021, windows requires manual and separate
# installation of depot_tools.
echo "ERROR: cannot automatically install depot_tools on windows. Please, install manually"
diff --git a/browser_patches/chromium/goma.sh b/browser_patches/chromium/goma.sh
index d621811477..1ba2ce18e0 100755
--- a/browser_patches/chromium/goma.sh
+++ b/browser_patches/chromium/goma.sh
@@ -47,7 +47,7 @@ if [[ $1 == "--help" ]]; then
elif [[ $1 == "args" ]]; then
print_gn_args
elif [[ $1 == "login" ]]; then
- if [[ $(uname) == "MINGW"* ]]; then
+ if [[ $(uname) == "MINGW"* || "$(uname)" == MSYS* ]]; then
/c/Windows/System32/cmd.exe "/c $(cygpath -w $(pwd)/goma_auth.bat) login"
else
python ./goma_auth.py login
@@ -66,7 +66,7 @@ elif [[ $1 == "start" ]]; then
echo "run '$(basename "$0") login'"
exit 1
fi
- if [[ $(uname) == "MINGW"* ]]; then
+ if [[ $(uname) == "MINGW"* || "$(uname)" == MSYS* ]]; then
/c/Windows/System32/cmd.exe "/c $(cygpath -w $(pwd)/goma_ctl.bat) ensure_start"
else
python ./goma_ctl.py ensure_start
@@ -81,7 +81,7 @@ elif [[ $1 == "start" ]]; then
print_gn_args
echo "===== ======= ====="
elif [[ $1 == "stop" ]]; then
- if [[ $(uname) == "MINGW"* ]]; then
+ if [[ $(uname) == "MINGW"* || "$(uname)" == MSYS* ]]; then
/c/Windows/System32/cmd.exe "/c $(cygpath -w $(pwd)/goma_ctl.bat) stop"
else
python ./goma_ctl.py stop