| OLD | NEW |
| (Empty) | |
| 1 #!/usr/bin/env python |
| 2 |
| 3 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 |
| 7 """Tests that the tools/build annotated_run wrapper actually runs.""" |
| 8 |
| 9 import json |
| 10 import os |
| 11 import subprocess |
| 12 import unittest |
| 13 |
| 14 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
| 15 |
| 16 class AnnotatedRunTest(unittest.TestCase): |
| 17 def test_example(self): |
| 18 properties = { |
| 19 'recipe': 'annotated_run_test', |
| 20 'true_prop': True, |
| 21 'num_prop': 123, |
| 22 'string_prop': '321', |
| 23 'dict_prop': {'foo': 'bar'}, |
| 24 } |
| 25 |
| 26 script_path = os.path.join(BASE_DIR, 'annotated_run.py') |
| 27 exit_code = subprocess.call([ |
| 28 'python', script_path, |
| 29 '--factory-properties=%s' % json.dumps(properties)]) |
| 30 self.assertEqual(exit_code, 0) |
| 31 |
| 32 if __name__ == '__main__': |
| 33 unittest.main() |
| OLD | NEW |