When merging tests, prefer non-blocklisted ones.
The test blocklist was failing when multiple tests were merged into one. To fix this, when merging tests we prefer ones that are not blocklisted. Fixes: 193790055 Test: Run on the previously failing crate and another. Change-Id: I53d1179bebef824ce80ac4f977015b04a26f8607
This commit is contained in:
@@ -303,6 +303,9 @@ class Crate(object):
|
|||||||
# which can be changed if self is a merged test module.
|
# which can be changed if self is a merged test module.
|
||||||
self.decide_module_type()
|
self.decide_module_type()
|
||||||
if should_merge_test:
|
if should_merge_test:
|
||||||
|
if (self.main_src in self.runner.args.test_blocklist and
|
||||||
|
not other.main_src in self.runner.args.test_blocklist):
|
||||||
|
self.main_src = other.main_src
|
||||||
self.srcs.append(other.main_src)
|
self.srcs.append(other.main_src)
|
||||||
# use a short unique name as the merged module name.
|
# use a short unique name as the merged module name.
|
||||||
prefix = self.root_pkg + '_tests'
|
prefix = self.root_pkg + '_tests'
|
||||||
|
|||||||
Reference in New Issue
Block a user