diff --git a/Utilities/ReleaseScripts/scripts/addOnTests.py b/Utilities/ReleaseScripts/scripts/addOnTests.py index b7203ddcd29f2..83372de8a95a2 100755 --- a/Utilities/ReleaseScripts/scripts/addOnTests.py +++ b/Utilities/ReleaseScripts/scripts/addOnTests.py @@ -145,12 +145,10 @@ def runTests(self, testList = None): print('Running in %s thread(s)' % self.maxThreads) + if testList: + self.commands = {d:c for d,c in self.commands.items() if d in testList} for dirName, command in self.commands.items(): - if testList and not dirName in testList: - del self.commands[dirName] - continue - # make sure we don't run more than the allowed number of threads: while self.activeThreads() >= self.maxThreads: time.sleep(10)