From b6c1024f550c2d2408e3a86aabbc682142e2b9c1 Mon Sep 17 00:00:00 2001 From: Tomoko Uchida Date: Tue, 15 Mar 2022 19:54:54 +0900 Subject: [PATCH] LUCENE-10463: increment java version to 17 in smoke tester (#748) --- dev-tools/scripts/smokeTestRelease.py | 60 +++++++++++++-------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/dev-tools/scripts/smokeTestRelease.py b/dev-tools/scripts/smokeTestRelease.py index b4699c1ca2a..ec64d9d5b4e 100755 --- a/dev-tools/scripts/smokeTestRelease.py +++ b/dev-tools/scripts/smokeTestRelease.py @@ -143,10 +143,10 @@ def checkJARMetaData(desc, jarFile, gitRevision, version): 'Implementation-Vendor: The Apache Software Foundation', 'Specification-Title: Lucene Search Engine:', 'Implementation-Title: org.apache.lucene', - 'X-Compile-Source-JDK: 11', - 'X-Compile-Target-JDK: 11', + 'X-Compile-Source-JDK: 17', + 'X-Compile-Target-JDK: 17', 'Specification-Version: %s' % version, - 'X-Build-JDK: 11.', + 'X-Build-JDK: 17.', 'Extension-Name: org.apache.lucene'): if type(verify) is not tuple: verify = (verify,) @@ -610,20 +610,20 @@ def verifyUnpacked(java, artifact, unpackPath, gitRevision, version, testArgs): validateCmd = './gradlew --no-daemon check -p lucene/documentation' print(' run "%s"' % validateCmd) - java.run_java11(validateCmd, '%s/validate.log' % unpackPath) + java.run_java17(validateCmd, '%s/validate.log' % unpackPath) - 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) - testDemo(java.run_java11, isSrc, version, '11') + 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) + testDemo(java.run_java17, isSrc, version, '17') - 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) - testDemo(java.run_java17, isSrc, version, '17') + if java.run_java18: + print(" run tests w/ Java 18 and testArgs='%s'..." % testArgs) + java.run_java18('./gradlew --no-daemon test %s' % testArgs, '%s/test.log' % unpackPath) + print(" compile jars w/ Java 18") + java.run_java18('./gradlew --no-daemon jar -Dversion.release=%s' % version, '%s/compile.log' % unpackPath) + testDemo(java.run_java18, isSrc, version, '18') print(' confirm all releases have coverage in TestBackwardsCompatibility') confirmAllReleasesAreTestedForBackCompat(version, unpackPath) @@ -632,9 +632,9 @@ def verifyUnpacked(java, artifact, unpackPath, gitRevision, version, testArgs): checkAllJARs(os.getcwd(), gitRevision, version) - testDemo(java.run_java11, isSrc, version, '11') - if java.run_java17: - testDemo(java.run_java17, isSrc, version, '17') + testDemo(java.run_java17, isSrc, version, '17') + if java.run_java18: + testDemo(java.run_java18, isSrc, version, '18') testChangesText('.', version) @@ -910,7 +910,7 @@ def crawl(downloadedFiles, urlString, targetDir, exclusions=set()): sys.stdout.write('.') -def make_java_config(parser, java17_home): +def make_java_config(parser, java18_home): def _make_runner(java_home, version): print('Java %s JAVA_HOME=%s' % (version, java_home)) if cygwin: @@ -924,16 +924,16 @@ def make_java_config(parser, java17_home): def run_java(cmd, logfile): run('%s; %s' % (cmd_prefix, cmd), logfile) return run_java - java11_home = os.environ.get('JAVA_HOME') - if java11_home is None: + java17_home = os.environ.get('JAVA_HOME') + if java17_home is None: parser.error('JAVA_HOME must be set') - run_java11 = _make_runner(java11_home, '11') - run_java17 = None - if java17_home is not None: - run_java17 = _make_runner(java17_home, '17') + run_java17 = _make_runner(java17_home, '17') + run_java18 = None + if java18_home is not None: + run_java18 = _make_runner(java18_home, '18') - jc = namedtuple('JavaConfig', 'run_java11 java11_home run_java17 java17_home') - return jc(run_java11, java11_home, run_java17, java17_home) + jc = namedtuple('JavaConfig', 'run_java17 java17_home run_java18 java18_home') + return jc(run_java17, java17_home, run_java18, java18_home) version_re = re.compile(r'(\d+\.\d+\.\d+(-ALPHA|-BETA)?)') revision_re = re.compile(r'rev-([a-f\d]+)') @@ -955,8 +955,8 @@ def parse_config(): help='GIT revision number that release was built with, defaults to that in URL') parser.add_argument('--version', metavar='X.Y.Z(-ALPHA|-BETA)?', help='Version of the release, defaults to that in URL') - parser.add_argument('--test-java17', metavar='java17_home', - help='Path to Java17 home directory, to run tests with if specified') + parser.add_argument('--test-java18', metavar='java18_home', + help='Path to Java home directory, to run tests with if specified') parser.add_argument('--download-only', action='store_true', default=False, help='Only perform download and sha hash check steps') parser.add_argument('url', help='Url pointing to release to test') @@ -983,7 +983,7 @@ def parse_config(): if c.local_keys is not None and not os.path.exists(c.local_keys): parser.error('Local KEYS file "%s" not found' % c.local_keys) - c.java = make_java_config(parser, c.test_java17) + c.java = make_java_config(parser, c.test_java18) if c.tmp_dir: c.tmp_dir = os.path.abspath(c.tmp_dir)