BIND 10 #2048: configure check for pyexpat

BIND 10 Development do-not-reply at isc.org
Mon Jun 25 05:34:27 UTC 2012


#2048: configure check for pyexpat
-------------------------------------+-------------------------------------
                   Reporter:  jreed  |                 Owner:  UnAssigned
                       Type:  task   |                Status:  new
                   Priority:  low    |             Milestone:  New Tasks
                  Component:  build  |            Resolution:
  system                             |             Sensitive:  0
                   Keywords:         |           Sub-Project:  Core
            Defect Severity:  N/A    |  Estimated Difficulty:  2
Feature Depending on Ticket:         |           Total Hours:  0
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------

Comment (by naokikambe):

 Thank you for the confirmation. As another workaround, I made a quick
 patch for b10-stats-httpd_test.py to skip the tests using xpat if it's
 unavailable:
 {{{#!patch
 diff --git a/src/bin/stats/tests/b10-stats-httpd_test.py
 b/src/bin/stats/tests/b10-stats-httpd_test.py
 index 57abed9..65206ab 100644
 --- a/src/bin/stats/tests/b10-stats-httpd_test.py
 +++ b/src/bin/stats/tests/b10-stats-httpd_test.py
 @@ -109,6 +109,19 @@ def is_ipv6_enabled(address='::1', port=8001):

  class TestHttpHandler(unittest.TestCase):
      """Tests for HttpHandler class"""
 +
 +    # This test suite uses xml.etree.ElementTree.XMLParser via
 +    # xml.etree.ElementTree.parse. On the platform where xpat isn't
 +    # installed, ImportError is raised and it's failed. Check xpat is
 +    # available before the test invocation. Skip this test if it's
 +    # unavailable.
 +    xml_parser = None
 +    try:
 +        # ImportError raised if xpat is unavailable
 +        xml_parser = xml.etree.ElementTree.XMLParser()
 +    except ImportError:
 +        pass
 +
      def setUp(self):
          # set the signal handler for deadlock
          self.sig_handler = SignalHandler(self.fail)
 @@ -132,6 +145,7 @@ class TestHttpHandler(unittest.TestCase):
          # reset the signal handler
          self.sig_handler.reset()

 +    @unittest.skipUnless(xml_parser, "skipping the test using XMLParser")
      def test_do_GET(self):
          self.assertTrue(type(self.stats_httpd.httpd) is list)
          self.assertEqual(len(self.stats_httpd.httpd), 1)
 }}}

-- 
Ticket URL: <http://bind10.isc.org/ticket/2048#comment:7>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list