mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
Bug 1442216 [wpt PR 9732] - Update reftest graph when node changes to support, a=testonly
Automatic update from web-platform-testsUpdate reftest graph when node changes to support (#9732) Modified conditional in manifest.py to check for a reftest node changing to another type. Wrote a test in test_manifest.py for the same wpt-commits: 2560d71e083b5798154038589205f75f54442601 wpt-pr: 9732 wpt-commits: 2560d71e083b5798154038589205f75f54442601 wpt-pr: 9732
This commit is contained in:
parent
430380d6b1
commit
089c21ef83
@ -91,7 +91,7 @@ class Manifest(object):
|
||||
hash_changed = True
|
||||
else:
|
||||
new_type, manifest_items = old_type, self._data[old_type][rel_path]
|
||||
if old_type == "reftest" and new_type != old_type:
|
||||
if old_type in ("reftest", "reftest_node") and new_type != old_type:
|
||||
reftest_changes = True
|
||||
else:
|
||||
new_type, manifest_items = source_file.manifest_items()
|
||||
|
@ -254,6 +254,30 @@ def test_reftest_computation_chain_update_test_type():
|
||||
assert list(m) == [("testharness", test2.path, {test2})]
|
||||
|
||||
|
||||
def test_reftest_computation_chain_update_node_change():
|
||||
m = manifest.Manifest()
|
||||
|
||||
s1 = SourceFileWithTest("test1", "0"*40, item.RefTest, [("/test2", "==")])
|
||||
s2 = SourceFileWithTest("test2", "0"*40, item.RefTestNode, [("/test3", "==")])
|
||||
|
||||
assert m.update([s1, s2]) is True
|
||||
|
||||
test1 = s1.manifest_items()[1][0]
|
||||
test2 = s2.manifest_items()[1][0]
|
||||
|
||||
assert list(m) == [("reftest", test1.path, {test1}),
|
||||
("reftest_node", test2.path, {test2})]
|
||||
|
||||
#test2 changes to support type
|
||||
s2 = SourceFileWithTest("test2", "1"*40, item.SupportFile)
|
||||
|
||||
assert m.update([s1,s2]) is True
|
||||
test3 = s2.manifest_items()[1][0]
|
||||
|
||||
assert list(m) == [("reftest", test1.path, {test1}),
|
||||
("support", test3.path, {test3})]
|
||||
|
||||
|
||||
def test_iterpath():
|
||||
m = manifest.Manifest()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user