You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2014/09/25 11:56:14 UTC

svn commit: r1627496 - /lucene/dev/trunk/dev-tools/scripts/smokeTestRelease.py

Author: mikemccand
Date: Thu Sep 25 09:56:14 2014
New Revision: 1627496

URL: http://svn.apache.org/r1627496
Log:
get smoke tester properly parsing versions from TestBackCompat

Modified:
    lucene/dev/trunk/dev-tools/scripts/smokeTestRelease.py

Modified: lucene/dev/trunk/dev-tools/scripts/smokeTestRelease.py
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/dev-tools/scripts/smokeTestRelease.py?rev=1627496&r1=1627495&r2=1627496&view=diff
==============================================================================
--- lucene/dev/trunk/dev-tools/scripts/smokeTestRelease.py (original)
+++ lucene/dev/trunk/dev-tools/scripts/smokeTestRelease.py Thu Sep 25 09:56:14 2014
@@ -1372,9 +1372,8 @@ def confirmAllReleasesAreTestedForBackCo
 
   print('    find all past Lucene releases...')
   allReleases = getAllLuceneReleases()
-  if False:
-    for tup in allReleases:
-      print('  %s' % '.'.join(str(x) for x in tup))
+  #for tup in allReleases:
+  #  print('  %s' % '.'.join(str(x) for x in tup))
 
   testedIndices = set()
 
@@ -1394,24 +1393,23 @@ def confirmAllReleasesAreTestedForBackCo
       # Should not happen since we redirected stderr to stdout:
       raise RuntimeError('stderr non-empty')
 
-    reIndexName = re.compile('TEST: index[= ](.*?)$', re.MULTILINE)
-
-    for s in reIndexName.findall(stdout):
+    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:
-      name = os.path.splitext(s)[0]
-      # print('parse name %s' % name)
-      if name == '410':
-        tup = 4, 10, 0
-      elif name == '40a':
+      #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 name == '40b':
+      elif tup == ('4', '0', '0', '2'):
+        # CONFUSING: this is the 4.0.0-beta index??
         tup = 4, 0, 0, 1
-      elif len(name) == 2:
-        tup = int(name[0]), int(name[1]), 0
-      elif len(name) == 3:
-        tup = int(name[0]), int(name[1]), int(name[2])
       else:
-        raise RuntimeError('do not know how to parse index name %s' % name)
+        raise RuntimeError('could not parse version %s' % name)
+          
       testedIndices.add(tup)
 
   l = list(testedIndices)