44from zorg .buildbot .builders .UnifiedTreeBuilder import getLLVMBuildFactoryAndSourcecodeSteps , addCmakeSteps , addNinjaSteps
55from zorg .buildbot .commands .LitTestCommand import LitTestCommand
66from zorg .buildbot .commands .CmakeCommand import CmakeCommand
7- from zorg .buildbot .conditions .FileConditions import FileExists
7+ from zorg .buildbot .conditions .FileConditions import FileDoesNotExist
88from zorg .buildbot .process .factory import LLVMBuildFactory
99
1010def getBOLTCmakeBuildFactory (
@@ -92,10 +92,10 @@ def getBOLTCmakeBuildFactory(
9292 if is_nfc :
9393 # Marker for relevant source code changes, e.g., when updating tests.
9494 # Generated by nfc-check-setup.py and used to trigger the in-tree tests.
95- markerDiffCode = ".llvm-bolt.changes"
96- # Individual markers for running either in-tree or out-of-tree tests.
97- markerInTree = ".llvm-bolt.run .in-tree"
98- markerOutOfTree = ".llvm-bolt.run .out-of-tree"
95+ hasSrcChanges = ".llvm-bolt.changes"
96+ # Individual markers to skip either in-tree or out-of-tree tests.
97+ skipInTree = ".llvm-bolt.skip .in-tree"
98+ skipOutOfTree = ".llvm-bolt.skip .out-of-tree"
9999
100100 f .addSteps ([
101101 ShellCommand (
@@ -106,6 +106,7 @@ def getBOLTCmakeBuildFactory(
106106 "--check-bolt-sources"
107107 ],
108108 description = ('Setup NFC testing' ),
109+ descriptionDone = ["NFC-Mode setup" ],
109110 warnOnFailure = True ,
110111 haltOnFailure = False ,
111112 flunkOnFailure = False ,
@@ -133,11 +134,11 @@ def getBOLTCmakeBuildFactory(
133134 ShellCommand (
134135 name = 'nfc-check-bolt-different' ,
135136 command = (
136- f'rm -f { markerInTree } { markerOutOfTree } ; '
137- f'[ -f { markerDiffCode } ] && touch { markerInTree } ; '
138- f'rm -f { markerDiffCode } ; '
139- f'cmp -s bin/llvm-bolt.old bin/llvm-bolt.new || ( '
140- f'touch { markerInTree } ; touch { markerOutOfTree } ) '
137+ f'rm -f { skipInTree } { skipOutOfTree } ; '
138+ f'cmp -s bin/llvm-bolt.old bin/llvm-bolt.new && ( '
139+ f'touch { skipInTree } ; touch { skipOutOfTree } ) ; '
140+ f'[ -f { hasSrcChanges } ] && rm -f { skipInTree } ; '
141+ f'rm -f { hasSrcChanges } ; '
141142 ),
142143 description = ('Check if llvm-bolt binaries are different and '
143144 'skip the following nfc-check steps' ),
@@ -151,7 +152,7 @@ def getBOLTCmakeBuildFactory(
151152 warnOnFailure = True ,
152153 haltOnFailure = False ,
153154 flunkOnFailure = True ,
154- doStepIf = FileExists (f"build/{ markerInTree } " ),
155+ doStepIf = FileDoesNotExist (f"build/{ skipInTree } " ),
155156 env = env ),
156157 LitTestCommand (
157158 name = 'nfc-check-large-bolt' ,
@@ -162,7 +163,7 @@ def getBOLTCmakeBuildFactory(
162163 warnOnFailure = True ,
163164 haltOnFailure = False ,
164165 flunkOnFailure = True ,
165- doStepIf = FileExists (f"build/{ markerOutOfTree } " ),
166+ doStepIf = FileDoesNotExist (f"build/{ skipOutOfTree } " ),
166167 env = env ),
167168 ])
168169
0 commit comments