Skip to content

Commit 80c193a

Browse files
committed
make the noRun options actually dump the commands, but not run them
1 parent 4adbcbc commit 80c193a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Utilities/ReleaseScripts/scripts/addOnTests.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def file2Path(self,rFile):
119119
if os.path.exists(self.devPath + rFile): fullPath = self.devPath + rFile
120120
return fullPath
121121

122-
def runTests(self, testList = None):
122+
def runTests(self, testList = None, dontRun = False):
123123

124124
actDir = os.getcwd()
125125

@@ -145,9 +145,15 @@ def runTests(self, testList = None):
145145
print('Preparing to run %s' % str(command))
146146
current = testit(dirName, command)
147147
self.threadList.append(current)
148+
149+
if dontRun:
150+
continue
148151
current.start()
149152
time.sleep(random.randint(1,5)) # try to avoid race cond by sleeping random amount of time [1,5] sec
150153

154+
if dontRun:
155+
return
156+
151157
# wait until all threads are finished
152158
while self.activeThreads() > 0:
153159
time.sleep(5)
@@ -239,8 +245,7 @@ def main(argv=None):
239245
if args.dump:
240246
tester.dumpTest()
241247
else:
242-
if not args.noRun:
243-
tester.runTests(args.tests)
248+
tester.runTests(args.tests,args.noRun)
244249
if args.uploadDir:
245250
tester.upload(args.uploadDir)
246251

0 commit comments

Comments
 (0)