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: make `--debug` as a CLI argument for FF build scripts (#15833)
Andrey Lushnikov618941fc68f1
diff --git a/browser_patches/firefox-beta/build.sh b/browser_patches/firefox-beta/build.shindex adb1375669..cc0b48f4a7 100755--- a/browser_patches/firefox-beta/build.sh+++ b/browser_patches/firefox-beta/build.sh@@ -18,6 +18,47 @@ elsecd "$HOME/firefox"fi+args=("$@")+IS_FULL=""+IS_JUGGLER=""+IS_LINUX_ARM64=""+IS_DEBUG=""+for ((i="${#args[@]}"-1; i >= 0; --i)); do+ case ${args[i]} in+ --full) IS_FULL="1"; unset args[i]; ;;+ --juggler) IS_JUGGLER="1"; unset args[i]; ;;+ --linux-arm64) IS_LINUX_ARM64="1"; unset args[i]; ;;+ --debug) IS_DEBUG="1"; unset args[i]; ;;+ esac+done++if [[ -n "${IS_JUGGLER}" && -n "${IS_FULL}" ]]; then+ echo "ERROR: either --full or --juggler is allowed"+ exit 1+fi++echo "== BUILD CONFIGURATION =="+if [[ -n "${IS_FULL}" ]]; then+ echo "- build type: FULL"+elif [[ -n "${IS_JUGGLER}" ]]; then+ echo "- build type: JUGGLER"+else+ echo "- build type: INCREMENTAL"+fi++if [[ -n "${IS_DEBUG}" ]]; then+ echo "- debug: YES"+else+ echo "- debug: NO"+fi++if [[ -n "${IS_LINUX_ARM64}" ]]; then+ echo "- linux aarch64: YES"+else+ echo "- linux aarch64: NO"+fi+echo "========================="+rm -rf .mozconfigif is_mac; then@@ -44,7 +85,7 @@ elseexit 1;fi-if [[ $1 == "--linux-arm64" || $2 == "--linux-arm64" ]]; then+if [[ -n "${IS_LINUX_ARM64}" ]]; thenecho "ac_add_options --target=aarch64-linux-gnu" >> .mozconfigfi@@ -58,7 +99,7 @@ echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/${OBJ_FOLDER}" >> .mozconfigecho "ac_add_options --disable-crashreporter" >> .mozconfigecho "ac_add_options --disable-backgroundtasks" >> .mozconfig-if [[ -n $FF_DEBUG_BUILD ]]; then+if [[ -n "${IS_DEBUG}" ]]; thenecho "ac_add_options --enable-debug" >> .mozconfigecho "ac_add_options --enable-debug-symbols" >> .mozconfigelse@@ -70,7 +111,7 @@ if is_mac || is_win; thenecho "ac_add_options --disable-update-agent" >> .mozconfigfi-if [[ $1 != "--juggler" ]]; then+if [[ -z "${IS_JUGGLER}" ]]; then# TODO: rustup is not in the PATH on Windowsif command -v rustup >/dev/null; then# We manage Rust version ourselves.@@ -86,7 +127,7 @@ if [[ $1 != "--juggler" ]]; thenfifi-if [[ $1 == "--full" || $2 == "--full" || $1 == "--bootstrap" ]]; then+if [[ -n "${IS_FULL}" ]]; then# This is a slow but sure way to get all the necessary toolchains.# However, it will not work if tree is dirty.# Bail out if git repo is dirty.@@ -118,10 +159,8 @@ elsefi-if [[ $1 == "--juggler" ]]; then+if [[ -n "${IS_JUGGLER}" ]]; then./mach build faster-elif [[ $1 == "--bootstrap" ]]; then- ./mach configureelseexport MOZ_AUTOMATION=1# Use winpaths instead of unix paths on Windows.@@ -133,9 +172,9 @@ elsefi./mach buildif is_mac; then- node "${SCRIPT_FOLDER}"/install-preferences.js "$PWD"/${OBJ_FOLDER}/dist+ FF_DEBUG_BUILD="${IS_DEBUG}" node "${SCRIPT_FOLDER}"/install-preferences.js "$PWD"/${OBJ_FOLDER}/distelse- node "${SCRIPT_FOLDER}"/install-preferences.js "$PWD"/${OBJ_FOLDER}/dist/bin+ FF_DEBUG_BUILD="${IS_DEBUG}" node "${SCRIPT_FOLDER}"/install-preferences.js "$PWD"/${OBJ_FOLDER}/dist/binfifidiff --git a/browser_patches/firefox/build.sh b/browser_patches/firefox/build.shindex 770a0fb27b..56eb9906b9 100755--- a/browser_patches/firefox/build.sh+++ b/browser_patches/firefox/build.sh@@ -18,6 +18,47 @@ elsecd "$HOME/firefox"fi+args=("$@")+IS_FULL=""+IS_JUGGLER=""+IS_LINUX_ARM64=""+IS_DEBUG=""+for ((i="${#args[@]}"-1; i >= 0; --i)); do+ case ${args[i]} in+ --full) IS_FULL="1"; unset args[i]; ;;+ --juggler) IS_JUGGLER="1"; unset args[i]; ;;+ --linux-arm64) IS_LINUX_ARM64="1"; unset args[i]; ;;+ --debug) IS_DEBUG="1"; unset args[i]; ;;+ esac+done++if [[ -n "${IS_JUGGLER}" && -n "${IS_FULL}" ]]; then+ echo "ERROR: either --full or --juggler is allowed"+ exit 1+fi++echo "== BUILD CONFIGURATION =="+if [[ -n "${IS_FULL}" ]]; then+ echo "- build type: FULL"+elif [[ -n "${IS_JUGGLER}" ]]; then+ echo "- build type: JUGGLER"+else+ echo "- build type: INCREMENTAL"+fi++if [[ -n "${IS_DEBUG}" ]]; then+ echo "- debug: YES"+else+ echo "- debug: NO"+fi++if [[ -n "${IS_LINUX_ARM64}" ]]; then+ echo "- linux aarch64: YES"+else+ echo "- linux aarch64: NO"+fi+echo "========================="+rm -rf .mozconfigif is_mac; then@@ -44,7 +85,7 @@ elseexit 1;fi-if [[ $1 == "--linux-arm64" || $2 == "--linux-arm64" ]]; then+if [[ -n "${IS_LINUX_ARM64}" ]]; thenecho "ac_add_options --target=aarch64-linux-gnu" >> .mozconfigfi@@ -58,7 +99,7 @@ echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/${OBJ_FOLDER}" >> .mozconfigecho "ac_add_options --disable-crashreporter" >> .mozconfigecho "ac_add_options --disable-backgroundtasks" >> .mozconfig-if [[ -n $FF_DEBUG_BUILD ]]; then+if [[ -n "${IS_DEBUG}" ]]; thenecho "ac_add_options --enable-debug" >> .mozconfigecho "ac_add_options --enable-debug-symbols" >> .mozconfigelse@@ -70,7 +111,7 @@ if is_mac || is_win; thenecho "ac_add_options --disable-update-agent" >> .mozconfigfi-if [[ $1 != "--juggler" ]]; then+if [[ -z "${IS_JUGGLER}" ]]; then# TODO: rustup is not in the PATH on Windowsif command -v rustup >/dev/null; then# We manage Rust version ourselves.@@ -86,7 +127,7 @@ if [[ $1 != "--juggler" ]]; thenfifi-if [[ $1 == "--full" || $2 == "--full" || $1 == "--bootstrap" ]]; then+if [[ -n "${IS_FULL}" ]]; then# This is a slow but sure way to get all the necessary toolchains.# However, it will not work if tree is dirty.# Bail out if git repo is dirty.@@ -118,10 +159,8 @@ elsefi-if [[ $1 == "--juggler" ]]; then+if [[ -n "${IS_JUGGLER}" ]]; then./mach build faster-elif [[ $1 == "--bootstrap" ]]; then- ./mach configureelseexport MOZ_AUTOMATION=1# Use winpaths instead of unix paths on Windows.@@ -133,9 +172,9 @@ elsefi./mach buildif is_mac; then- node "${SCRIPT_FOLDER}"/install-preferences.js "$PWD"/${OBJ_FOLDER}/dist+ FF_DEBUG_BUILD="${IS_DEBUG}" node "${SCRIPT_FOLDER}"/install-preferences.js "$PWD"/${OBJ_FOLDER}/distelse- node "${SCRIPT_FOLDER}"/install-preferences.js "$PWD"/${OBJ_FOLDER}/dist/bin+ FF_DEBUG_BUILD="${IS_DEBUG}" node "${SCRIPT_FOLDER}"/install-preferences.js "$PWD"/${OBJ_FOLDER}/dist/binfifi