janhoy commented on a change in pull request #497:
URL: https://github.com/apache/solr/pull/497#discussion_r784722823
##########
File path: dev-tools/scripts/smokeTestRelease.py
##########
@@ -537,106 +502,100 @@ def getDirEntries(urlString):
return l
else:
links = getHREFs(urlString)
- for i, (text, subURL) in enumerate(links):
+ for i, (text, subURL) in enumerate(links): # pylint:
disable=unused-variable
if text == 'Parent Directory' or text == '..':
return links[(i+1):]
+ return None
+
-def unpackAndVerify(java, project, tmpDir, artifact, gitRevision, version,
testArgs, baseURL):
+def unpackAndVerify(java, tmpDir, artifact, gitRevision, version, testArgs):
destDir = '%s/unpack' % tmpDir
if os.path.exists(destDir):
shutil.rmtree(destDir)
os.makedirs(destDir)
os.chdir(destDir)
print(' unpack %s...' % artifact)
- unpackLogFile = '%s/%s-unpack-%s.log' % (tmpDir, project, artifact)
+ unpackLogFile = '%s/solr-unpack-%s.log' % (tmpDir, artifact)
if artifact.endswith('.tar.gz') or artifact.endswith('.tgz'):
run('tar xzf %s/%s' % (tmpDir, artifact), unpackLogFile)
elif artifact.endswith('.zip'):
run('unzip %s/%s' % (tmpDir, artifact), unpackLogFile)
# make sure it unpacks to proper subdir
l = os.listdir(destDir)
- expected = '%s-%s' % (project, version)
+ expected = 'solr-%s' % version
if l != [expected]:
raise RuntimeError('unpack produced entries %s; expected only %s' % (l,
expected))
unpackPath = '%s/%s' % (destDir, expected)
- verifyUnpacked(java, project, artifact, unpackPath, gitRevision, version,
testArgs, tmpDir, baseURL)
+ verifyUnpacked(java, artifact, unpackPath, gitRevision, version, testArgs)
return unpackPath
-LUCENE_NOTICE = None
-LUCENE_LICENSE = None
SOLR_NOTICE = None
SOLR_LICENSE = None
-def verifyUnpacked(java, project, artifact, unpackPath, gitRevision, version,
testArgs, tmpDir, baseURL):
- global LUCENE_NOTICE
- global LUCENE_LICENSE
+def is_in_list(in_folder, files, indent=4):
+ for fileName in files:
+ print("%sChecking %s" % (" "*indent, fileName))
+ found = False
+ for f in [fileName, fileName + '.txt', fileName + '.md']:
+ if f in in_folder:
+ in_folder.remove(f)
+ found = True
+ if not found:
+ raise RuntimeError('file "%s" is missing' % fileName)
Review comment:
Just a question - how do you add a code suggestion to a PR, so that the
"commit suggestion" button appears? It's a really nice workflow...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]