示例#1
0
 def _add_key_value(self, node, values):
     ManifestItem._add_key_value(self, node, values)
     if node.data in self.update_properties:
         new_updated = []
         self.update_properties[node.data].updated = new_updated
         for value in values:
             new_updated.append((value, []))
示例#2
0
    def __init__(self, node, test_path, url_base, run_info_properties):
        """Object representing all the tests in a particular manifest

        :param node: AST Node associated with this object. If this is None,
                     a new AST is created to associate with this manifest.
        :param test_path: Path of the test file associated with this manifest.
        :param url_base: Base url for serving the tests in this manifest.
        :param run_info_properties: Tuple of ([property name],
                                              {property_name: [dependent property]})
                                    The first part lists run_info properties
                                    that are always used in the update, the second
                                    maps property names to additional properties that
                                    can be considered if we already have a condition on
                                    the key property e.g. {"foo": ["bar"]} means that
                                    we consider making conditions on bar only after we
                                    already made one on foo.
        """
        if node is None:
            node = DataNode(None)
        ManifestItem.__init__(self, node)
        self.child_map = {}
        self.test_path = test_path
        self.url_base = url_base
        assert self.url_base is not None
        self._modified = False
        self.run_info_properties = run_info_properties

        self.update_properties = UpdateProperties(
            self, **{
                "lsan": LsanUpdate,
                "leak_object": LeakObjectUpdate,
                "leak_threshold": LeakThresholdUpdate,
            })
    def __init__(self, node, test_path=None, url_base=None, property_order=None,
                 boolean_properties=None):
        """Object representing all the tests in a particular manifest

        :param node: AST Node associated with this object. If this is None,
                     a new AST is created to associate with this manifest.
        :param test_path: Path of the test file associated with this manifest.
        :param url_base: Base url for serving the tests in this manifest.
        :param property_order: List of properties to use in expectation metadata
                               from most to least significant.
        :param boolean_properties: Set of properties in property_order that should
                                   be treated as boolean.
        """
        if node is None:
            node = DataNode(None)
        ManifestItem.__init__(self, node)
        self.child_map = {}
        self.test_path = test_path
        self.url_base = url_base
        assert self.url_base is not None
        self.modified = False
        self.boolean_properties = boolean_properties
        self.property_order = property_order
        self.update_properties = {
            "lsan": LsanUpdate(self),
            "leak-object": LeakObjectUpdate(self),
            "leak-threshold": LeakThresholdUpdate(self),
        }
示例#4
0
    def __init__(self,
                 node,
                 test_path=None,
                 url_base=None,
                 property_order=None,
                 boolean_properties=None):
        """Object representing all the tests in a particular manifest

        :param node: AST Node associated with this object. If this is None,
                     a new AST is created to associate with this manifest.
        :param test_path: Path of the test file associated with this manifest.
        :param url_base: Base url for serving the tests in this manifest.
        :param property_order: List of properties to use in expectation metadata
                               from most to least significant.
        :param boolean_properties: Set of properties in property_order that should
                                   be treated as boolean.
        """
        if node is None:
            node = DataNode(None)
        ManifestItem.__init__(self, node)
        self.child_map = {}
        self.test_path = test_path
        self.url_base = url_base
        assert self.url_base is not None
        self.modified = False
        self.boolean_properties = boolean_properties
        self.property_order = property_order
 def _add_key_value(self, node, values):
     ManifestItem._add_key_value(self, node, values)
     if node.data in self.update_properties:
         new_updated = []
         self.update_properties[node.data].updated = new_updated
         for value in values:
             new_updated.append((value, []))
示例#6
0
    def __init__(self, node):
        """Node in a tree structure representing the paths
        that should be included or excluded from the test run.

        :param node: AST Node corresponding to this Node.
        """
        ManifestItem.__init__(self, node)
        self.child_map = {}
示例#7
0
    def __init__(self, node):
        """Node in a tree structure representing the paths
        that should be included or excluded from the test run.

        :param node: AST Node corresponding to this Node.
        """
        ManifestItem.__init__(self, node)
        self.child_map = {}
示例#8
0
    def __init__(self, node):
        """Tree node associated with a particular test in a manifest

        :param node: AST node associated with the test"""

        ManifestItem.__init__(self, node)
        self.updated_expected = []
        self.new_expected = []
        self.subtests = {}
        self.default_status = None
        self._from_file = True
示例#9
0
    def __init__(self, node):
        """Tree node associated with a particular test in a manifest

        :param node: AST node associated with the test"""

        ManifestItem.__init__(self, node)
        self.updated_expected = []
        self.new_expected = []
        self.subtests = {}
        self.default_status = None
        self._from_file = True
