| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Tests for mb.py.""" | 6 """Tests for mb.py.""" |
| 7 | 7 |
| 8 import json | 8 import json |
| 9 import StringIO | 9 import StringIO |
| 10 import os | 10 import os |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 '-c', 'gn_debug_goma', | 361 '-c', 'gn_debug_goma', |
| 362 '--swarming-targets-file', '/tmp/swarming_targets', | 362 '--swarming-targets-file', '/tmp/swarming_targets', |
| 363 '//out/Default'], mbw=mbw, ret=0) | 363 '//out/Default'], mbw=mbw, ret=0) |
| 364 self.assertIn('/fake_src/out/Default/base_unittests.isolate', | 364 self.assertIn('/fake_src/out/Default/base_unittests.isolate', |
| 365 mbw.files) | 365 mbw.files) |
| 366 self.assertIn('/fake_src/out/Default/base_unittests.isolated.gen.json', | 366 self.assertIn('/fake_src/out/Default/base_unittests.isolated.gen.json', |
| 367 mbw.files) | 367 mbw.files) |
| 368 | 368 |
| 369 def test_gn_isolate(self): | 369 def test_gn_isolate(self): |
| 370 files = { | 370 files = { |
| 371 '/fake_src/out/Default/toolchain.ninja': "", |
| 371 '/fake_src/testing/buildbot/gn_isolate_map.pyl': ( | 372 '/fake_src/testing/buildbot/gn_isolate_map.pyl': ( |
| 372 "{'base_unittests': {" | 373 "{'base_unittests': {" |
| 373 " 'label': '//base:base_unittests'," | 374 " 'label': '//base:base_unittests'," |
| 374 " 'type': 'raw'," | 375 " 'type': 'raw'," |
| 375 " 'args': []," | 376 " 'args': []," |
| 376 "}}\n" | 377 "}}\n" |
| 377 ), | 378 ), |
| 378 '/fake_src/out/Default/base_unittests.runtime_deps': ( | 379 '/fake_src/out/Default/base_unittests.runtime_deps': ( |
| 379 "base_unittests\n" | 380 "base_unittests\n" |
| 380 ), | 381 ), |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 self.check(['validate'], mbw=mbw, ret=0) | 469 self.check(['validate'], mbw=mbw, ret=0) |
| 469 | 470 |
| 470 def test_bad_validate(self): | 471 def test_bad_validate(self): |
| 471 mbw = self.fake_mbw() | 472 mbw = self.fake_mbw() |
| 472 mbw.files[mbw.default_config] = TEST_BAD_CONFIG | 473 mbw.files[mbw.default_config] = TEST_BAD_CONFIG |
| 473 self.check(['validate'], mbw=mbw, ret=1) | 474 self.check(['validate'], mbw=mbw, ret=1) |
| 474 | 475 |
| 475 | 476 |
| 476 if __name__ == '__main__': | 477 if __name__ == '__main__': |
| 477 unittest.main() | 478 unittest.main() |
| OLD | NEW |