import os
import isystem.connect as ic
winidea_id = ''
def test_merge():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
covCtrl = ic.CCoverageController2(connMgr, "test_merge.trd", "w")
covCtrl1 = ic.CCoverageController2(connMgr, "test_merge_1.trd", "w")
covCtrl2 = ic.CCoverageController2(connMgr, "test_merge_2.trd", "w")
folderPath = ic.CIDEController(connMgr).getPath(ic.CIDEController.WORKSPACE_DIR)
filePath = os.path.join(folderPath, "test_merge.trd")
filePath1 = os.path.join(folderPath, "test_merge_1.trd")
filePath2 = os.path.join(folderPath, "test_merge_2.trd")
files = ic.StrVector()
files.append(filePath1)
files.append(filePath2)
covCtrl.merge(files)
print(f"Following files were merged to 'test_merge.trd' file: {filePath}")
print(f"\t{filePath1}")
print(f"\t{filePath2}")
if __name__ == "__main__":
test_merge()