Previous 199869 Revisions Next

r23758 Monday 17th June, 2013 at 23:54:07 UTC by Oliver Stöneberg
chdtest.py: added in.params support to all tests (nw)
[src/regtests/chdman]chdtest.py

trunk/src/regtests/chdman/chdtest.py
r23757r23758
5858      outFile = os.path.join(root, d, "out.chd").replace("input", "output")
5959      tempFilePath = os.path.join(tempPath, d)
6060      tempFile = os.path.join(tempFilePath, "out.chd")
61      inParams = inFile + ".params"
62      params = []
63      if os.path.exists(inParams):
64         f = open(inParams, 'r')
65         paramsstr = f.read()
66         f.close()
67         params = paramsstr.split(" ")
6168      cmd = []
6269      if not os.path.exists(tempFilePath):
6370         os.makedirs(tempFilePath)
r23757r23758
6673         inFile += "." + ext
6774         cmd = [chdmanBin, "createcd", "-f", "-i", inFile, "-o", tempFile]
6875      elif d.startswith("createhd"):
69         inFile += ".params"
70         f = open(inFile, 'r')
71         paramsstr = f.read()
72         f.close()
73         params = paramsstr.split(" ")
74         cmd = [chdmanBin, "createhd", "-f", "-o", tempFile] + params
76         cmd = [chdmanBin, "createhd", "-f", "-o", tempFile]
7577      elif d.startswith("copy"):
7678         inFile += ".chd"
7779         cmd = [chdmanBin, "copy", "-f", "-i", inFile, "-o", tempFile]
7880      else:
7981         print "unsupported mode"
8082         continue
83      cmd += params
8184      exitcode, stdout, stderr = runProcess(cmd)
8285      if not exitcode == 0:
8386         print d + " - command failed with " + str(exitcode) + " (" + stderr + ")"

Previous 199869 Revisions Next


© 1997-2024 The MAME Team