You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ja...@apache.org on 2022/03/28 18:37:27 UTC
[solr] branch branch_9x updated: SOLR-15852: Smoketester fixes for maven artifact comparison (#763)
This is an automated email from the ASF dual-hosted git repository.
janhoy pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 18daeb6 SOLR-15852: Smoketester fixes for maven artifact comparison (#763)
18daeb6 is described below
commit 18daeb60ad0070f917de0f9c19568b250cf23693
Author: Jan Høydahl <ja...@users.noreply.github.com>
AuthorDate: Mon Mar 28 20:30:08 2022 +0200
SOLR-15852: Smoketester fixes for maven artifact comparison (#763)
(cherry picked from commit caf1071f9df94a2a1807e3b77c7b10b8bc2470ea)
---
dev-tools/scripts/smokeTestRelease.py | 60 ++++++++++++++++-------------------
1 file changed, 27 insertions(+), 33 deletions(-)
diff --git a/dev-tools/scripts/smokeTestRelease.py b/dev-tools/scripts/smokeTestRelease.py
index 008dd1a..75a1d92 100755
--- a/dev-tools/scripts/smokeTestRelease.py
+++ b/dev-tools/scripts/smokeTestRelease.py
@@ -424,7 +424,7 @@ def versionToTuple(version, name):
reUnixPath = re.compile(r'\b[a-zA-Z_]+=(?:"(?:\\"|[^"])*"' + '|(?:\\\\.|[^"\'\\s])*' + r"|'(?:\\'|[^'])*')" \
+ r'|(/(?:\\.|[^"\'\s])*)' \
- + r'|("/(?:\\.|[^"])*")' \
+ + r'|("/(?:\\.|[^"])*")' \
+ r"|('/(?:\\.|[^'])*')")
@@ -626,22 +626,23 @@ def verifyUnpacked(java, artifact, unpackPath, gitRevision, version, testArgs):
print(" run tests w/ Java 11 and testArgs='%s'..." % testArgs)
java.run_java11('./gradlew --no-daemon test %s' % testArgs, '%s/test.log' % unpackPath)
- print(" compile jars w/ Java 11")
- java.run_java11('./gradlew --no-daemon jar -Dversion.release=%s' % version, '%s/compile.log' % unpackPath)
- print(" run interation tests w/ Java 11")
+ print(" run integration tests w/ Java 11")
java.run_java11('./gradlew --no-daemon integrationTest -Dversion.release=%s' % version, '%s/itest.log' % unpackPath)
- testSolrExample(unpackPath, java.java11_home, True)
+ print(" build binary release w/ Java 11")
+ java.run_java11('./gradlew --no-daemon dev -Dversion.release=%s' % version, '%s/assemble.log' % unpackPath)
+ testSolrExample("%s/solr/packaging/build/dev" % unpackPath, java.java11_home, True)
if java.run_java17:
print(" run tests w/ Java 17 and testArgs='%s'..." % testArgs)
- java.run_java17('./gradlew --no-daemon test %s' % testArgs, '%s/test.log' % unpackPath)
- print(" compile jars w/ Java 17")
- java.run_java17('./gradlew --no-daemon jar -Dversion.release=%s' % version, '%s/compile.log' % unpackPath)
- print(" run interation tests w/ Java 17")
- java.run_java17('./gradlew --no-daemon integrationTest -Dversion.release=%s' % version, '%s/itest.log' % unpackPath)
- testSolrExample(unpackPath, java.java17_home, True)
+ java.run_java17('./gradlew --no-daemon clean test %s' % testArgs, '%s/test-java17.log' % unpackPath)
+ print(" run integration tests w/ Java 17")
+ java.run_java17('./gradlew --no-daemon integrationTest -Dversion.release=%s' % version, '%s/itest-java17.log' % unpackPath)
+ print(" build binary release w/ Java 17")
+ java.run_java17('./gradlew --no-daemon dev -Dversion.release=%s' % version, '%s/assemble-java17.log' % unpackPath)
+ testSolrExample("%s/solr/packaging/build/dev" % unpackPath, java.java17_home, True)
else:
+ # Binary tarball
checkAllJARs(os.getcwd(), gitRevision, version)
print(' copying unpacked distribution for Java 11 ...')
@@ -706,11 +707,7 @@ def is_port_in_use(port):
def testSolrExample(unpackPath, javaPath, isSrc):
# test solr using some examples it comes with
logFile = '%s/solr-example.log' % unpackPath
- if isSrc:
- os.chdir(unpackPath+'/solr')
- subprocess.call(['chmod','+x',unpackPath+'/solr/bin/solr', unpackPath+'/solr/bin/solr.cmd', unpackPath+'/solr/bin/solr.in.cmd'])
- else:
- os.chdir(unpackPath)
+ os.chdir(unpackPath)
print(' start Solr instance (log=%s)...' % logFile)
env = {}
@@ -725,7 +722,7 @@ def testSolrExample(unpackPath, javaPath, isSrc):
else:
subprocess.call('env "PATH=`cygpath -S -w`:$PATH" bin/solr.cmd stop -p 8983', shell=True)
except:
- print(' Stop failed due to: '+sys.exc_info()[0])
+ print(' Stop failed due to: '+sys.exc_info()[0])
print(' Running techproducts example on port 8983 from %s' % unpackPath)
try:
@@ -752,20 +749,14 @@ def testSolrExample(unpackPath, javaPath, isSrc):
finally:
# Stop server:
print(' stop server using: bin/solr stop -p 8983')
- if isSrc:
- os.chdir(unpackPath+'/solr')
- else:
- os.chdir(unpackPath)
+ os.chdir(unpackPath)
if not cygwin:
subprocess.call(['bin/solr','stop','-p','8983'])
else:
subprocess.call('env "PATH=`cygpath -S -w`:$PATH" bin/solr.cmd stop -p 8983', shell=True)
- if isSrc:
- os.chdir(unpackPath+'/solr')
- else:
- os.chdir(unpackPath)
+ os.chdir(unpackPath)
def removeTrailingZeros(version):
@@ -775,7 +766,7 @@ def removeTrailingZeros(version):
def checkMaven(baseURL, tmpDir, gitRevision, version, isSigned, keysFile):
print(' download artifacts')
artifacts = []
- artifactsURL = '%s/solr/maven/org/apache/solr/' % baseURL
+ artifactsURL = '%s/maven/org/apache/solr/' % baseURL
targetDir = '%s/maven/org/apache/solr' % tmpDir
if not os.path.exists(targetDir):
os.makedirs(targetDir)
@@ -836,12 +827,16 @@ def checkIdenticalMavenArtifacts(distFiles, artifacts, version):
for artifact in artifacts:
if reJarWar.search(artifact):
artifactFilename = os.path.basename(artifact)
+ if artifactFilename in ['solr-test-framework-%s.jar' % version]:
+ if artifactFilename in distFilenames:
+ raise RuntimeError(' solr-test-framework should not be present in solr binary distribution' % artifact)
+ continue
if artifactFilename not in distFilenames:
- raise RuntimeError('Maven artifact %s is not present in solr binary distribution' % artifact)
+ raise RuntimeError(' Maven artifact %s is not present in solr binary distribution' % artifact)
else:
identical = filecmp.cmp(artifact, distFilenames[artifactFilename], shallow=False)
if not identical:
- raise RuntimeError('Maven artifact %s is not identical to %s in solr binary distribution'
+ raise RuntimeError(' Maven artifact %s is not identical to %s in solr binary distribution'
% (artifact, distFilenames[artifactFilename]))
@@ -1090,11 +1085,10 @@ def main():
def smokeTest(java, baseURL, gitRevision, version, tmpDir, isSigned, local_keys, testArgs, downloadOnly=False):
startTime = datetime.datetime.now()
- # Tests annotated @Nightly are more resource-intensive but often cover
- # important code paths. They're disabled by default to preserve a good
- # developer experience, but we enable them for smoke tests where we want good
- # coverage. Still we disable @BadApple tests
- testArgs = '-Dtests.nightly=true -Dtests.badapples=false %s' % testArgs
+ # Avoid @Nightly and @Badapple tests as they are slow and buggy
+ # Instead verify that the recent Jenkins tests pass
+ print('NOTE: Not running @Nightly or @BadApple tests. Please verify that recent Jenkins runs have passed.')
+ testArgs = '-Dtests.nightly=false -Dtests.badapples=false %s' % testArgs
if FORCE_CLEAN:
if os.path.exists(tmpDir):