Correct lucene version passed to tests to be stripped of qualifiers.

This commit is contained in:
Dawid Weiss 2019-12-06 13:05:10 +01:00
parent 8e81037180
commit 226f5490a0
2 changed files with 13 additions and 7 deletions

View File

@ -22,6 +22,15 @@ configure(rootProject) {
rootSeed = propertyOrDefault('tests.seed', String.format("%08X", new Random().nextLong()))
rootSeedLong = SeedUtils.parseSeedChain(rootSeed)[0]
projectSeedLong = rootSeedLong ^ project.path.hashCode()
// "base" version is stripped of the qualifier. Compute it.
baseVersion = {
def m = (rootProject.version =~ /^(\d+\.\d+\.\d+)(-(.+))?/)
if (!m) {
throw GradleException("Can't strip version to just x.y.z: " + rootProject.version)
}
return m[0][1]
}()
}
task randomizationInfo() {
@ -72,7 +81,7 @@ allprojects {
// test data
[propName: 'tests.linedocsfile', value: 'europarl.lines.txt.gz', description: "Test data file path."],
// miscellaneous; some of them very weird.
[propName: 'tests.LUCENE_VERSION', value: rootProject.version, description: "Base Lucene version."],
[propName: 'tests.LUCENE_VERSION', value: baseVersion, description: "Base Lucene version."],
[propName: 'tests.bwcdir', value: null, description: "Data for backward-compatibility indexes."],
]
}
@ -85,7 +94,7 @@ configure(allprojects.findAll {project -> project.path.startsWith(":solr") }) {
ext {
testOptions += [
[propName: 'tests.disableHdfs', value: Os.isFamily(Os.FAMILY_WINDOWS) ? 'true' : 'false', description: "Enables or disables @HDFS tests."],
[propName: 'tests.luceneMatchVersion', value: rootProject.version, description: "Base Lucene version."],
[propName: 'tests.luceneMatchVersion', value: baseVersion, description: "Base Lucene version."],
[propName: 'common-solr.dir', value: file("${commonDir}/../solr").path, description: "Solr base dir."],
[propName: 'solr.directoryFactory', value: "org.apache.solr.core.MockDirectoryFactory", description: "Solr directory factory."],
[propName: 'tests.src.home', value: null, description: "See SOLR-14023."],

View File

@ -36,11 +36,8 @@ dependencies {
exclude group: "org.slf4j", module: "slf4j-log4j12"
})
api('com.fasterxml:aalto-xml', {
})
api('com.fasterxml.staxmate:staxmate', {
})
api('com.fasterxml:aalto-xml')
api('com.fasterxml.staxmate:staxmate')
testImplementation project(':solr:test-framework')
testImplementation 'org.eclipse.jetty:jetty-webapp'