Skip to content

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

devops: fetch chromium checkout if it has not been before (#5169)

Andrey Lushnikovb32301888137
diff --git a/browser_patches/chromium/build.sh b/browser_patches/chromium/build.sh
index d3699feff8..ecd3a7cb27 100755
--- a/browser_patches/chromium/build.sh
+++ b/browser_patches/chromium/build.sh
@@ -95,6 +95,18 @@ compile_chromium() {
# Update Chromium checkout. One might think that this step should go to `prepare_checkout.sh`
# script, but the `prepare_checkout.sh` is in fact designed to prepare a fork checkout, whereas
# we don't fork Chromium.
+ #
+ # This is based on https://chromium.googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md#get-the-code
+ if [[ ! -d "${CR_CHECKOUT_PATH}" ]]; then
+ mkdir "${CR_CHECKOUT_PATH}"
+ cd "${CR_CHECKOUT_PATH}"
+ fetch --no-hooks chromium
+ cd src
+ if [[ $(uname) == "Linux" ]]; then
+ ./build/install-build-deps.sh
+ fi
+ gclient runhooks
+ fi
cd "${CR_CHECKOUT_PATH}/src"
git checkout master
git pull origin master