trunk/src/regtests/chdman/chdtest.py
| r20162 | r20163 | |
| 50 | 50 | |
| 51 | 51 | for root, dirs, files in os.walk(inputPath): |
| 52 | 52 | for d in dirs: |
| 53 | if d.startswith("."): |
| 54 | continue |
| 55 | |
| 53 | 56 | inFile = os.path.join(root, d, "in") |
| 54 | 57 | # TODO: make this better |
| 55 | 58 | outFile = os.path.join(root, d, "out.chd").replace("input", "output") |
| 56 | 59 | tempFilePath = os.path.join(tempPath, d) |
| 57 | 60 | tempFile = os.path.join(tempFilePath, "out.chd") |
| 58 | | cmd = "" |
| 61 | cmd = [] |
| 59 | 62 | if not os.path.exists(tempFilePath): |
| 60 | 63 | os.makedirs(tempFilePath) |
| 61 | 64 | if d.startswith("createcd"): |
| 62 | 65 | ext = d.split("_", 2)[1] |
| 63 | 66 | inFile += "." + ext |
| 64 | | cmd = chdmanBin + " createcd -f -i " + inFile + " -o " + tempFile |
| 67 | cmd = [chdmanBin, "createcd", "-f", "-i", inFile, "-o", tempFile] |
| 65 | 68 | else: |
| 66 | 69 | print "unsupported mode" |
| 67 | 70 | continue |