summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/runtime/smart.py4
-rw-r--r--meta/lib/oeqa/utils/httpserver.py5
2 files changed, 5 insertions, 4 deletions
diff --git a/meta/lib/oeqa/runtime/smart.py b/meta/lib/oeqa/runtime/smart.py
index 6e20f96967..59083ca817 100644
--- a/meta/lib/oeqa/runtime/smart.py
+++ b/meta/lib/oeqa/runtime/smart.py
@@ -17,7 +17,7 @@ class SmartTest(oeRuntimeTest):
17 @skipUnlessPassed('test_smart_help') 17 @skipUnlessPassed('test_smart_help')
18 def smart(self, command, expected = 0): 18 def smart(self, command, expected = 0):
19 command = 'smart %s' % command 19 command = 'smart %s' % command
20 status, output = self.target.run(command) 20 status, output = self.target.run(command, 500)
21 message = os.linesep.join([command, output]) 21 message = os.linesep.join([command, output])
22 self.assertEqual(status, expected, message) 22 self.assertEqual(status, expected, message)
23 self.assertFalse("Cannot allocate memory" in output, message) 23 self.assertFalse("Cannot allocate memory" in output, message)
@@ -48,7 +48,7 @@ class SmartRepoTest(SmartTest):
48 48
49 @classmethod 49 @classmethod
50 def setUpClass(self): 50 def setUpClass(self):
51 self.repo_server = HTTPService(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR', True)) 51 self.repo_server = HTTPService(oeRuntimeTest.tc.d.getVar('DEPLOY_DIR', True), oeRuntimeTest.tc.qemu.host_ip)
52 self.repo_server.start() 52 self.repo_server.start()
53 53
54 @classmethod 54 @classmethod
diff --git a/meta/lib/oeqa/utils/httpserver.py b/meta/lib/oeqa/utils/httpserver.py
index d4b61547e8..f161a1bddd 100644
--- a/meta/lib/oeqa/utils/httpserver.py
+++ b/meta/lib/oeqa/utils/httpserver.py
@@ -15,12 +15,13 @@ class HTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
15 15
16class HTTPService(object): 16class HTTPService(object):
17 17
18 def __init__(self, root_dir): 18 def __init__(self, root_dir, host=''):
19 self.root_dir = root_dir 19 self.root_dir = root_dir
20 self.host = host
20 self.port = 0 21 self.port = 0
21 22
22 def start(self): 23 def start(self):
23 self.server = HTTPServer(('', self.port), HTTPRequestHandler) 24 self.server = HTTPServer((self.host, self.port), HTTPRequestHandler)
24 if self.port == 0: 25 if self.port == 0:
25 self.port = self.server.server_port 26 self.port = self.server.server_port
26 self.process = multiprocessing.Process(target=self.server.server_start, args=[self.root_dir]) 27 self.process = multiprocessing.Process(target=self.server.server_start, args=[self.root_dir])