Chromium Code Reviews| Index: native_client_sdk/src/tools/tests/httpd_test.py |
| diff --git a/native_client_sdk/src/tools/tests/httpd_test.py b/native_client_sdk/src/tools/tests/httpd_test.py |
| index 9cdeaeca1f57b68d870ab8f471a98e2135ced612..c811a8d9290e02d7b852f653cb2f487ccdf57ded 100755 |
| --- a/native_client_sdk/src/tools/tests/httpd_test.py |
| +++ b/native_client_sdk/src/tools/tests/httpd_test.py |
| @@ -47,8 +47,7 @@ class RunTest(unittest.TestCase): |
| def _Run(self, args=None, timeout=None): |
| args = args or [] |
| - run_py = os.path.join(PARENT_DIR, 'run.py') |
| - cmd = [sys.executable, run_py] |
| + cmd = [sys.executable, os.path.join(PARENT_DIR, 'run.py')] |
|
binji
2014/11/13 23:57:05
seems unrelated
Sam Clegg
2014/11/30 17:55:14
Done.
|
| cmd.extend(args) |
| self.process = subprocess.Popen(cmd, stdout=subprocess.PIPE, |
| stderr=subprocess.PIPE) |
| @@ -81,16 +80,17 @@ class RunTest(unittest.TestCase): |
| def testQuit(self): |
| args = self._GetChromeMockArgs('?quit=1', 'get', sleep=10) |
| - _, stdout, _ = self._Run(args, timeout=20) |
| - self.assertTrue('Starting' in stdout) |
| - self.assertTrue('Expected to be killed' not in stdout) |
| + rtn, stdout, _ = self._Run(args, timeout=20) |
| + self.assertEqual(rtn, 0) |
| + self.assertIn('Starting', stdout) |
| + self.assertNotIn('Expected to be killed', stdout) |
| def testSubprocessDies(self): |
| args = self._GetChromeMockArgs(page=None, http_request_type=None, sleep=0, |
| expect_to_be_killed=False) |
| returncode, stdout, _ = self._Run(args, timeout=10) |
| self.assertNotEqual(-1, returncode) |
| - self.assertTrue('Starting' in stdout) |
| + self.assertIn('Starting', stdout) |
| if __name__ == '__main__': |