addBackCompatIndexes.py: Don't generated sorted indexes for versions < 6.2

This commit is contained in:
Steve Rowe 2017-10-24 12:27:55 -04:00
parent f74773bd6b
commit 3698acf321
1 changed files with 5 additions and 3 deletions

View File

@ -103,7 +103,7 @@ def update_backcompat_tests(types, index_version, current_version):
module = 'lucene/backward-codecs'
filename = '%s/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java' % module
if not current_version.is_back_compat_with(index_version):
matcher = re.compile(r'final String\[\] unsupportedNames = {|};'),
matcher = re.compile(r'final String\[\] unsupportedNames = {|};')
elif 'sorted' in types:
matcher = re.compile(r'final static String\[\] oldSortedNames = {|};')
else:
@ -245,6 +245,7 @@ def main():
current_version = scriptutil.Version.parse(scriptutil.find_current_version())
create_and_add_index(source, 'cfs', c.version, current_version, c.temp_dir)
create_and_add_index(source, 'nocfs', c.version, current_version, c.temp_dir)
if c.version.major > 6 or (c.version.major == 6 and c.version.minor >= 2):
create_and_add_index(source, 'sorted', c.version, current_version, c.temp_dir)
if c.version.minor == 0 and c.version.bugfix == 0 and c.version.major < current_version.major:
create_and_add_index(source, 'moreterms', c.version, current_version, c.temp_dir)
@ -254,6 +255,7 @@ def main():
print('\nAdding backwards compatibility tests')
update_backcompat_tests(['cfs', 'nocfs'], c.version, current_version)
if c.version.major > 6 or (c.version.major == 6 and c.version.minor >= 2):
update_backcompat_tests(['sorted'], c.version, current_version)
print('\nTesting changes')