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

Fix #41184: wpt update-expectations shouldn't default to firefox #49839

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
9 changes: 5 additions & 4 deletions tools/wptrunner/wptrunner/wptcommandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def screenshot_api_wrapper(formatter, api):
return parser


def set_from_config(kwargs):
def set_from_config(kwargs, product_is_optional=False):
if kwargs["config"] is None:
config_path = config.path()
else:
Expand All @@ -436,7 +436,8 @@ def set_from_config(kwargs):

kwargs["config"] = config.read(kwargs["config_path"])

kwargs["product"] = products.Product(kwargs["config"], kwargs["product"])
if not product_is_optional or kwargs["product"] is not None:
kwargs["product"] = products.Product(kwargs["config"], kwargs["product"])

keys = {"paths": [("prefs", "prefs_root", "path"),
("run_info", "run_info", "path"),
Expand Down Expand Up @@ -685,7 +686,7 @@ def check_args(kwargs):


def check_args_metadata_update(kwargs):
set_from_config(kwargs)
set_from_config(kwargs, product_is_optional=True)

for item in kwargs["run_log"]:
if os.path.isdir(item):
Expand Down Expand Up @@ -722,7 +723,7 @@ def create_parser_metadata_update(product_choices=None):
description="Update script for web-platform-tests tests.")
# This will be removed once all consumers are updated to the properties-file based system
parser.add_argument("--product", choices=product_choices,
default="firefox", help=argparse.SUPPRESS)
help=argparse.SUPPRESS)
parser.add_argument("--config", type=abs_path, help="Path to config file")
parser.add_argument("--metadata", type=abs_path, dest="metadata_root",
help="Path to the folder containing test metadata")
Expand Down