示例#10
0
    def __init__(self, node, test_path=None):
        """Object representing all the tests in a particular manifest

        :param node: AST Node associated with this object. If this is None,
                     a new AST is created to associate with this manifest.
        :param test_path: Path of the test file associated with this manifest.
        """
        if node is None:
            node = DataNode(None)
        ManifestItem.__init__(self, node)
        self.child_map = {}
        self.test_path = test_path
        self.modified = False
    def __init__(self, node):
        """Tree node associated with a particular test in a manifest

        :param node: AST node associated with the test"""

        ManifestItem.__init__(self, node)
        self.subtests = {}
        self._from_file = True
        self.update_properties = {
            "expected": ExpectedUpdate(self),
            "max-asserts": MaxAssertsUpdate(self),
            "min-asserts": MinAssertsUpdate(self)
        }
示例#12
0
    def __init__(self, node):
        """Tree node associated with a particular test in a manifest

        :param node: AST node associated with the test"""

        ManifestItem.__init__(self, node)
        self.subtests = {}
        self._from_file = True
        self.update_properties = {
            "expected": ExpectedUpdate(self),
            "max-asserts": MaxAssertsUpdate(self),
            "min-asserts": MinAssertsUpdate(self)
        }
示例#13
0
    def __init__(self, node):
        """Tree node associated with a particular test in a manifest

        :param node: AST node associated with the test"""

        ManifestItem.__init__(self, node)
        self.subtests = {}
        self._from_file = True
        self.new_disabled = False
        self.has_result = False
        self.modified = False
        self.update_properties = UpdateProperties(self,
                                                  expected=ExpectedUpdate,
                                                  max_asserts=MaxAssertsUpdate,
                                                  min_asserts=MinAssertsUpdate)
示例#14
0
    def __init__(self,
                 node,
                 test_path,
                 url_base,
                 run_info_properties,
                 update_intermittent=False,
                 remove_intermittent=False):
        """Object representing all the tests in a particular manifest

        :param node: AST Node associated with this object. If this is None,
                     a new AST is created to associate with this manifest.
        :param test_path: Path of the test file associated with this manifest.
        :param url_base: Base url for serving the tests in this manifest.
        :param run_info_properties: Tuple of ([property name],
                                              {property_name: [dependent property]})
                                    The first part lists run_info properties
                                    that are always used in the update, the second
                                    maps property names to additional properties that
                                    can be considered if we already have a condition on
                                    the key property e.g. {"foo": ["bar"]} means that
                                    we consider making conditions on bar only after we
                                    already made one on foo.
        :param update_intermittent: When True, intermittent statuses will be recorded
                                    as `expected` in the test metadata.
        :param: remove_intermittent: When True, old intermittent statuses will be removed
                                    if no longer intermittent. This is only relevant if
                                    `update_intermittent` is also True, because if False,
                                    the metadata will simply update one `expected`status.
        """
        if node is None:
            node = DataNode(None)
        ManifestItem.__init__(self, node)
        self.child_map = {}
        self.test_path = test_path
        self.url_base = url_base
        assert self.url_base is not None
        self._modified = False
        self.run_info_properties = run_info_properties
        self.update_intermittent = update_intermittent
        self.remove_intermittent = remove_intermittent
        self.update_properties = UpdateProperties(
            self, **{
                "lsan": LsanUpdate,
                "leak_object": LeakObjectUpdate,
                "leak_threshold": LeakThresholdUpdate,
            })
示例#15
0
 def append(self, child):
     ManifestItem.append(self, child)
     if child.id in self.child_map:
         print "Warning: Duplicate heading %s" % child.id
     self.child_map[child.id] = child
示例#16
0
 def append(self, node):
     child = ManifestItem.append(self, node)
     self.subtests[child.name] = child
示例#17
0
 def _add_key_value(self, node, values):
     ManifestItem._add_key_value(self, node, values)
     if node.data == "expected":
         self.updated_expected = []
         for value in values:
             self.updated_expected.append((value, []))
示例#18
0
 def _remove_child(self, child):
     del self.child_map[child.id]
     ManifestItem._remove_child(self, child)
     assert len(self.child_map) == len(self.children)
示例#19
0
 def append(self, node):
     child = ManifestItem.append(self, node)
     self.subtests[child.name] = child
示例#20
0
 def append(self, child):
     ManifestItem.append(self, child)
     self.child_map[child.name] = child
     assert len(self.child_map) == len(self.children)
示例#21
0
 def append(self, child):
     ManifestItem.append(self, child)
     if child.id in self.child_map:
         print("Warning: Duplicate heading %s" % child.id)
     self.child_map[child.id] = child
示例#22
0
 def append(self, child):
     ManifestItem.append(self, child)
     self.child_map[child.name] = child
     assert len(self.child_map) == len(self.children)
示例#23
0
 def _add_key_value(self, node, values):
     ManifestItem._add_key_value(self, node, values)
     if node.data == "expected":
         self.updated_expected = []
         for value in values:
             self.updated_expected.append((value, []))
示例#24
0
 def _remove_child(self, child):
     del self.child_map[child.id]
     ManifestItem._remove_child(self, child)
示例#25
0
 def _remove_child(self, child):
     del self.child_map[child.id]
     ManifestItem._remove_child(self, child)
示例#26
0
 def _remove_child(self, child):
     del self.child_map[child.id]
     ManifestItem._remove_child(self, child)
     assert len(self.child_map) == len(self.children)