Example #1
0
 def testDifference(self):
     fd, outFn = tempfile.mkstemp()
     os.close(fd)
     try:
         vhd.makeDifference(self.fn, outFn)
         self.validateVHD(outFn, magic = "cxsparse")
     finally:
         os.unlink(outFn)
Example #2
0
 def createVHD(self, hdImage, filebase):
     diskType = self.getBuildData('vhdDiskType')
     if diskType == 'fixed':
         vhd.makeFlat(hdImage)
         os.rename(hdImage, filebase + '.vhd')
     elif diskType == 'difference':
         vhd.makeDynamic(hdImage, filebase + '-base.vhd')
         os.chmod(filebase + '-base.vhd', 0400)
         vhd.makeDifference(filebase + '-base.vhd', filebase + '.vhd',
                            self.basefilename + '-base.vhd')
     else:
         vhd.makeDynamic(hdImage, filebase + '.vhd')