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 2012/03/22 16:25:15 UTC
svn commit: r1303832 - in /lucene/dev/branches/branch_3x: ./
dev-tools/scripts/checkJavaDocs.py dev-tools/scripts/smokeTestRelease.py
Author: mikemccand
Date: Thu Mar 22 15:25:15 2012
New Revision: 1303832
URL: http://svn.apache.org/viewvc?rev=1303832&view=rev
Log:
LUCENE-3887: fix smoke tester to fail when package.html is missing or public classes don't have description in package-summary
Added:
lucene/dev/branches/branch_3x/dev-tools/scripts/checkJavaDocs.py
- copied unchanged from r1303830, lucene/dev/trunk/dev-tools/scripts/checkJavaDocs.py
Modified:
lucene/dev/branches/branch_3x/ (props changed)
lucene/dev/branches/branch_3x/dev-tools/scripts/smokeTestRelease.py
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=1303832&r1=1303831&r2=1303832&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/dev-tools/scripts/smokeTestRelease.py (original)
+++ lucene/dev/branches/branch_3x/dev-tools/scripts/smokeTestRelease.py Thu Mar 22 15:25:15 2012
@@ -26,6 +26,7 @@ from collections import defaultdict
import xml.etree.ElementTree as ET
import filecmp
import platform
+import checkJavaDocs
# This tool expects to find /lucene and /solr off the base URL. You
# must have a working gpg, tar, unzip in your path. This has been
@@ -243,7 +244,7 @@ def testChangesText(dir, version, projec
# NOTE: O(N) but N should be smallish:
if 'CHANGES.txt' in files:
fullPath = '%s/CHANGES.txt' % root
- print 'CHECK %s' % fullPath
+ #print 'CHECK %s' % fullPath
checkChangesContent(open(fullPath).read(), version, fullPath, project, False)
def checkChangesContent(s, version, name, project, isHTML):
@@ -383,6 +384,9 @@ def verifyUnpacked(project, artifact, un
# test javadocs
print ' generate javadocs w/ Java 5...'
run('export JAVA_HOME=%s; ant javadocs' % JAVA5_HOME, '%s/javadocs.log' % unpackPath)
+ if checkJavaDocs.checkPackageSummaries('build/docs/api'):
+ raise RuntimeError('javadoc summaries failed')
+
else:
print ' run tests w/ Java 6...'
run('export JAVA_HOME=%s; ant test' % JAVA6_HOME, '%s/test.log' % unpackPath)
@@ -421,6 +425,21 @@ def verifyUnpacked(project, artifact, un
testChangesText('.', version, project)
+ if project == 'lucene' and not isSrc:
+ print ' check Lucene\'s javadoc JAR'
+ unpackJavadocsJar('%s/lucene-core-%s-javadoc.jar' % (unpackPath, version), unpackPath)
+
+def unpackJavadocsJar(jarPath, unpackPath):
+ destDir = '%s/javadocs' % unpackPath
+ if os.path.exists(destDir):
+ shutil.rmtree(destDir)
+ os.makedirs(destDir)
+ os.chdir(destDir)
+ run('unzip %s' % jarPath, '%s/unzip.log' % destDir)
+ if checkJavaDocs.checkPackageSummaries('.'):
+ raise RuntimeError('javadoc problems')
+ os.chdir(unpackPath)
+
def testDemo(isSrc, version):
print ' test demo...'
sep = ';' if platform.system().lower().startswith('cygwin') else ':'