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

Side by Side Diff: recipe_engine/unittests/run_test.py

Issue 2933473002: [context] Split "env" values and prefixes. (Closed)
Patch Set: comments, tests, better definition Created 3 years, 6 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The LUCI Authors. All rights reserved. 2 # Copyright 2014 The LUCI Authors. All rights reserved.
3 # Use of this source code is governed under the Apache License, Version 2.0 3 # Use of this source code is governed under the Apache License, Version 2.0
4 # that can be found in the LICENSE file. 4 # that can be found in the LICENSE file.
5 5
6 import json 6 import json
7 import os 7 import os
8 import re 8 import re
9 import subprocess 9 import subprocess
10 import unittest 10 import unittest
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 proc = subprocess.Popen( 48 proc = subprocess.Popen(
49 self._run_cmd(recipe, properties), 49 self._run_cmd(recipe, properties),
50 stdout=subprocess.PIPE, 50 stdout=subprocess.PIPE,
51 stderr=subprocess.STDOUT) 51 stderr=subprocess.STDOUT)
52 stdout = proc.communicate() 52 stdout = proc.communicate()
53 self.assertEqual(0, proc.returncode, '%d != %d when testing %s:\n%s' % ( 53 self.assertEqual(0, proc.returncode, '%d != %d when testing %s:\n%s' % (
54 0, proc.returncode, recipe, stdout)) 54 0, proc.returncode, recipe, stdout))
55 55
56 def test_examples(self): 56 def test_examples(self):
57 tests = [ 57 tests = [
58 ['context:examples/full'],
59 ['context:tests/env'],
58 ['step:examples/full'], 60 ['step:examples/full'],
59 ['path:examples/full'], 61 ['path:examples/full'],
60 ['raw_io:examples/full'], 62 ['raw_io:examples/full'],
61 ['python:examples/full'], 63 ['python:examples/full'],
62 ['json:examples/full'], 64 ['json:examples/full'],
63 ['uuid:examples/full'], 65 ['uuid:examples/full'],
64 ['file:examples/copy'], 66 ['file:examples/copy'],
65 ['file:examples/copytree'], 67 ['file:examples/copytree'],
66 68
67 ['engine_tests/depend_on/top', {'to_pass': 42}], 69 ['engine_tests/depend_on/top', {'to_pass': 42}],
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 u'foo', 262 u'foo',
261 u'bar', 263 u'bar',
262 u'baz', 264 u'baz',
263 ], 265 ],
264 }) 266 })
265 267
266 268
267 if __name__ == '__main__': 269 if __name__ == '__main__':
268 unittest.TestCase.maxDiff = None 270 unittest.TestCase.maxDiff = None
269 unittest.main() 271 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698