From 9e6353843c1762b5792eb0eab6aed8570cc5fac2 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Fri, 29 May 2015 14:17:04 +0000 Subject: [PATCH] fix smoke tester to pass again git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1682481 13f79535-47bb-0310-9956-ffa450edef68 --- dev-tools/scripts/checkJavaDocs.py | 2 +- dev-tools/scripts/smokeTestRelease.py | 63 ++++++++++++++------------- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/dev-tools/scripts/checkJavaDocs.py b/dev-tools/scripts/checkJavaDocs.py index e7b13eb09ab..afa5dc1b981 100644 --- a/dev-tools/scripts/checkJavaDocs.py +++ b/dev-tools/scripts/checkJavaDocs.py @@ -274,7 +274,7 @@ def checkSummary(fullPath): if lineLower.startswith('package ') or lineLower.startswith('

see: '): + if lineLower.startswith('see: ') or lineLower.startswith('

see:'): desc = ' '.join(desc) desc = reMarkup.sub(' ', desc) desc = desc.strip() diff --git a/dev-tools/scripts/smokeTestRelease.py b/dev-tools/scripts/smokeTestRelease.py index ba11e93e30c..74ea18d2423 100644 --- a/dev-tools/scripts/smokeTestRelease.py +++ b/dev-tools/scripts/smokeTestRelease.py @@ -1372,38 +1372,41 @@ def confirmAllReleasesAreTestedForBackCompat(unpackPath): os.chdir(unpackPath) - for suffix in '',: - print(' run TestBackwardsCompatibility%s..' % suffix) - command = 'ant test -Dtestcase=TestBackwardsCompatibility%s -Dtests.verbose=true' % suffix - p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - stdout, stderr = p.communicate() - if p.returncode is not 0: - # Not good: the test failed! - raise RuntimeError('%s failed:\n%s' % (command, stdout)) - stdout = stdout.decode('utf-8') + print(' run TestBackwardsCompatibility..') + command = 'ant test -Dtestcase=TestBackwardsCompatibility -Dtests.verbose=true' + p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + stdout, stderr = p.communicate() + if p.returncode is not 0: + # Not good: the test failed! + raise RuntimeError('%s failed:\n%s' % (command, stdout)) + stdout = stdout.decode('utf-8') - if stderr is not None: - # Should not happen since we redirected stderr to stdout: - raise RuntimeError('stderr non-empty') + if stderr is not None: + # Should not happen since we redirected stderr to stdout: + raise RuntimeError('stderr non-empty') - reIndexName = re.compile(r'TEST: index[\s*=\s*](.*?)(-cfs|-nocfs)$', re.MULTILINE) - for name, cfsPart in reIndexName.findall(stdout): - # Fragile: decode the inconsistent naming schemes we've used in TestBWC's indices: - #print('parse name %s' % name) - tup = tuple(name.split('.')) - if len(tup) == 3: - # ok - tup = tuple(int(x) for x in tup) - elif tup == ('4', '0', '0', '1'): - # CONFUSING: this is the 4.0.0-alpha index?? - tup = 4, 0, 0, 0 - elif tup == ('4', '0', '0', '2'): - # CONFUSING: this is the 4.0.0-beta index?? - tup = 4, 0, 0, 1 - else: - raise RuntimeError('could not parse version %s' % name) - - testedIndices.add(tup) + reIndexName = re.compile(r'TEST: index[\s*=\s*](.*?)(-cfs|-nocfs)$', re.MULTILINE) + for name, cfsPart in reIndexName.findall(stdout): + # Fragile: decode the inconsistent naming schemes we've used in TestBWC's indices: + #print('parse name %s' % name) + tup = tuple(name.split('.')) + if len(tup) == 3: + # ok + tup = tuple(int(x) for x in tup) + elif tup == ('4', '0', '0', '1'): + # CONFUSING: this is the 4.0.0-alpha index?? + tup = 4, 0, 0, 0 + elif tup == ('4', '0', '0', '2'): + # CONFUSING: this is the 4.0.0-beta index?? + tup = 4, 0, 0, 1 + elif name == '5x-with-4x-segments': + # Mixed version test case; ignore it for our purposes because we only + # tally up the "tests single Lucene version" indices + continue + else: + raise RuntimeError('could not parse version %s' % name) + + testedIndices.add(tup) l = list(testedIndices) l.sort()