-
Notifications
You must be signed in to change notification settings - Fork 6
/
unittest_mm_carver_impl.py
56 lines (46 loc) · 1.81 KB
/
unittest_mm_carver_impl.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env python
import unittest
from mm_context import CFileCarver
class CTestFloppyImage(unittest.TestCase):
def setUp(self):
self.verbose = None
self.offset = 0
self.imagefile = '/tmp/practical.floppy.dd'
self.incrementsize = 4096
self.fragmentsize = 4096
self.preprocess = False
self.output = '/tmp/clever-output'
def test_floppy_image(self):
lContext = CFileCarver()
lContext.run(self)
class CTestFeasibilityImage4096(unittest.TestCase):
def setUp(self):
self.verbose = None
self.offset = 0
self.imagefile = '/home/rpoisel/nosvn/feasibility_images/image_06.img'
self.incrementsize = 4096
self.fragmentsize = 4096
self.preprocess = False
self.output = '/tmp/clever-output'
def test_feasibility_image(self):
lContext = CFileCarver()
lContext.run(self)
class CTestFeasibilityImage512(unittest.TestCase):
def setUp(self):
self.verbose = None
self.offset = 0
self.imagefile = '/home/rpoisel/nosvn/feasibility_images/image_06.img'
self.incrementsize = 512
self.fragmentsize = 512
self.preprocess = False
self.output = '/tmp/clever-output'
def test_feasibility_image(self):
lContext = CFileCarver()
lContext.run(self)
if __name__ == "__main__":
lSuite = unittest.TestLoader().loadTestsFromTestCase(CTestFloppyImage)
unittest.TextTestRunner(verbosity=2, descriptions=2).run(lSuite)
lSuite = unittest.TestLoader().loadTestsFromTestCase(CTestFeasibilityImage4096)
unittest.TextTestRunner(verbosity=2, descriptions=2).run(lSuite)
lSuite = unittest.TestLoader().loadTestsFromTestCase(CTestFeasibilityImage512)
unittest.TextTestRunner(verbosity=2, descriptions=2).run(lSuite)