You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rj...@apache.org on 2014/08/29 18:38:00 UTC

svn commit: r1621336 - in /lucene/dev/trunk: build.xml dev-tools/scripts/smokeTestRelease.py

Author: rjernst
Date: Fri Aug 29 16:38:00 2014
New Revision: 1621336

URL: http://svn.apache.org/r1621336
Log:
Add java8 checks to smoke test

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

Modified: lucene/dev/trunk/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/build.xml?rev=1621336&r1=1621335&r2=1621336&view=diff
==============================================================================
--- lucene/dev/trunk/build.xml (original)
+++ lucene/dev/trunk/build.xml Fri Aug 29 16:38:00 2014
@@ -381,9 +381,14 @@ File | Project Structure | Platform Sett
   <target name="-env-JAVA7_HOME" depends="-load-env" if="env.JAVA7_HOME">
      <property name="JAVA7_HOME" value="${env.JAVA7_HOME}"/>
   </target>
+
+  <target name="-env-JAVA8_HOME" depends="-load-env" if="env.JAVA8_HOME">
+     <property name="JAVA8_HOME" value="${env.JAVA8_HOME}"/>
+  </target>
   
-  <target name="nightly-smoke" description="Builds an unsigned release and smoke tests it" depends="clean,-env-JAVA7_HOME">
+  <target name="nightly-smoke" description="Builds an unsigned release and smoke tests it" depends="clean,-env-JAVA7_HOME,-env-JAVA8_HOME">
    <fail unless="JAVA7_HOME">JAVA7_HOME property or environment variable is not defined.</fail>
+   <fail unless="JAVA8_HOME">JAVA8_HOME property or environment variable is not defined.</fail>
    <exec executable="${python32.exe}" failonerror="true">
       <arg value="-V"/>
    </exec>
@@ -415,6 +420,7 @@ File | Project Structure | Platform Sett
      <arg value="${fakeRelease.uri}"/>
      <arg value="${smokeTestRelease.testArgs}"/>
      <env key="JAVA7_HOME" file="${JAVA7_HOME}"/>
+     <env key="JAVA8_HOME" file="${JAVA8_HOME}"/>
    </exec>
    <delete dir="${fakeRelease}"/>
    <delete dir="${fakeReleaseTmp}"/>

Modified: lucene/dev/trunk/dev-tools/scripts/smokeTestRelease.py
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/dev-tools/scripts/smokeTestRelease.py?rev=1621336&r1=1621335&r2=1621336&view=diff
==============================================================================
--- lucene/dev/trunk/dev-tools/scripts/smokeTestRelease.py (original)
+++ lucene/dev/trunk/dev-tools/scripts/smokeTestRelease.py Fri Aug 29 16:38:00 2014
@@ -63,6 +63,8 @@ def unshortenURL(url):
 def javaExe(version):
   if version == '1.7':
     path = JAVA7_HOME
+  elif version == '1.8':
+    path = JAVA8_HOME
   else:
     raise RuntimeError("unknown Java version '%s'" % version)
   if cygwin:
@@ -81,8 +83,14 @@ try:
 except KeyError:
   raise RuntimeError('please set JAVA7_HOME in the env before running smokeTestRelease')
 print('JAVA7_HOME is %s' % JAVA7_HOME)
+try:
+  JAVA8_HOME = env['JAVA8_HOME']
+except KeyError:
+  raise RuntimeError('please set JAVA7_HOME in the env before running smokeTestRelease')
+print('JAVA8_HOME is %s' % JAVA7_HOME)
 
 verifyJavaVersion('1.7')
+verifyJavaVersion('1.8')
 
 # TODO
 #   + verify KEYS contains key that signed the release
