summaryrefslogtreecommitdiffstats
path: root/isomd5sum/testpyisomd5sum.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-03-21 16:30:43 +0000
committerMike Fulbright <msf@redhat.com>2003-03-21 16:30:43 +0000
commitdd652f84b1e0de892e10e19ac75bd175230bece6 (patch)
tree2788ecdc46ae12ed68f49939950fd308d9569a2a /isomd5sum/testpyisomd5sum.py
parentc29f0955045cdd02965a14300ce5e99364db2d1b (diff)
downloadanaconda-dd652f84b1e0de892e10e19ac75bd175230bece6.tar.gz
anaconda-dd652f84b1e0de892e10e19ac75bd175230bece6.tar.xz
anaconda-dd652f84b1e0de892e10e19ac75bd175230bece6.zip
added python module for easy scripting of implanting and checking md5sums for tim
Diffstat (limited to 'isomd5sum/testpyisomd5sum.py')
-rwxr-xr-xisomd5sum/testpyisomd5sum.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/isomd5sum/testpyisomd5sum.py b/isomd5sum/testpyisomd5sum.py
new file mode 100755
index 000000000..6f79830cf
--- /dev/null
+++ b/isomd5sum/testpyisomd5sum.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+
+import os
+import pyisomd5sum
+
+# create iso file
+os.system("mkisofs -quiet . > testiso.iso")
+
+# implant it
+print "Implanting -> ", pyisomd5sum.implantisomd5sum("testiso.iso", 1, 0)
+
+# do it again without forcing, should get error
+print "Implanting again w/o forcing -> ", pyisomd5sum.implantisomd5sum("testiso.iso", 1, 0)
+
+# do it again with forcing, should work
+print "Implanting again forcing -> ", pyisomd5sum.implantisomd5sum("testiso.iso", 1, 1)
+
+# check it
+print "Checking -> ",pyisomd5sum.checkisomd5sum("testiso.iso")
+
+# clean up
+os.unlink("testiso.iso")