diff --git a/Script/UnitTests/FunctionalTests/FuncTestUtils/DirUtils.py b/Script/UnitTests/FunctionalTests/FuncTestUtils/DirUtils.py index bd9caf5a9d6a61cbd90c3f7dc388a62d0c39e08f..e81b7745341d2f46c951c8f746c41fb267a273d7 100644 --- a/Script/UnitTests/FunctionalTests/FuncTestUtils/DirUtils.py +++ b/Script/UnitTests/FunctionalTests/FuncTestUtils/DirUtils.py @@ -62,16 +62,14 @@ class DirectoryChecker(): def waitForAnyFile(self, seconds): "Waits for the specified amount of time for the dir to be empty, returns a tuple (bool: timedout, str: lsOutput)" - timeToTimeout = seconds - self.timerUtil = Timer(timeToTimeout) + self.timerUtil = Timer(seconds) while self.checkIfEmpty() and self.timerUtil.timesNotUp(): pass return (self.timerUtil.timedout, self.getLsOutput()) def waitForEmptyDir(self, seconds): "Waits for the specified amount of time for the dir to contain files, returns a tuple (bool: timedout, str: lsOutput)" - timeToTimeout = seconds - self.timerUtil = Timer(timeToTimeout) + self.timerUtil = Timer(seconds) while self.checkIfNotEmpty() and self.timerUtil.timesNotUp(): pass return (self.timerUtil.timedout, self.getLsOutput()) diff --git a/Script/UnitTests/FunctionalTests/FuncTestUtils/ProcessUtils.py b/Script/UnitTests/FunctionalTests/FuncTestUtils/ProcessUtils.py deleted file mode 100644 index e0d15cb728bb20327bafaeb99ea79ceac1ba8edc..0000000000000000000000000000000000000000 --- a/Script/UnitTests/FunctionalTests/FuncTestUtils/ProcessUtils.py +++ /dev/null @@ -1,24 +0,0 @@ -from subprocess import Popen, PIPE -def findCastorScriptPids(): - # first find all running instances with this command - # ps aux | grep CastorScript.py | grep -v grep | awk '{print $2}' - - # it get list of processes - psCommand = Popen(["ps", "aux"], stdout=PIPE) - - # finds castorscript processes - grepCommand = Popen(["grep", "CastorScript.py"], stdin=psCommand.stdout, stdout=PIPE) - psCommand.stdout.close() - - # sorts grep out of the mix - grepvCommand = Popen(["grep", "-v", "grep"], stdin=grepCommand.stdout, stdout=PIPE) - grepCommand.stdout.close() - - # and finally gets the PIDs - awkCommand = Popen(["awk", "{print $2}"], stdin=grepvCommand.stdout, stdout=PIPE) - grepvCommand.stdout.close() - - pids = str(awkCommand.communicate()[0]).splitlines() - awkCommand.stdout.close() - - return pids \ No newline at end of file