Author: gnichols Date: 2010-01-26 18:44:19 +0000 (Tue, 26 Jan 2010) New Revision: 326
Modified: trunk/tests/memory/memory.py Log: 558578 - memory test traceback: AttributeError: int object has no attribute pipe
Modified: trunk/tests/memory/memory.py =================================================================== --- trunk/tests/memory/memory.py 2010-01-25 15:41:15 UTC (rev 325) +++ trunk/tests/memory/memory.py 2010-01-26 18:44:19 UTC (rev 326) @@ -55,7 +55,11 @@ passed = self.getTestLimits() if not passed: return 1
+ if not self.runMultipleProcessTest(): + return FAILED + return PASSED
+ # if process memory is limited, run multiple processes if self.isProcessLimited: if not self.runMultipleProcessTest(): @@ -177,33 +181,34 @@ def runProcesses(self, number, command): processes = 0; passed = True - pipe = [] + process = [] if self.mode == Constants.self: command = "echo 'Self Test Mode - would have run %s'" % command for i in range(number): - commandPipe = Command(command).run() - pipe.append(commandPipe.pipe) - print "Started: process %u pid %u: %s" % (i, pipe[i].pid, command) + processCommand = Command(command) + processCommand.start() + process.append(processCommand) + print "Started: process %u pid %u: %s" % (i, process[i].getPID(), command) sys.stdout.flush() waiting = True while waiting: waiting = False for i in range(number): - if pipe[i]: + if process[i]: found = True - line = pipe[i].stdout.readline() + line = process[i].readline() if line and len(line) > 1: - print "process %u pid %u: %s" % (i, pipe[i].pid, line) + print "process %u pid %u: %s" % (i, process[i].getPID(), line) sys.stdout.flush() - if pipe[i].poll() == -1: + if process[i].poll() == -1: waiting = True else: - returnValue = pipe[i].poll() + returnValue = process[i].poll() if returnValue != 0: - print "Error: process %u pid %u retuned %u" % (i, pipe[i].pid, returnValue) + print "Error: process %u pid %u retuned %u" % (i, process[i].getPID(), returnValue) passed = False - print "process %u pid %u returned success" % (i, pipe[i].pid) - pipe[i] = None + print "process %u pid %u returned success" % (i, process[i].getPID()) + process[i] = None sys.stdout.flush() return passed
v7-commits@lists.stg.fedorahosted.org