You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2022/01/12 17:56:32 UTC
[lucene] branch branch_9x updated: addBackcompatIndexes.py should use Gradle, not Ant. (#531)
This is an automated email from the ASF dual-hosted git repository.
jpountz pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 04856ee addBackcompatIndexes.py should use Gradle, not Ant. (#531)
04856ee is described below
commit 04856ee8c07b4f4f48d4507d108feed452a119e7
Author: Adrien Grand <jp...@gmail.com>
AuthorDate: Wed Jan 12 18:55:59 2022 +0100
addBackcompatIndexes.py should use Gradle, not Ant. (#531)
---
dev-tools/scripts/addBackcompatIndexes.py | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/dev-tools/scripts/addBackcompatIndexes.py b/dev-tools/scripts/addBackcompatIndexes.py
index e0023f3..3d05d85 100755
--- a/dev-tools/scripts/addBackcompatIndexes.py
+++ b/dev-tools/scripts/addBackcompatIndexes.py
@@ -67,12 +67,13 @@ def create_and_add_index(source, indextype, index_version, current_version, temp
'dvupdates': 'testCreateIndexWithDocValuesUpdates',
'emptyIndex': 'testCreateEmptyIndex'
}[indextype]
- ant_args = ' '.join([
+ gradle_args = ' '.join([
+ '-Ptests.useSecurityManager=false',
+ '-p lucene/%s' % module,
+ 'test',
+ '--tests TestBackwardsCompatibility.%s' % test,
'-Dtests.bwcdir=%s' % temp_dir,
- '-Dtests.codec=default',
- '-Dtests.useSecurityManager=false',
- '-Dtestcase=TestBackwardsCompatibility',
- '-Dtestmethod=%s' % test
+ '-Dtests.codec=default'
])
base_dir = os.getcwd()
bc_index_dir = os.path.join(temp_dir, dirname)
@@ -83,8 +84,8 @@ def create_and_add_index(source, indextype, index_version, current_version, temp
else:
if os.path.exists(bc_index_dir):
shutil.rmtree(bc_index_dir)
- os.chdir(os.path.join(source, module))
- scriptutil.run('ant test %s' % ant_args)
+ os.chdir(source)
+ scriptutil.run('./gradlew %s' % gradle_args)
os.chdir(bc_index_dir)
scriptutil.run('zip %s *' % filename)
print('done')
@@ -243,7 +244,7 @@ def main():
and (c.version.major > 6 or (c.version.major == 6 and c.version.minor >= 2))
if should_make_sorted:
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:
+ if c.version.minor == 0 and c.version.bugfix == 0 and current_version.is_back_compat_with(c.version):
create_and_add_index(source, 'moreterms', c.version, current_version, c.temp_dir)
create_and_add_index(source, 'dvupdates', c.version, current_version, c.temp_dir)
create_and_add_index(source, 'emptyIndex', c.version, current_version, c.temp_dir)