(urlString)
| 538 | def verifyDigests(artifact, urlString, tmpDir): |
| 539 | print(' verify sha512 digest') |
| 540 | sha512Expected, t = load(urlString + '.sha512').strip().split() |
| 541 | if t != '*'+artifact: |
| 542 | raise RuntimeError('SHA512 %s.sha512 lists artifact %s but expected *%s' % (urlString, t, artifact)) |
| 543 | |
| 544 | s512 = hashlib.sha512() |
| 545 | f = open('%s/%s' % (tmpDir, artifact), 'rb') |
| 546 | while True: |
| 547 | x = f.read(65536) |
| 548 | if len(x) == 0: |
| 549 | break |
| 550 | s512.update(x) |
| 551 | f.close() |
| 552 | sha512Actual = s512.hexdigest() |
| 553 | if sha512Actual != sha512Expected: |
| 554 | raise RuntimeError('SHA512 digest mismatch for %s: expected %s but got %s' % (artifact, sha512Expected, sha512Actual)) |
| 555 | |
| 556 | |
| 557 | def getDirEntries(urlString): |
| 558 | if urlString.startswith('file:/') and not urlString.startswith('file://'): |
| 559 | # stupid bogus ant URI |
| 560 | urlString = "file:///" + urlString[6:] |
| 561 | |
| 562 | if urlString.startswith('file://'): |
| 563 | path = urlString[7:] |
| 564 | if path.endswith('/'): |
| 565 | path = path[:-1] |
| 566 | if cygwin: # Convert Windows path to Cygwin path |
| 567 | path = re.sub(r'^/([A-Za-z]):/', r'/cygdrive/\1/', path) |
| 568 | l = [] |
no test coverage detected
searching dependent graphs…