@@ -739,12 +747,21 @@ def verifyUnpacked(project, artifact, un
       run('%s; ant javadocs' % javaExe('1.7'), '%s/javadocs.log' % unpackPath)
       checkJavadocpathFull('%s/build/docs' % unpackPath)
 
+      print("    run tests w/ Java 8 and testArgs='%s'..." % testArgs)
+      run('%s; ant clean test %s' % (javaExe('1.8'), testArgs), '%s/test.log' % unpackPath)
+      run('%s; ant jar' % javaExe('1.8'), '%s/compile.log' % unpackPath)
+      testDemo(isSrc, version, '1.8')
+
+      print('    generate javadocs w/ Java 8...')
+      run('%s; ant javadocs' % javaExe('1.8'), '%s/javadocs.log' % unpackPath)
+      checkJavadocpathFull('%s/build/docs' % unpackPath)
+
     else:
       os.chdir('solr')
 
       print("    run tests w/ Java 7 and testArgs='%s'..." % testArgs)
       run('%s; ant clean test -Dtests.slow=false %s' % (javaExe('1.7'), testArgs), '%s/test.log' % unpackPath)
- 
+
       # test javadocs
       print('    generate javadocs w/ Java 7...')
       run('%s; ant clean javadocs' % javaExe('1.7'), '%s/javadocs.log' % unpackPath)
@@ -753,8 +770,19 @@ def verifyUnpacked(project, artifact, un
       print('    test solr example w/ Java 7...')
       run('%s; ant clean example' % javaExe('1.7'), '%s/antexample.log' % unpackPath)
       testSolrExample(unpackPath, JAVA7_HOME, True)
-      os.chdir('..')
 
+      print("    run tests w/ Java 8 and testArgs='%s'..." % testArgs)
+      run('%s; ant clean test -Dtests.slow=false %s' % (javaExe('1.8'), testArgs), '%s/test.log' % unpackPath)
+
+      print('    generate javadocs w/ Java 8...')
+      run('%s; ant clean javadocs' % javaExe('1.8'), '%s/javadocs.log' % unpackPath)
+      checkJavadocpathFull('%s/solr/build/docs' % unpackPath, False)
+
+      print('    test solr example w/ Java 8...')
+      run('%s; ant clean example' % javaExe('1.8'), '%s/antexample.log' % unpackPath)
+      testSolrExample(unpackPath, JAVA8_HOME, True)
+
+      os.chdir('..')
       print('    check NOTICE')
       testNotice(unpackPath)
 
@@ -764,12 +792,16 @@ def verifyUnpacked(project, artifact, un
     
     if project == 'lucene':
       testDemo(isSrc, version, '1.7')
+      testDemo(isSrc, version, '1.8')
+
+      print('    check Lucene\'s javadoc JAR')
+      checkJavadocpath('%s/docs' % unpackPath)
 
     else:
       checkSolrWAR('%s/example/webapps/solr.war' % unpackPath, svnRevision, version, tmpDir, baseURL)
 
       print('    copying unpacked distribution for Java 7 ...')
-      java7UnpackPath = '%s-java7' %unpackPath
+      java7UnpackPath = '%s-java7' % unpackPath
       if os.path.exists(java7UnpackPath):
         shutil.rmtree(java7UnpackPath)
       shutil.copytree(unpackPath, java7UnpackPath)
@@ -777,14 +809,19 @@ def verifyUnpacked(project, artifact, un
       print('    test solr example w/ Java 7...')
       testSolrExample(java7UnpackPath, JAVA7_HOME, False)
 
+      print('    copying unpacked distribution for Java 8 ...')
+      java8UnpackPath = '%s-java8' % unpackPath
+      if os.path.exists(java8UnpackPath):
+        shutil.rmtree(java8UnpackPath)
+      shutil.copytree(unpackPath, java8UnpackPath)
+      os.chdir(java8UnpackPath)
+      print('    test solr example w/ Java 8...')
+      testSolrExample(java8UnpackPath, JAVA8_HOME, False)
+
       os.chdir(unpackPath)
 
   testChangesText('.', version, project)
 
-  if project == 'lucene' and not isSrc:
-    print('    check Lucene\'s javadoc JAR')
-    checkJavadocpath('%s/docs' % unpackPath)
-
 def testNotice(unpackPath):
   solrNotice = open('%s/NOTICE.txt' % unpackPath, encoding='UTF-8').read()
   luceneNotice = open('%s/lucene/NOTICE.txt' % unpackPath, encoding='UTF-8').read()