def get_test_filename(test_class_name):
return os.path.join(self.workdir, "TEST-{0}.xml".format(test_class_name.replace("$", "-")))
xml_filenames_to_targets = defaultdict()
for test, target in tests_and_targets.items():
if target is None:
self.context.log.warn("Unknown target for test %{0}".format(test))
// Look for a TEST-*.xml file that matches the classname or a containing classname
test_class_name = test
for _part in test.split("$"):
filename = get_test_filename(test_class_name)
if os.path.exists(filename):
xml_filenames_to_targets[filename] = target
break
else:
test_class_name = test_class_name.rsplit("$", 1)[0]
failed_targets = defaultdict(set)
for xml_filename, target in xml_filenames_to_targets.items():
try:
xml = XmlParser.from_file(xml_filename)