Skip to content

Commit f72d87b

Browse files
committed
Identify projects with destination
1 parent 87b7cfd commit f72d87b

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

project.py

+14-4
Original file line numberDiff line numberDiff line change
@@ -729,11 +729,13 @@ def attach(self, subtarget):
729729

730730
def output_fd(self, subtarget):
731731
scheme_target = dict_get(subtarget, 'scheme', 'target', default=False)
732+
destination = dict_get(subtarget, 'destination', default=False)
732733
project_identifier = dict_get(self.target, 'path', default=False) + " " + \
733734
dict_get(subtarget, 'project', default="").split('-')[0]
734735
identifier = ': '.join(
735736
[subtarget['action'], project_identifier] +
736-
([scheme_target] if scheme_target else [])
737+
([scheme_target] if scheme_target else []) +
738+
([destination] if destination else [])
737739
)
738740
log_filename = re.sub(
739741
r"[^\w\_]+", "-", identifier.replace(': ', '_')
@@ -902,14 +904,18 @@ def failed(self, identifier, error):
902904
compatibility=compatible_swift,
903905
action_target = dict_get(self.action, 'scheme', 'target', default="Swift Package")
904906
)
907+
if 'destination' in self.action:
908+
error_str += ', ' + self.action['destination']
905909
result = ActionResult(Result.XFAIL, error_str)
906910
else:
907-
error_str = 'FAIL: {project}, {compatibility}, {action_target}, {error}'.format(
911+
error_str = 'FAIL: {project}, {compatibility}, {action_target}'.format(
908912
project=self.project['path'],
909913
compatibility=compatible_swift,
910-
action_target = dict_get(self.action, 'scheme', 'target', default="Swift Package"),
911-
error=str(error)
914+
action_target = dict_get(self.action, 'scheme', 'target', default="Swift Package")
912915
)
916+
if 'destination' in self.action:
917+
error_str += ', ' + self.action['destination']
918+
error_str += ', ' + str(error)
913919
result = ActionResult(Result.FAIL, error_str)
914920
common.debug_print(error_str)
915921
return result
@@ -933,13 +939,17 @@ def succeeded(self, identifier):
933939
compatibility=compatible_swift,
934940
action_target = dict_get(self.action, 'scheme', 'target', default="Swift Package")
935941
)
942+
if 'destination' in self.action:
943+
error_str += ', ' + self.action['destination']
936944
result = ActionResult(Result.UPASS, error_str)
937945
else:
938946
error_str = 'PASS: {project}, {compatibility}, {action_target}'.format(
939947
project=self.project['path'],
940948
compatibility=compatible_swift,
941949
action_target = dict_get(self.action, 'scheme', 'target', default="Swift Package")
942950
)
951+
if 'destination' in self.action:
952+
error_str += ', ' + self.action['destination']
943953
result = ActionResult(Result.PASS, error_str)
944954
common.debug_print(error_str)
945955
return result

0 commit comments

Comments
 (0)