diff --git a/tools/manifest/item.py b/tools/manifest/item.py index ea0c9b1742c63a..9619813fc9bead 100644 --- a/tools/manifest/item.py +++ b/tools/manifest/item.py @@ -329,12 +329,6 @@ class VisualTest(URLManifestItem): item_type = "visual" -class Stub(URLManifestItem): - __slots__ = () - - item_type = "stub" - - class WebDriverSpecTest(URLManifestItem): __slots__ = () diff --git a/tools/manifest/manifest.py b/tools/manifest/manifest.py index 616f95eb2c692d..8aace771cba32a 100644 --- a/tools/manifest/manifest.py +++ b/tools/manifest/manifest.py @@ -5,7 +5,7 @@ from six import iteritems, iterkeys, itervalues, string_types, binary_type, text_type from . import vcs -from .item import (ConformanceCheckerTest, ManifestItem, ManualTest, RefTest, RefTestNode, Stub, +from .item import (ConformanceCheckerTest, ManifestItem, ManualTest, RefTest, RefTestNode, SupportFile, TestharnessTest, VisualTest, WebDriverSpecTest) from .log import get_logger from .sourcefile import SourceFile @@ -51,7 +51,6 @@ class ManifestVersionMismatch(ManifestError): "reftest": RefTest, "reftest_node": RefTestNode, "manual": ManualTest, - "stub": Stub, "wdspec": WebDriverSpecTest, "conformancechecker": ConformanceCheckerTest, "visual": VisualTest, @@ -471,6 +470,14 @@ def from_json(cls, tests_root, obj, types=None): self._path_hash = {to_os_path(k): v for k, v in iteritems(obj["paths"])} for test_type, type_paths in iteritems(obj["items"]): + # Drop "stub" items, which are no longer supported but may be + # present when doing an incremental manifest update. + # See https://github.com/web-platform-tests/rfcs/pull/27 for background. + # + # TODO(MANIFESTv7): remove this condition + if test_type == "stub": + continue + if test_type not in item_classes: raise ManifestError diff --git a/tools/manifest/sourcefile.py b/tools/manifest/sourcefile.py index 54cd3b744886f7..4788fc9bdb6404 100644 --- a/tools/manifest/sourcefile.py +++ b/tools/manifest/sourcefile.py @@ -33,7 +33,7 @@ import html5lib from . import XMLParser -from .item import (ManifestItem, Stub, ManualTest, WebDriverSpecTest, RefTestNode, TestharnessTest, +from .item import (ManifestItem, ManualTest, WebDriverSpecTest, RefTestNode, TestharnessTest, SupportFile, ConformanceCheckerTest, VisualTest) from .utils import ContextManagerBytesIO, cached_property @@ -352,13 +352,6 @@ def name_is_conformance_support(self): # type: () -> bool return self.in_conformance_checker_dir() - @property - def name_is_stub(self): - # type: () -> bool - """Check if the file name matches the conditions for the file to - be a stub file""" - return self.name_prefix("stub-") - @property def name_is_manual(self): # type: () -> bool @@ -793,15 +786,6 @@ def manifest_items(self): self.rel_path )] # type: Tuple[Text, List[ManifestItem]] - elif self.name_is_stub: - rv = Stub.item_type, [ - Stub( - self.tests_root, - self.rel_path, - self.url_base, - self.rel_url - )] - elif self.name_is_manual: rv = ManualTest.item_type, [ ManualTest( diff --git a/tools/manifest/tests/test_manifest.py b/tools/manifest/tests/test_manifest.py index 5717173b3f268b..8e008be091181d 100644 --- a/tools/manifest/tests/test_manifest.py +++ b/tools/manifest/tests/test_manifest.py @@ -50,7 +50,7 @@ def rel_dir_file_path(draw): @hs.composite def sourcefile_strategy(draw): item_classes = [item.TestharnessTest, item.RefTestNode, - item.ManualTest, item.Stub, item.WebDriverSpecTest, + item.ManualTest, item.WebDriverSpecTest, item.ConformanceCheckerTest, item.SupportFile] cls = draw(hs.sampled_from(item_classes)) diff --git a/tools/wptrunner/wptrunner/metadata.py b/tools/wptrunner/wptrunner/metadata.py index ca6165f7ad09bb..c614cbaa888720 100644 --- a/tools/wptrunner/wptrunner/metadata.py +++ b/tools/wptrunner/wptrunner/metadata.py @@ -454,7 +454,7 @@ def create_test_tree(metadata_path, test_manifest): """ do_delayed_imports() id_test_map = {} - exclude_types = frozenset(["stub", "manual", "support", "conformancechecker"]) + exclude_types = frozenset(["manual", "support", "conformancechecker"]) all_types = set(manifestitem.item_types.keys()) assert all_types > exclude_types include_types = all_types - exclude_types diff --git a/tools/wptrunner/wptrunner/tests/test_update.py b/tools/wptrunner/wptrunner/tests/test_update.py index 3860ba6f36d1f6..b6a564216cc212 100644 --- a/tools/wptrunner/wptrunner/tests/test_update.py +++ b/tools/wptrunner/wptrunner/tests/test_update.py @@ -31,7 +31,6 @@ def SourceFileWithTest(path, hash, cls, *args): "reftest": manifest_item.RefTest, "reftest_node": manifest_item.RefTestNode, "manual": manifest_item.ManualTest, - "stub": manifest_item.Stub, "wdspec": manifest_item.WebDriverSpecTest, "conformancechecker": manifest_item.ConformanceCheckerTest, "visual": manifest_item.VisualTest,