Skip to content

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

devops: build winldd on buildbots (#3917)

Andrey Lushnikovfda31dfca237
diff --git a/bin/README.md b/bin/README.md
index d0559fc648..eb6a2c8fff 100644
--- a/bin/README.md
+++ b/bin/README.md
@@ -1,2 +1,2 @@
-See building instructions at [`//browser_patches/tools/PrintDepsWindows/README.md`](../browser_patches/tools/PrintDepsWindows/README.md)
+See building instructions at [`//browser_patches/tools/PrintDepsWindows/README.md`](../browser_patches/winldd/README.md)
diff --git a/browser_patches/buildbots/buildbot-windows.sh b/browser_patches/buildbots/buildbot-windows.sh
index 75ad83cd1f..a4812efd34 100755
--- a/browser_patches/buildbots/buildbot-windows.sh
+++ b/browser_patches/buildbots/buildbot-windows.sh
@@ -50,6 +50,8 @@ while true; do
../checkout_build_archive_upload.sh firefox-win32 || true
git pull origin master
../checkout_build_archive_upload.sh firefox-win64 || true
+ git pull origin master
+ ../checkout_build_archive_upload.sh winldd-win64 || true
newTimestamp=$(date +%s)
delta=$(( 300 - newTimestamp + timestamp ));
if (( delta > 0 )); then
diff --git a/browser_patches/checkout_build_archive_upload.sh b/browser_patches/checkout_build_archive_upload.sh
index 42f21a52a2..cceb5d8edb 100755
--- a/browser_patches/checkout_build_archive_upload.sh
+++ b/browser_patches/checkout_build_archive_upload.sh
@@ -36,7 +36,11 @@ BUILD_FLAVOR="$1"
BUILD_BLOB_NAME=""
EXPECTED_HOST_OS=""
EXPECTED_HOST_OS_VERSION=""
-if [[ "$BUILD_FLAVOR" == "ffmpeg-mac" ]]; then
+if [[ "$BUILD_FLAVOR" == "winldd-win64" ]]; then
+ BROWSER_NAME="winldd"
+ EXPECTED_HOST_OS="MINGW"
+ BUILD_BLOB_NAME="winldd-win64.zip"
+elif [[ "$BUILD_FLAVOR" == "ffmpeg-mac" ]]; then
BROWSER_NAME="ffmpeg"
EXTRA_BUILD_ARGS="--mac"
EXPECTED_HOST_OS="Darwin"
diff --git a/browser_patches/tools/PrintDepsWindows/.gitignore b/browser_patches/winldd/.gitignore
similarity index 100%
rename from browser_patches/tools/PrintDepsWindows/.gitignore
rename to browser_patches/winldd/.gitignore
diff --git a/browser_patches/winldd/BUILD_NUMBER b/browser_patches/winldd/BUILD_NUMBER
new file mode 100644
index 0000000000..83b33d238d
--- /dev/null
+++ b/browser_patches/winldd/BUILD_NUMBER
@@ -0,0 +1 @@
+1000
diff --git a/browser_patches/tools/PrintDepsWindows/PrintDeps.cpp b/browser_patches/winldd/PrintDeps.cpp
similarity index 100%
rename from browser_patches/tools/PrintDepsWindows/PrintDeps.cpp
rename to browser_patches/winldd/PrintDeps.cpp
diff --git a/browser_patches/tools/PrintDepsWindows/PrintDeps.sln b/browser_patches/winldd/PrintDeps.sln
similarity index 100%
rename from browser_patches/tools/PrintDepsWindows/PrintDeps.sln
rename to browser_patches/winldd/PrintDeps.sln
diff --git a/browser_patches/tools/PrintDepsWindows/PrintDeps.vcxproj b/browser_patches/winldd/PrintDeps.vcxproj
similarity index 100%
rename from browser_patches/tools/PrintDepsWindows/PrintDeps.vcxproj
rename to browser_patches/winldd/PrintDeps.vcxproj
diff --git a/browser_patches/tools/PrintDepsWindows/PrintDeps.vcxproj.filters b/browser_patches/winldd/PrintDeps.vcxproj.filters
similarity index 100%
rename from browser_patches/tools/PrintDepsWindows/PrintDeps.vcxproj.filters
rename to browser_patches/winldd/PrintDeps.vcxproj.filters
diff --git a/browser_patches/tools/PrintDepsWindows/PrintDeps.vcxproj.user b/browser_patches/winldd/PrintDeps.vcxproj.user
similarity index 100%
rename from browser_patches/tools/PrintDepsWindows/PrintDeps.vcxproj.user
rename to browser_patches/winldd/PrintDeps.vcxproj.user
diff --git a/browser_patches/tools/PrintDepsWindows/README.md b/browser_patches/winldd/README.md
similarity index 100%
rename from browser_patches/tools/PrintDepsWindows/README.md
rename to browser_patches/winldd/README.md
diff --git a/browser_patches/winldd/archive.sh b/browser_patches/winldd/archive.sh
new file mode 100755
index 0000000000..ad086375a1
--- /dev/null
+++ b/browser_patches/winldd/archive.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+set -e
+set +x
+
+if [[ ("$1" == "-h") || ("$1" == "--help") ]]; then
+ echo "usage: $(basename $0) [output-absolute-path]"
+ echo
+ echo "Generate distributable .zip archive from ./x64 folder that was previously built."
+ echo
+ exit 0
+fi
+
+if [[ "$(uname)" != MINGW* ]]; then
+ echo "ERROR: this script only supports MINGW (windows)"
+ exit 1
+fi
+
+ZIP_PATH=$1
+if [[ $ZIP_PATH != /* ]]; then
+ echo "ERROR: path $ZIP_PATH is not absolute"
+ exit 1
+fi
+if [[ $ZIP_PATH != *.zip ]]; then
+ echo "ERROR: path $ZIP_PATH must have .zip extension"
+ exit 1
+fi
+if [[ -f $ZIP_PATH ]]; then
+ echo "ERROR: path $ZIP_PATH exists; can't do anything."
+ exit 1
+fi
+if ! [[ -d $(dirname $ZIP_PATH) ]]; then
+ echo "ERROR: folder for path $($ZIP_PATH) does not exist."
+ exit 1
+fi
+
+trap "cd $(pwd -P)" EXIT
+cd "$(dirname "$0")"
+
+# create a TMP directory to copy all necessary files
+cd ./x64/Release
+zip $ZIP_PATH ./PrintDeps.exe
+
diff --git a/browser_patches/winldd/build.sh b/browser_patches/winldd/build.sh
new file mode 100755
index 0000000000..7eb65d261b
--- /dev/null
+++ b/browser_patches/winldd/build.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+set -e
+set +x
+
+trap "cd $(pwd -P)" EXIT
+cd "$(dirname $0)"
+
+if [[ "$(uname)" == MINGW* ]]; then
+ /c/Windows/System32/cmd.exe "/c buildwin.bat"
+else
+ echo "ERROR: cannot upload on this platform!" 1>&2
+ exit 1;
+fi
diff --git a/browser_patches/winldd/buildwin.bat b/browser_patches/winldd/buildwin.bat
new file mode 100644
index 0000000000..c3810004a9
--- /dev/null
+++ b/browser_patches/winldd/buildwin.bat
@@ -0,0 +1 @@
+%DEVENV% %~dp0\PrintDeps.sln /build "Release|x64"
diff --git a/browser_patches/winldd/clean.sh b/browser_patches/winldd/clean.sh
new file mode 100755
index 0000000000..5c4cb59ee4
--- /dev/null
+++ b/browser_patches/winldd/clean.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -e
+set +x
+
+trap "cd $(pwd -P)" EXIT
+cd "$(dirname $0)"
+
+rm -rf ./x64