MCPcopy Create free account
hub / github.com/apache/solr / verifyDigests

Function verifyDigests

dev-tools/scripts/smokeTestRelease.py:521–537  ·  view source on GitHub ↗
(artifact, urlString, tmpDir)

Source from the content-addressed store, hash-verified

519 # Encode to our output encoding (likely also system's default
520 # encoding):
521 bytes = txt.encode(sys.stdout.encoding, errors='replace')
522
523 # Decode back to string and print... we should hit no exception here
524 # since all errors have been replaced:
525 print(codecs.getdecoder(sys.stdout.encoding)(bytes)[0])
526 print()
527
528
529def run(command, logFile):
530 if cygwin: command = cygwinifyPaths(command)
531 if os.system('%s > %s 2>&1' % (command, logFile)):
532 logPath = os.path.abspath(logFile)
533 print('\ncommand "%s" failed:' % command)
534 printFileContents(logFile)
535 raise RuntimeError('command "%s" failed; see log file %s' % (command, logPath))
536
537
538def verifyDigests(artifact, urlString, tmpDir):
539 print(' verify sha512 digest')
540 sha512Expected, t = load(urlString + '.sha512').strip().split()

Callers 1

checkSigsFunction · 0.85

Calls 6

stripMethod · 0.80
loadFunction · 0.70
readMethod · 0.65
updateMethod · 0.65
closeMethod · 0.65
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…