Bug 1376306 - Update tests to reflect new Java version requirement; r=me
authorGregory Szorc <gps@mozilla.com>
Fri, 28 Jul 2017 17:40:00 -0700
changeset 422884 616afd45b6e3d765bbc6451bec03d99931cb5b67
parent 422883 e34659defc68d9cd770c5bf953fa38e965ce4874
child 422885 d394c7b2df1d26f7348f6092675a4d0b94926fb3
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1376306
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1376306 - Update tests to reflect new Java version requirement; r=me f497b6194e9f bumped the minimum Java version requirement in configure from 1.7 to 1.8. It forgot to update tests that were pinning the Java version at 1.7. The tests then failed. We bump the versions in tests to restore order. CLOSED TREE MozReview-Commit-ID: 1zm5L1QQy7a
python/mozbuild/mozbuild/test/configure/test_checks_configure.py
--- a/python/mozbuild/mozbuild/test/configure/test_checks_configure.py
+++ b/python/mozbuild/mozbuild/test/configure/test_checks_configure.py
@@ -478,17 +478,17 @@ class TestChecksConfigure(unittest.TestC
             ERROR: Paths provided to find_program must be a list of strings, not %r
         ''' % mozpath.dirname(self.OTHER_A)))
 
     def test_java_tool_checks(self):
         includes = ('util.configure', 'checks.configure', 'java.configure')
 
         def mock_valid_javac(_, args):
             if len(args) == 1 and args[0] == '-version':
-                return 0, '1.7', ''
+                return 0, '1.8', ''
             self.fail("Unexpected arguments to mock_valid_javac: %s" % args)
 
         # A valid set of tools in a standard location.
         java = mozpath.abspath('/usr/bin/java')
         javah = mozpath.abspath('/usr/bin/javah')
         javac = mozpath.abspath('/usr/bin/javac')
         jar = mozpath.abspath('/usr/bin/jar')
         jarsigner = mozpath.abspath('/usr/bin/jarsigner')
@@ -515,17 +515,17 @@ class TestChecksConfigure(unittest.TestC
         })
         self.assertEqual(out, textwrap.dedent('''\
              checking for java... %s
              checking for javah... %s
              checking for jar... %s
              checking for jarsigner... %s
              checking for keytool... %s
              checking for javac... %s
-             checking for javac version... 1.7
+             checking for javac version... 1.8
         ''' % (java, javah, jar, jarsigner, keytool, javac)))
 
         # An alternative valid set of tools referred to by JAVA_HOME.
         alt_java = mozpath.abspath('/usr/local/bin/java')
         alt_javah = mozpath.abspath('/usr/local/bin/javah')
         alt_javac = mozpath.abspath('/usr/local/bin/javac')
         alt_jar = mozpath.abspath('/usr/local/bin/jar')
         alt_jarsigner = mozpath.abspath('/usr/local/bin/jarsigner')
@@ -558,17 +558,17 @@ class TestChecksConfigure(unittest.TestC
         })
         self.assertEqual(out, textwrap.dedent('''\
              checking for java... %s
              checking for javah... %s
              checking for jar... %s
              checking for jarsigner... %s
              checking for keytool... %s
              checking for javac... %s
-             checking for javac version... 1.7
+             checking for javac version... 1.8
         ''' % (alt_java, alt_javah, alt_jar, alt_jarsigner,
                alt_keytool, alt_javac)))
 
         # We can use --with-java-bin-path instead of JAVA_HOME to similar
         # effect.
         config, out, status = self.get_result(
             args=['--with-java-bin-path=%s' % mozpath.dirname(alt_java)],
             includes=includes,
@@ -587,17 +587,17 @@ class TestChecksConfigure(unittest.TestC
         })
         self.assertEqual(out, textwrap.dedent('''\
              checking for java... %s
              checking for javah... %s
              checking for jar... %s
              checking for jarsigner... %s
              checking for keytool... %s
              checking for javac... %s
-             checking for javac version... 1.7
+             checking for javac version... 1.8
         ''' % (alt_java, alt_javah, alt_jar, alt_jarsigner,
                alt_keytool, alt_javac)))
 
         # If --with-java-bin-path and JAVA_HOME are both set,
         # --with-java-bin-path takes precedence.
         config, out, status = self.get_result(
             args=['--with-java-bin-path=%s' % mozpath.dirname(alt_java)],
             includes=includes,
@@ -617,17 +617,17 @@ class TestChecksConfigure(unittest.TestC
         })
         self.assertEqual(out, textwrap.dedent('''\
              checking for java... %s
              checking for javah... %s
              checking for jar... %s
              checking for jarsigner... %s
              checking for keytool... %s
              checking for javac... %s
-             checking for javac version... 1.7
+             checking for javac version... 1.8
         ''' % (alt_java, alt_javah, alt_jar, alt_jarsigner,
                alt_keytool, alt_javac)))
 
         def mock_old_javac(_, args):
             if len(args) == 1 and args[0] == '-version':
                 return 0, '1.6.9', ''
             self.fail("Unexpected arguments to mock_old_javac: %s" % args)
 
@@ -650,17 +650,17 @@ class TestChecksConfigure(unittest.TestC
         self.assertEqual(out, textwrap.dedent('''\
              checking for java... %s
              checking for javah... %s
              checking for jar... %s
              checking for jarsigner... %s
              checking for keytool... %s
              checking for javac... %s
              checking for javac version... 
-             ERROR: javac 1.7 or higher is required (found 1.6.9)
+             ERROR: javac 1.8 or higher is required (found 1.6.9)
         ''' % (java, javah, jar, jarsigner, keytool, javac)))
 
         # Any missing tool is fatal when these checks run.
         del paths[jarsigner]
         config, out, status = self.get_result(includes=includes,
                                               extra_paths=paths,
                                               environ={
                                                   'PATH': mozpath.dirname(java)