5import isystem.connect
as ic
11def test_isDeviceEmpty():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
16 partitionName =
"Boot1"
18 storageCtrl = ic.CStorageDeviceFactory.makeDevice(connMgr, ic.EStorageDevice_EMMCDevice, devName, partitionName)
20 isEmpty = storageCtrl.isDeviceEmpty()
21 print(f
"Is entire partition with name {partitionName} empty: {isEmpty}")
23 isEmpty = storageCtrl.isDeviceEmpty(0x0, 8)
24 print(f
"Is 8 bytes at address 0x0 in partition with name {partitionName} empty: {isEmpty}")
26 ic.CStorageDeviceFactory.terminateDevice(connMgr, ic.EStorageDevice_EMMCDevice, devName)
29if __name__ ==
"__main__":