@@ -668,6 +668,18 @@ def passes(self):
668
668
def all (self ):
669
669
return [i for l in self .subresults .values () for i in l ]
670
670
671
+ def recursive_all (self ):
672
+ stack = self .all ()
673
+ actions = []
674
+ while stack :
675
+ result = stack .pop (0 )
676
+ if isinstance (result , ActionResult ):
677
+ actions .append (result )
678
+ else :
679
+ for r in result .all ():
680
+ stack .insert (0 , r )
681
+ return actions
682
+
671
683
@property
672
684
def result (self ):
673
685
if self .subresults [Result .FAIL ]:
@@ -695,10 +707,14 @@ class ProjectListResult(ListResult):
695
707
def __str__ (self ):
696
708
output = ""
697
709
698
- xfails = [ar for pr in self .all () for vr in pr .all () for ar in vr .xfails ()]
699
- fails = [ar for pr in self .all () for vr in pr .all () for ar in vr .fails ()]
700
- upasses = [ar for pr in self .all () for vr in pr .all () for ar in vr .upasses ()]
701
- passes = [ar for pr in self .all () for vr in pr .all () for ar in vr .passes ()]
710
+ xfails = [ar for ar in self .recursive_all ()
711
+ if ar .result == Result .XFAIL ]
712
+ fails = [ar for ar in self .recursive_all ()
713
+ if ar .result == Result .FAIL ]
714
+ upasses = [ar for ar in self .recursive_all ()
715
+ if ar .result == Result .UPASS ]
716
+ passes = [ar for ar in self .recursive_all ()
717
+ if ar .result == Result .PASS ]
702
718
703
719
if xfails :
704
720
output += ('=' * 40 ) + '\n '
@@ -863,15 +879,14 @@ def __init__(self, swiftc, swift_version, swift_branch,
863
879
added_xcodebuild_flags ,
864
880
skip_clean , build_config ,
865
881
strip_resource_phases ,
866
- action , version , project ):
882
+ action , project ):
867
883
self .swiftc = swiftc
868
884
self .swift_version = swift_version
869
885
self .swift_branch = swift_branch
870
886
set_swift_branch (swift_branch )
871
887
self .sandbox_profile_xcodebuild = sandbox_profile_xcodebuild
872
888
self .sandbox_profile_package = sandbox_profile_package
873
889
self .project = project
874
- self .version = version
875
890
self .action = action
876
891
self .root_path = common .private_workspace ('project_cache' )
877
892
self .current_platform = platform .system ()
@@ -965,6 +980,26 @@ def succeeded(self, identifier):
965
980
966
981
967
982
class CompatActionBuilder (ActionBuilder ):
983
+ def __init__ (self ,
984
+ swiftc , swift_version , swift_branch ,
985
+ sandbox_profile_xcodebuild ,
986
+ sandbox_profile_package ,
987
+ added_swift_flags ,
988
+ added_xcodebuild_flags ,
989
+ skip_clean , build_config ,
990
+ strip_resource_phases ,
991
+ action , version , project ):
992
+ super (CompatActionBuilder , self ).__init__ (
993
+ swiftc , swift_version , swift_branch ,
994
+ sandbox_profile_xcodebuild ,
995
+ sandbox_profile_package ,
996
+ added_swift_flags ,
997
+ added_xcodebuild_flags ,
998
+ skip_clean , build_config ,
999
+ strip_resource_phases ,
1000
+ action , project
1001
+ )
1002
+ self .version = version
968
1003
969
1004
def dispatch (self , identifier , stdout = sys .stdout , stderr = sys .stderr ):
970
1005
if not self .swift_version :
@@ -1032,7 +1067,6 @@ def failed(self, identifier, error):
1032
1067
)
1033
1068
if 'destination' in self .action :
1034
1069
error_str += ', ' + self .action ['destination' ]
1035
- error_str += ', ' + str (error )
1036
1070
result = ActionResult (Result .FAIL , error_str )
1037
1071
common .debug_print (error_str )
1038
1072
return result
0 commit comments