Auto merge of #17984 - Manishearth:rm-testing, r=SimonSapin

Remove style/testing feature

We added this because a year ago we had no reliable Gecko CI. This meant that Gecko-only properties needed to be tested *somehow*, and we solved that by making it so that for unit tests we compile all properties, not just the servo ones.

This was useful back then, but I don't think we need this anymore. We have reliable Gecko CI, and all the gecko-only stuff we tested is adequately handled by the properties-database parsing mochitests. It's a bit of annoying cruft that just complicates things; we probably should remove it.

r? @emilio or @SimonSapin

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17984)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-08-08 07:35:29 -05:00 committed by GitHub
commit 32f835260c
33 changed files with 63 additions and 1181 deletions

View file

@ -304,18 +304,8 @@ class StyleStruct(object):
class PropertiesData(object):
"""
The `testing` parameter means that we're running tests.
In this situation, the `product` value is ignored while choosing
which shorthands and longhands to generate; and instead all properties for
which code exists for either servo or stylo are generated. Note that we skip
this behavior when the style crate is being built in gecko mode, because we
need manual glue for such properties and we don't have it.
"""
def __init__(self, product, testing):
def __init__(self, product):
self.product = product
self.testing = testing and product != "gecko"
self.style_structs = []
self.current_style_struct = None
self.longhands = []
@ -338,9 +328,9 @@ class PropertiesData(object):
for prefix in property.extra_prefixes:
property.alias.append('-%s-%s' % (prefix, property.name))
def declare_longhand(self, name, products="gecko servo", disable_when_testing=False, **kwargs):
def declare_longhand(self, name, products="gecko servo", **kwargs):
products = products.split()
if self.product not in products and not (self.testing and not disable_when_testing):
if self.product not in products:
return
longhand = Longhand(self.current_style_struct, name, **kwargs)
@ -354,10 +344,9 @@ class PropertiesData(object):
return longhand
def declare_shorthand(self, name, sub_properties, products="gecko servo",
disable_when_testing=False, *args, **kwargs):
def declare_shorthand(self, name, sub_properties, products="gecko servo", *args, **kwargs):
products = products.split()
if self.product not in products and not (self.testing and not disable_when_testing):
if self.product not in products:
return
sub_properties = [self.longhands_by_name[s] for s in sub_properties]