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: bundle vcruntime140_1.dll with Firefox builds (#10099)
Andrey Lushnikov975a00ab3165
diff --git a/browser_patches/firefox-beta/archive.sh b/browser_patches/firefox-beta/archive.shindex 91efbc4269..9f4f16784c 100755--- a/browser_patches/firefox-beta/archive.sh+++ b/browser_patches/firefox-beta/archive.sh@@ -31,6 +31,7 @@ fitrap "cd $(pwd -P)" EXITcd "$(dirname "$0")"SCRIPT_FOLDER="$(pwd -P)"+source "${SCRIPT_FOLDER}/../utils.sh"if [[ ! -z "${FF_CHECKOUT_PATH}" ]]; thencd "${FF_CHECKOUT_PATH}"@@ -53,6 +54,10 @@ 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+ # Bundle vcruntime14_1.dll - see https://github.com/microsoft/playwright/issues/9974+ cd "$(printMSVCRedistDir)"+ cp -t "${OBJ_FOLDER}/dist/firefox" vcruntime140_1.dllfi# tar resulting directory and cleanup TMP.diff --git a/browser_patches/firefox/BUILD_NUMBER b/browser_patches/firefox/BUILD_NUMBERindex 0dba107e33..55030b3878 100644--- a/browser_patches/firefox/BUILD_NUMBER+++ b/browser_patches/firefox/BUILD_NUMBER@@ -1,2 +1,2 @@-1303-Changed: [email protected] Fri Nov 5 07:27:32 HST 2021+1304+Changed: [email protected] Fri Nov 5 12:27:32 HST 2021diff --git a/browser_patches/firefox/archive.sh b/browser_patches/firefox/archive.shindex 30055b1e7f..cab2d9dabb 100755--- a/browser_patches/firefox/archive.sh+++ b/browser_patches/firefox/archive.sh@@ -31,6 +31,7 @@ fitrap "cd $(pwd -P)" EXITcd "$(dirname "$0")"SCRIPT_FOLDER="$(pwd -P)"+source "${SCRIPT_FOLDER}/../utils.sh"if [[ ! -z "${FF_CHECKOUT_PATH}" ]]; thencd "${FF_CHECKOUT_PATH}"@@ -57,6 +58,10 @@ 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+ # Bundle vcruntime14_1.dll - see https://github.com/microsoft/playwright/issues/9974+ cd "$(printMSVCRedistDir)"+ cp -t "${OBJ_FOLDER}/dist/firefox" vcruntime140_1.dllfi# tar resulting directory and cleanup TMP.diff --git a/browser_patches/utils.sh b/browser_patches/utils.shindex a84176d47d..a5eba2705b 100644--- a/browser_patches/utils.sh+++ b/browser_patches/utils.sh@@ -31,3 +31,14 @@ function selectXcodeVersionOrDie() {export DEVELOPER_DIR="${XCODE_DIRECTORY}/Contents/Developer"echo "-- using ${XCODE_DIRECTORY}"}++# see https://docs.microsoft.com/en-us/visualstudio/install/tools-for-managing-visual-studio-instances?view=vs-2019+function printMSVCRedistDir() {+ local dll_file=$("C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find '**\Redist\MSVC\*\x64\**\vcruntime140.dll')+ local redist_dir=$(dirname "$dll_file")+ if ! [[ -d $redist_dir ]]; then+ echo "ERROR: cannot find MS VS C++ redistributable $redist_dir"+ exit 1;+ fi+ echo "$redist_dir"+}diff --git a/browser_patches/webkit/archive.sh b/browser_patches/webkit/archive.shindex 0750f7ed11..4f84bb4336 100755--- a/browser_patches/webkit/archive.sh+++ b/browser_patches/webkit/archive.sh@@ -76,17 +76,6 @@ createZipForLinux() {rm -rf "$tmpdir"}-# see https://docs.microsoft.com/en-us/visualstudio/install/tools-for-managing-visual-studio-instances?view=vs-2019-printMSVCRedistDir() {- local dll_file=$("C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find '**\Redist\MSVC\*\x64\**\vcruntime140.dll')- local redist_dir=$(dirname "$dll_file")- if ! [[ -d $redist_dir ]]; then- echo "ERROR: cannot find MS VS C++ redistributable $redist_dir"- exit 1;- fi- echo "$redist_dir"-}-createZipForWindows() {# create a TMP directory to copy all necessary fileslocal tmpdir="/tmp/webkit-deploy-$(date +%s)"@@ -142,5 +131,6 @@ createZipForMac() {trap "cd $(pwd -P)" EXITcd "$(dirname "$0")"SCRIPTS_DIR="$(pwd -P)"+source "${SCRIPTS_DIR}/../utils.sh"main "$@"