2 # Copyright 2013 The Swarming Authors. All rights reserved.
3 # Use of this source code is governed under the Apache License, Version 2.0 that
4 # can be found in the LICENSE file.
12 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
14 ISOLATE_SERVER = 'https://isolateserver.appspot.com/'
15 SWARMING_SERVER = 'https://chromium-swarm.appspot.com/'
18 class TestSwarm(unittest.TestCase):
19 def test_example(self):
20 # pylint: disable=W0101
21 # A user should be able to trigger a swarm job and return results.
24 '4_swarming_trigger_collect.py',
25 '--isolate-server', ISOLATE_SERVER,
26 '--swarming', SWARMING_SERVER,
29 cmd.append('--verbose')
32 cwd=os.path.join(BASE_DIR, '..', 'example'),
33 stdin=subprocess.PIPE,
34 stdout=subprocess.PIPE,
35 stderr=subprocess.STDOUT)
36 out = p.communicate()[0]
38 self.assertEqual(0, p.returncode, out)
41 if __name__ == '__main__':
43 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR)
45 unittest.TestCase.maxDiff = None