Example #1
0
 def testDisabledCoreDumpsChannel(self):
     result = TestCaseResult()
     device = commons.FakeDevice()
     self.testResult._coreDumps.setEnabled(False)
     self.testResult.startTest(result, device)
     core = os.path.join(self._TEST_CORE_DIR, self._TEST_CORE_FILE)
     commons.createRandomSizeFile(core)
     self.testResult.stopTest(result, device)
     execResult = result.device(device)
     self.failIf(execResult.cores)
Example #2
0
 def testDisabledCoreDumpsChannel(self):
     result = TestCaseResult()
     device = commons.FakeDevice()
     self.testResult._coreDumps.setEnabled(False)
     self.testResult.startTest(result, device)
     core = os.path.join(self._TEST_CORE_DIR, self._TEST_CORE_FILE)
     commons.createRandomSizeFile(core)
     self.testResult.stopTest(result, device)
     execResult = result.device(device)
     self.failIf(execResult.cores)
Example #3
0
 def _createCore(self, dirname, name):
     dirpath = os.path.join(self._TEST_CORE_DIR, dirname)
     if not os.path.exists(dirpath):
         os.makedirs(dirpath)
         dirs = [d for d in self.coreDumps._dirs]
         dirs.append(dirpath)
         self.coreDumps._dirs.set(','.join(dirs))
     path = os.path.join(dirpath, name + '.' + self._TEST_CORE_EXT)
     createRandomSizeFile(path)
     return path
Example #4
0
 def _createCore(self, dirname, name):
     dirpath = os.path.join(self._TEST_CORE_DIR, dirname)
     if not os.path.exists(dirpath):
         os.makedirs(dirpath)
         dirs = [d for d in self.coreDumps._dirs]
         dirs.append(dirpath)
         self.coreDumps._dirs.set(','.join(dirs))
     path = os.path.join(dirpath, name + '.' + self._TEST_CORE_EXT)
     createRandomSizeFile(path)
     return path
Example #5
0
 def testEnebledCoreDumpsChannel(self):
     result = TestCaseResult()
     device = commons.FakeDevice()
     self.testResult._coreDumps.setEnabled(True)
     self.testResult.startTest(result, device)
     core = os.path.join(self._TEST_CORE_DIR, self._TEST_CORE_FILE)
     commons.createRandomSizeFile(core)
     self.testResult.stopTest(result, device)
     execResult = result.device(device)
     self.failUnlessEqual(len(execResult.cores), 1)
     self.failUnless(core in execResult.cores)
Example #6
0
 def testEnebledCoreDumpsChannel(self):
     result = TestCaseResult()
     device = commons.FakeDevice()
     self.testResult._coreDumps.setEnabled(True)
     self.testResult.startTest(result, device)
     core = os.path.join(self._TEST_CORE_DIR, self._TEST_CORE_FILE)
     commons.createRandomSizeFile(core)
     self.testResult.stopTest(result, device)
     execResult = result.device(device)
     self.failUnlessEqual(len(execResult.cores), 1)
     self.failUnless(core in execResult.cores)