Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: tests/swarm_get_results_smoke_test.py

Issue 22980008: Merge all swarm_*.py scripts into swarming.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Rebase against r219402 Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « swarming.py ('k') | tests/swarm_get_results_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import logging
7 import os
8 import subprocess
9 import sys
10 import unittest
11
12 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
13
14
15 class TestSwarm(unittest.TestCase):
16 def test_example(self):
17 # pylint: disable=W0101
18 # A user should be able to trigger a swarm job and return results.
19 cmd = [
20 sys.executable,
21 os.path.normpath(
22 os.path.join(BASE_DIR, '..', 'example', 'run_example_swarm.py')),
23 ]
24 p = subprocess.Popen(
25 cmd,
26 stdin=subprocess.PIPE,
27 stdout=subprocess.PIPE,
28 stderr=subprocess.STDOUT)
29 out = p.communicate()[0]
30 logging.debug(out)
31 self.assertEqual(0, p.returncode, out)
32
33
34 if __name__ == '__main__':
35 logging.basicConfig(
36 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR)
37 if '-v' in sys.argv:
38 unittest.TestCase.maxDiff = None
39 unittest.main()
OLDNEW
« no previous file with comments | « swarming.py ('k') | tests/swarm_get_results_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698