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

Function verifyBinaryUnpacked

dev-tools/scripts/smokeTestRelease.py:647–694  ·  view source on GitHub ↗
(java, artifact, unpackPath, version, gitRevision)

Source from the content-addressed store, hash-verified

645
646 validateCmd = './gradlew rat'
647 print(' run "%s"' % validateCmd)
648 java.run_java(validateCmd, '%s/rat.log' % logDir)
649
650 validateCmd = './gradlew :solr:documentation:check'
651 print(' run "%s"' % validateCmd)
652 java.run_java(validateCmd, '%s/documentation.log' % logDir)
653
654 print(" run tests w/ Java %s and testArgs='%s'..." % (java.version, testArgs))
655 java.run_java('./gradlew test %s' % testArgs, '%s/test.log' % logDir)
656 print(" run integration tests w/ Java %s" % java.version)
657 java.run_java('./gradlew integrationTest -Dversion.release=%s' % version, '%s/itest.log' % logDir)
658 print(" build binary release w/ Java %s" % java.version)
659 java.run_java('./gradlew dev -Dversion.release=%s' % version, '%s/assemble.log' % logDir)
660 testSolrExample("%s/solr/packaging/build/dev" % unpackPath, java.java_home, False)
661
662 testChangelogMd('.', version)
663
664
665def verifyBinaryUnpacked(java, artifact, unpackPath, version, gitRevision):
666 global SOLR_NOTICE
667 global SOLR_LICENSE
668
669 os.chdir(unpackPath)
670 isSlim = '-slim' in artifact
671 print(" %s" % artifact)
672
673 if SOLR_NOTICE is None:
674 SOLR_NOTICE = open('%s/NOTICE.txt' % unpackPath, encoding='UTF-8').read()
675 if SOLR_LICENSE is None:
676 SOLR_LICENSE = open('%s/LICENSE.txt' % unpackPath, encoding='UTF-8').read()
677
678 in_root_folder = list(filter(lambda x: x[0] != '.', os.listdir(unpackPath)))
679 is_in_list(in_root_folder, ['LICENSE.txt', 'NOTICE.txt', 'README.txt', 'CHANGELOG.md'])
680
681 if isSlim:
682 is_in_list(in_root_folder, ['bin', 'docker', 'example', 'licenses', 'server', 'lib'])
683 else:
684 is_in_list(in_root_folder, ['bin', 'modules', 'cross-dc-manager', 'docker', 'example', 'licenses', 'server', 'lib'])
685
686 if len(in_root_folder) > 0:
687 raise RuntimeError('solr: unexpected files/dirs in artifact %s: %s' % (artifact, in_root_folder))
688
689 checkAllJARs(os.getcwd(), gitRevision, version)
690
691 print(' test solr example w/ Java %s...' % java.version)
692 testSolrExample(unpackPath, java.java_home, isSlim)
693
694 testChangelogMd('.', version)
695
696
697def find_available_port(max_attempts=100):

Callers 1

smokeTestFunction · 0.85

Calls 6

is_in_listFunction · 0.85
checkAllJARsFunction · 0.85
testSolrExampleFunction · 0.85
testChangelogMdFunction · 0.85
readMethod · 0.65
existsMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…