add .gbp.conf for gbp service
[tools/isomd5sum.git] / testpyisomd5sum.py
1 #!/usr/bin/python
2
3 import os
4 import pyisomd5sum
5
6 # create iso file
7 os.system("mkisofs -quiet . > testiso.iso")
8
9 # implant it
10 print "Implanting -> ", pyisomd5sum.implantisomd5sum("testiso.iso", 1, 0)
11
12 # do it again without forcing, should get error
13 print "Implanting again w/o forcing -> ", pyisomd5sum.implantisomd5sum("testiso.iso", 1, 0)
14
15 # do it again with forcing, should work
16 print "Implanting again forcing -> ", pyisomd5sum.implantisomd5sum("testiso.iso", 1, 1)
17
18 # check it
19 print "Checking -> ",pyisomd5sum.checkisomd5sum("testiso.iso")
20
21 # clean up
22 os.unlink("testiso.iso")