Return-Path: X-Original-To: apmail-lucene-commits-archive@www.apache.org Delivered-To: apmail-lucene-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D5821D6CF for ; Fri, 26 Oct 2012 04:54:22 +0000 (UTC) Received: (qmail 55059 invoked by uid 500); 26 Oct 2012 04:54:22 -0000 Mailing-List: contact commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list commits@lucene.apache.org Received: (qmail 55004 invoked by uid 99); 26 Oct 2012 04:54:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2012 04:54:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2012 04:54:18 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 10DD423888E4; Fri, 26 Oct 2012 04:53:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1402387 - /lucene/dev/trunk/dev-tools/scripts/smokeTestRelease.py Date: Fri, 26 Oct 2012 04:53:34 -0000 To: commits@lucene.apache.org From: rmuir@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121026045335.10DD423888E4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rmuir Date: Fri Oct 26 04:53:34 2012 New Revision: 1402387 URL: http://svn.apache.org/viewvc?rev=1402387&view=rev Log: LUCENE-4506: fix smokeTester and beef up missing java7 checks 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=1402387&r1=1402386&r2=1402387&view=diff ============================================================================== --- lucene/dev/trunk/dev-tools/scripts/smokeTestRelease.py (original) +++ lucene/dev/trunk/dev-tools/scripts/smokeTestRelease.py Fri Oct 26 04:53:34 2012 @@ -657,11 +657,21 @@ def verifyUnpacked(project, artifact, un print(' run tests w/ Java 6...') run('%s; ant test' % javaExe('1.6'), '%s/test.log' % unpackPath) run('%s; ant jar' % javaExe('1.6'), '%s/compile.log' % unpackPath) - testDemo(isSrc, version) + testDemo(isSrc, version, '1.6') # test javadocs print(' generate javadocs w/ Java 6...') run('%s; ant javadocs' % javaExe('1.6'), '%s/javadocs.log' % unpackPath) checkJavadocpath('%s/build/docs' % unpackPath) + + print(' run tests w/ Java 7...') + run('%s; ant clean test' % javaExe('1.7'), '%s/test.log' % unpackPath) + run('%s; ant jar' % javaExe('1.7'), '%s/compile.log' % unpackPath) + testDemo(isSrc, version, '1.7') + + print(' generate javadocs w/ Java 7...') + run('%s; ant javadocs' % javaExe('1.7'), '%s/javadocs.log' % unpackPath) + checkJavadocpathFull('%s/build/docs' % unpackPath) + else: os.chdir('solr') # DISABLED until solr tests consistently pass @@ -679,8 +689,8 @@ def verifyUnpacked(project, artifact, un # test javadocs print(' generate javadocs w/ Java 7...') - run('%s; ant javadocs' % javaExe('1.7'), '%s/javadocs.log' % unpackPath) - checkJavadocpath('%s/solr/build/docs' % unpackPath, False) + run('%s; ant clean javadocs' % javaExe('1.7'), '%s/javadocs.log' % unpackPath) + checkJavadocpathFull('%s/solr/build/docs' % unpackPath, False) print(' test solr example w/ Java 6...') run('%s; ant clean example' % javaExe('1.6'), '%s/antexample.log' % unpackPath) @@ -699,7 +709,8 @@ def verifyUnpacked(project, artifact, un checkAllJARs(os.getcwd(), project, version) if project == 'lucene': - testDemo(isSrc, version) + testDemo(isSrc, version, '1.6') + testDemo(isSrc, version, '1.7') else: checkSolrWAR('%s/example/webapps/solr.war' % unpackPath, version) @@ -819,6 +830,9 @@ def testSolrExample(unpackPath, javaPath os.chdir('..') +# the weaker check: we can use this on java6 for some checks, +# but its generated HTML is hopelessly broken so we cannot run +# the link checking that checkJavadocpathFull does. def checkJavadocpath(path, failOnMissing=True): # check for level='package' # we fail here if its screwed up @@ -831,11 +845,20 @@ def checkJavadocpath(path, failOnMissing # raise RuntimeError('javadoc problems') print('\n***WARNING***: javadocs want to fail!\n') +# full checks +def checkJavadocpathFull(path, failOnMissing=True): + # check for missing, etc + checkJavadocpath(path, failOnMissing) + + # also validate html/check for broken links if checkJavadocLinks.checkAll(path): raise RuntimeError('broken javadocs links found!') -def testDemo(isSrc, version): - print(' test demo...') +def testDemo(isSrc, version, jdk): + if (os.access('index', os.F_OK)): + shutil.rmtree('index') # nuke any index from any previous iteration + + print(' test demo with %s...' % jdk) sep = ';' if cygwin else ':' if isSrc: cp = 'build/core/classes/java{0}build/demo/classes/java{0}build/analysis/common/classes/java{0}build/queryparser/classes/java'.format(sep) @@ -843,8 +866,8 @@ def testDemo(isSrc, version): else: cp = 'core/lucene-core-{0}.jar{1}demo/lucene-demo-{0}.jar{1}analysis/common/lucene-analyzers-common-{0}.jar{1}queryparser/lucene-queryparser-{0}.jar'.format(version, sep) docsDir = 'docs' - run('%s; java -cp "%s" org.apache.lucene.demo.IndexFiles -index index -docs %s' % (javaExe('1.6'), cp, docsDir), 'index.log') - run('%s; java -cp "%s" org.apache.lucene.demo.SearchFiles -index index -query lucene' % (javaExe('1.6'), cp), 'search.log') + run('%s; java -cp "%s" org.apache.lucene.demo.IndexFiles -index index -docs %s' % (javaExe(jdk), cp, docsDir), 'index.log') + run('%s; java -cp "%s" org.apache.lucene.demo.SearchFiles -index index -query lucene' % (javaExe(jdk), cp), 'search.log') reMatchingDocs = re.compile('(\d+) total matching documents') m = reMatchingDocs.search(open('search.log', encoding='UTF-8').read()) if m is None: