lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1140837 - in /lucene/dev/branches/branch_3x: ./ dev-tools/scripts/smokeTestRelease.py lucene/ lucene/backwards/ lucene/backwards/src/test-framework/ lucene/backwards/src/test/ solr/
Date Tue, 28 Jun 2011 20:51:22 GMT
Author: mikemccand
Date: Tue Jun 28 20:51:21 2011
New Revision: 1140837

URL: http://svn.apache.org/viewvc?rev=1140837&view=rev
Log:
also check all CHANGES.txt files

Modified:
    lucene/dev/branches/branch_3x/   (props changed)
    lucene/dev/branches/branch_3x/dev-tools/scripts/smokeTestRelease.py
    lucene/dev/branches/branch_3x/lucene/   (props changed)
    lucene/dev/branches/branch_3x/lucene/backwards/   (props changed)
    lucene/dev/branches/branch_3x/lucene/backwards/src/test/   (props changed)
    lucene/dev/branches/branch_3x/lucene/backwards/src/test-framework/   (props changed)
    lucene/dev/branches/branch_3x/solr/   (props changed)

Modified: lucene/dev/branches/branch_3x/dev-tools/scripts/smokeTestRelease.py
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/dev-tools/scripts/smokeTestRelease.py?rev=1140837&r1=1140836&r2=1140837&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/dev-tools/scripts/smokeTestRelease.py (original)
+++ lucene/dev/branches/branch_3x/dev-tools/scripts/smokeTestRelease.py Tue Jun 28 20:51:21
2011
@@ -215,9 +215,36 @@ def testChanges(project, version, change
     raise RuntimeError('did not see Contrib-Changes.html link from %s' % changesURLString)
 
   s = load(changesURL)
+  checkChangesContent(s, version, changesURL, project, True)
 
-  if s.find('Release %s' % version) == -1:
-    raise RuntimeError('did not see "Release %s" in %s' % (version, changesURL))
+def testChangesText(dir, version, project):
+  "Checks all CHANGES.txt under this dir."
+  for root, dirs, files in os.walk(dir):
+
+    # NOTE: O(N) but N should be smallish:
+    if 'CHANGES.txt' in files:
+      fullPath = '%s/CHANGES.txt' % root
+      print 'CHECK %s' % fullPath
+      checkChangesContent(open(fullPath).read(), version, fullPath, project, False)
+      
+def checkChangesContent(s, version, name, project, isHTML):
+
+  if isHTML and s.find('Release %s' % version) == -1:
+    raise RuntimeError('did not see "Release %s" in %s' % (version, name))
+
+  if s.lower().find('not yet released') != -1:
+    raise RuntimeError('saw "not yet released" in %s' % name)
+
+  if not isHTML:
+    if project == 'lucene':
+      sub = 'Lucene %s' % version
+    else:
+      sub = version
+      
+    if s.find(sub) == -1:
+      # contrib/benchmark never seems to include release info:
+      if name.find('/benchmark/') == -1:
+        raise RuntimeError('did not see "%s" in %s' % (sub, name))
   
 def run(command, logFile):
   if os.system('%s > %s 2>&1' % (command, logFile)):
@@ -340,6 +367,8 @@ def verifyUnpacked(project, artifact, un
     if project == 'lucene':
       testDemo(isSrc, version)
 
+  testChangesText('.', version, project)
+
 def testDemo(isSrc, version):
   print '    test demo...'
   if isSrc:



Mime
View raw message