Logo Search packages:      
Sourcecode: afflib version File versions  Download package

verify.py

#!/usr/bin/python

import os,sys

def cmd(s):
    print s
    if(os.system(s)):
        print "** TEST FAILED"
        sys.exit(1)

def runtest(ext,maxsize):
    os.system("rm -rf image.iso image1* image2*")
    cmd("./makeimage image.iso 100000")
    cmd("../aimage/aimage   %s -q -E image.iso image1.%s" % (maxsize,ext))
    cmd("../tools/afconvert %s -o image2.%s image.iso" % (maxsize,ext))
    cmd("../tools/afinfo -mS image1.%s" % ext)
    cmd("../tools/afinfo -mS image2.%s" % ext)
    cmd("../tools/afcompare image.iso image1.%s" % ext)
    cmd("../tools/afcompare image.iso image2.%s" % ext)
    cmd("../tools/afconvert -r -o image1.iso image1.%s" % ext)
    cmd("../tools/afcat image2.%s > image2.iso" % ext)
    cmd("cmp image.iso image1.iso")
    cmd("cmp image.iso image2.iso")
    os.system("rm -rf image.iso image1* image2*")

    
if(__name__=='__main__'):
    runtest("aff","")
    runtest("aff","-M33554432b")
    runtest("afd","")
    runtest("afd","-M33554432b")
    runtest("afm","")
    runtest("afm","-M33554432b")
    

Generated by  Doxygen 1.6.0   Back to index