← Back to team overview

ubuntu-server-iso-testing-dev team mailing list archive

[Merge] lp:~hggdh2/ubuntu-server-iso-testing/usit-dns-server into lp:ubuntu-server-iso-testing

 

C de-Avillez has proposed merging lp:~hggdh2/ubuntu-server-iso-testing/usit-dns-server into lp:ubuntu-server-iso-testing.

Requested reviews:
  Ubuntu Server Iso Testing Developers (ubuntu-server-iso-testing-dev)

For more details, see:
https://code.launchpad.net/~hggdh2/ubuntu-server-iso-testing/usit-dns-server/+merge/68411

server dns-test: added debug output, set logging to debug -- the DNS test is failing on wazn, and we do not know why. By default we should collect the commands output.
-- 
https://code.launchpad.net/~hggdh2/ubuntu-server-iso-testing/usit-dns-server/+merge/68411
Your team Ubuntu Server Iso Testing Developers is requested to review the proposed merge of lp:~hggdh2/ubuntu-server-iso-testing/usit-dns-server into lp:ubuntu-server-iso-testing.
=== modified file 'templates/test_cases/dns-server/test'
--- templates/test_cases/dns-server/test	2010-12-02 15:02:49 +0000
+++ templates/test_cases/dns-server/test	2011-07-19 15:49:28 +0000
@@ -24,7 +24,7 @@
 import subprocess
 import unittest
 
-logging.basicConfig(level=logging.INFO)
+logging.basicConfig(level=logging.DEBUG)
 
 class DnsServerTest(unittest.TestCase):
 
@@ -48,32 +48,40 @@
         cmd = ["host", "www.ubuntu.com", "localhost"]
         logging.debug("Cmd: %s" % (cmd))
         proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
-                                     stderr=subprocess.PIPE)
-        ret = proc.wait()
+                                     stderr=subprocess.STDOUT)
+        output = proc.communicate()[0]
+        logging.debug("Cmd output: %s" % (output))
+	ret = proc.returncode
 	self.assertEquals(ret, 0)
 
     def testResolveUdp6(self):
         cmd = ["host", "-6", "www.ubuntu.com", "ip6-localhost"]
         logging.debug("Cmd: %s" % (cmd))
         proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
-                                     stderr=subprocess.PIPE)
-        ret = proc.wait()
+                                     stderr=subprocess.STDOUT)
+        output = proc.communicate()[0]
+        logging.debug("Cmd output: %s" % (output))
+	ret = proc.returncode
 	self.assertEquals(ret, 0)
 
     def testResolveTcp(self):
         cmd = ["host", "-T", "www.ubuntu.com", "localhost"]
         logging.debug("Cmd: %s" % (cmd))
         proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
-                                     stderr=subprocess.PIPE)
-        ret = proc.wait()
+                                     stderr=subprocess.STDOUT)
+        output = proc.communicate()[0]
+        logging.debug("Cmd output: %s" % (output))
+	ret = proc.returncode
 	self.assertEquals(ret, 0)
 
     def testResolveTcp6(self):
         cmd = ["host", "-T", "-6", "www.ubuntu.com", "ip6-localhost"]
         logging.debug("Cmd: %s" % (cmd))
         proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
-                                     stderr=subprocess.PIPE)
-        ret = proc.wait()
+                                     stderr=subprocess.STDOUT)
+        output = proc.communicate()[0]
+        logging.debug("Cmd output: %s" % (output))
+	ret = proc.returncode
 	self.assertEquals(ret, 0)
 
 if __name__ == '__main__':


Follow ups