def __init__(self): super(MantidStressTest, self).__init__() # A list of things not to check when validating self.disableChecking = [] # Whether or not to strip off whitespace when doing simple ascii diff self.stripWhitespace = True # Tolerance self.tolerance = 0.00000001 # Store the resident memory of the system (in MB) before starting the test FrameworkManager.clear() self.memory = MemoryStats().residentMem()/1024
def returnValidationCode(self, code): """ Calls doValidation() and returns 0 in success and code if failed. This will be used as return code from the calling python subprocess """ if self.doValidation(): retcode = 0 else: retcode = code if retcode == 0: self._success = True else: self._success = False # Now the validation is complete we can clear out all the stored data and check memory usage FrameworkManager.clear() # Get the resident memory again and work out how much it's gone up by (in MB) memorySwallowed = MemoryStats().residentMem()/1024 - self.memory # Store the result self.reportResult('memory footprint increase', memorySwallowed) return retcode