Skip to content

Commit

Permalink
tests(devtools): skip type checking in local builds (#15858)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine committed Mar 7, 2024
1 parent e72a9c9 commit 045f706
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
9 changes: 5 additions & 4 deletions core/scripts/build-devtools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -euo pipefail
# 1) Builds Lighthouse bundle for DevTools
# 2) Rolls to local devtools repo. By default, this is the temporary checkout in .tmp
# 3) Builds devtools frontend with new Lighthouse roll
#
#
# Run `bash core/test/devtools-tests/setup.sh` first to update the temporary devtools checkout.
# Specify `$DEVTOOLS_PATH` to use a different devtools repo.
# Specify `$BUILD_FOLDER` to use a build other than 'LighthouseIntegration' (ex: Default).
Expand All @@ -22,6 +22,7 @@ TEST_DIR="$LH_ROOT/.tmp/chromium-web-tests"
DEFAULT_DEVTOOLS_PATH="$TEST_DIR/devtools/devtools-frontend"
DEVTOOLS_PATH=${DEVTOOLS_PATH:-"$DEFAULT_DEVTOOLS_PATH"}
BUILD_FOLDER="${BUILD_FOLDER:-LighthouseIntegration}"
CI="${CI:-}"

echo "DEVTOOLS_PATH: $DEVTOOLS_PATH"

Expand All @@ -43,10 +44,10 @@ fi
yarn devtools "$DEVTOOLS_PATH"

cd "$DEVTOOLS_PATH"
if git config user.email | grep -q '@google.com'; then
gn gen "out/$BUILD_FOLDER" --args='devtools_dcheck_always_on=true is_debug=false use_goma=true'
else
if [[ "$CI" ]]; then
gn gen "out/$BUILD_FOLDER" --args='devtools_dcheck_always_on=true is_debug=false'
else
gn gen "out/$BUILD_FOLDER" --args='devtools_dcheck_always_on=true is_debug=false devtools_skip_typecheck=true'
fi
gclient sync
autoninja -C "out/$BUILD_FOLDER"
7 changes: 4 additions & 3 deletions core/test/devtools-tests/download-devtools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set -euxo pipefail
##

BUILD_FOLDER="${BUILD_FOLDER:-LighthouseIntegration}"
CI="${CI:-}"

if [ -d "$DEVTOOLS_PATH" ]
then
Expand All @@ -34,8 +35,8 @@ cd `dirname $DEVTOOLS_PATH`
fetch --nohooks --no-history devtools-frontend
cd devtools-frontend
gclient sync
if git config user.email | grep -q '@google.com'; then
gn gen "out/$BUILD_FOLDER" --args='devtools_dcheck_always_on=true is_debug=false use_goma=true'
else
if [[ "$CI" ]]; then
gn gen "out/$BUILD_FOLDER" --args='devtools_dcheck_always_on=true is_debug=false'
else
gn gen "out/$BUILD_FOLDER" --args='devtools_dcheck_always_on=true is_debug=false devtools_skip_typecheck=true'
fi
7 changes: 4 additions & 3 deletions core/test/devtools-tests/roll-devtools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set -euo pipefail
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
LH_ROOT="$SCRIPT_DIR/../../.."
BUILD_FOLDER="${BUILD_FOLDER:-LighthouseIntegration}"
CI="${CI:-}"

roll_devtools() {
# Roll devtools. Besides giving DevTools the latest lighthouse source files,
Expand All @@ -29,10 +30,10 @@ roll_devtools
# `yarn devtools` deleted.
gclient sync --delete_unversioned_trees --reset

if git config user.email | grep -q '@google.com'; then
gn gen "out/$BUILD_FOLDER" --args='devtools_dcheck_always_on=true is_debug=false use_goma=true'
else
if [[ "$CI" ]]; then
gn gen "out/$BUILD_FOLDER" --args='devtools_dcheck_always_on=true is_debug=false'
else
gn gen "out/$BUILD_FOLDER" --args='devtools_dcheck_always_on=true is_debug=false devtools_skip_typecheck=true'
fi

# Build devtools. By default, this creates `out/LighthouseIntegration/gen/front_end`.
Expand Down

0 comments on commit 045f706

Please sign in to comment.