Skip to content

Commit

Permalink
Merge pull request #99 from w3c/jgraham/include_fix
Browse files Browse the repository at this point in the history
Fix regression in handling of paths as include arguments
  • Loading branch information
jgraham committed Apr 14, 2015
2 parents 576fc1d + 3d3ea1f commit e451227
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion wptrunner/manifestinclude.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _get_components(self, url):
return rv

def _add_rule(self, test_manifests, url, direction):
maybe_path = os.path.abspath(os.path.join(os.curdir, url)[1:])
maybe_path = os.path.join(os.path.abspath(os.curdir), url)
rest, last = os.path.split(maybe_path)
variant = ""
if "#" in last:
Expand Down
10 changes: 2 additions & 8 deletions wptrunner/wptcommandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ def url_or_path(path):
else:
return abs_path(path)

def slash_prefixed(url):
if not url.startswith("/"):
url = "/" + url
return url


def require_arg(kwargs, name, value_func=None):
if value_func is None:
value_func = lambda x: x is not None
Expand Down Expand Up @@ -97,9 +91,9 @@ def create_parser(product_choices=None):
nargs="*", default=["testharness", "reftest"],
choices=["testharness", "reftest"],
help="Test types to run")
test_selection_group.add_argument("--include", action="append", type=slash_prefixed,
test_selection_group.add_argument("--include", action="append",
help="URL prefix to include")
test_selection_group.add_argument("--exclude", action="append", type=slash_prefixed,
test_selection_group.add_argument("--exclude", action="append",
help="URL prefix to exclude")
test_selection_group.add_argument("--include-manifest", type=abs_path,
help="Path to manifest listing tests to include")
Expand Down

0 comments on commit e451227

Please sign in to comment.