Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass the binary path of Chrome to wpt run in CI #10064

Merged
merged 2 commits into from
Mar 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions tools/ci/ci_stability.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,23 @@ cd $WPT_ROOT
source tools/ci/lib.sh

test_stability() {
./wpt check-stability $PRODUCT --output-bytes $((1024 * 1024 * 3)) --metadata ~/meta/ --install-fonts
local extra_arg=$1
./wpt check-stability $PRODUCT $extra_arg --output-bytes $((1024 * 1024 * 3)) --metadata ~/meta/ --install-fonts
}

main() {
hosts_fixup
local extra_arg=""
if [ $(echo $PRODUCT | grep '^chrome:') ]; then
install_chrome $(echo $PRODUCT | grep --only-matching '\w\+$')
local channel=$(echo $PRODUCT | grep --only-matching '\w\+$')
if [[ $channel == "dev" ]]; then
# The package name for Google Chrome Dev uses "unstable", not "dev".
channel="unstable"
fi
install_chrome $channel
extra_arg="--binary=$(which google-chrome-$channel)"
fi
test_stability
test_stability $extra_arg
}

main
2 changes: 1 addition & 1 deletion tools/ci/ci_wpt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ source tools/ci/lib.sh
main() {
git fetch --unshallow https://github.com/w3c/web-platform-tests.git +refs/heads/*:refs/remotes/origin/*
hosts_fixup
install_chrome dev
install_chrome unstable
pip install -U tox codecov
cd tools/wpt
tox
Expand Down
10 changes: 7 additions & 3 deletions tools/ci/ci_wptrunner_infrastructure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,26 @@ test_infrastructure() {
local ARGS="";
if [ $PRODUCT == "firefox" ]; then
ARGS="--install-browser"
else
ARGS=$1
fi
./wpt run --yes --manifest ~/meta/MANIFEST.json --metadata infrastructure/metadata/ --install-fonts $ARGS $PRODUCT infrastructure/
}

main() {
PRODUCTS=( "firefox" )
PRODUCTS=( "firefox" "chrome" )
for PRODUCT in "${PRODUCTS[@]}"; do
if [ "$PRODUCT" != "firefox" ]; then
# Firefox is expected to work using pref settings for DNS
# Don't adjust the hostnames in that case to ensure this keeps working
hosts_fixup
fi
if [ "$PRODUCT" == "chrome" ]; then
install_chrome dev
install_chrome unstable
test_infrastructure "--binary=$(which google-chrome-unstable)"
else
test_infrastructure
fi
test_infrastructure
done
}

Expand Down
4 changes: 0 additions & 4 deletions tools/ci/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ hosts_fixup() {

install_chrome() {
channel=$1
# The package name for Google Chrome Dev uses "unstable", not "dev".
if [[ $channel == "dev" ]]; then
channel="unstable"
fi
deb_archive=google-chrome-${channel}_current_amd64.deb
wget https://dl.google.com/linux/direct/$deb_archive

Expand Down
2 changes: 1 addition & 1 deletion tools/wptrunner/wptrunner/executors/executorselenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def close_old_windows(self):
for handle in handles:
try:
self.webdriver.switch_to_window(handle)
self.webdriver.close_window()
self.webdriver.close()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes a regression from 517c2ff (#9391).

except exceptions.NoSuchWindowException:
pass
self.webdriver.switch_to_window(exclude)
Expand Down