Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """Tests for chromium.ycm_extra_conf. | 7 """Tests for chromium.ycm_extra_conf. |
| 8 | 8 |
| 9 These tests should be getting picked up by the PRESUBMIT.py in /tools/vim. | 9 These tests should be getting picked up by the PRESUBMIT.py in /tools/vim. |
| 10 Currently the tests only run on Linux and require 'ninja' to be available on | 10 Currently the tests only run on Linux and require 'ninja' to be available on |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 | | DEPS | 67 | | DEPS |
| 68 | | three.cc | 68 | | three.cc |
| 69 | | | 69 | | |
| 70 | +-- .git | 70 | +-- .git |
| 71 | | 71 | |
| 72 +-- out | 72 +-- out |
| 73 | | 73 | |
| 74 +-- gn | 74 +-- gn |
| 75 build.ninja | 75 build.ninja |
| 76 """ | 76 """ |
| 77 self.chrome_root = os.path.abspath(os.path.normpath( | 77 self.chrome_root = os.path.abspath(os.path.realpath( |
|
asanka
2016/09/01 18:20:58
Why is this necessary on Mac?
Sidney San Martín
2016/09/01 22:18:04
The temp directories on Mac are symlinks (/tmp ->
| |
| 78 os.path.join(self.test_root, 'src'))) | 78 os.path.join(self.test_root, 'src'))) |
| 79 self.out_dir = os.path.join(self.chrome_root, 'out', 'gn') | 79 self.out_dir = os.path.join(self.chrome_root, 'out', 'gn') |
| 80 | 80 |
| 81 os.makedirs(self.chrome_root) | 81 os.makedirs(self.chrome_root) |
| 82 os.makedirs(os.path.join(self.chrome_root, '.git')) | 82 os.makedirs(os.path.join(self.chrome_root, '.git')) |
| 83 os.makedirs(self.out_dir) | 83 os.makedirs(self.out_dir) |
| 84 | 84 |
| 85 CreateFile(os.path.join(self.test_root, '.gclient')) | 85 CreateFile(os.path.join(self.test_root, '.gclient')) |
| 86 CreateFile(os.path.join(self.chrome_root, 'DEPS')) | 86 CreateFile(os.path.join(self.chrome_root, 'DEPS')) |
| 87 CreateFile(os.path.join(self.chrome_root, 'three.cc')) | 87 CreateFile(os.path.join(self.chrome_root, 'three.cc')) |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 385 '-Wno-unknown-warning-option', | 385 '-Wno-unknown-warning-option', |
| 386 '-I[OUT]/a', | 386 '-I[OUT]/a', |
| 387 '--sysroot=[SRC]/build/sysroot-image', | 387 '--sysroot=[SRC]/build/sysroot-image', |
| 388 ]) | 388 ]) |
| 389 | 389 |
| 390 if __name__ == '__main__': | 390 if __name__ == '__main__': |
| 391 if not os.path.isfile('chromium.ycm_extra_conf.py'): | 391 if not os.path.isfile('chromium.ycm_extra_conf.py'): |
| 392 print('The test must be run from src/tools/vim/ directory') | 392 print('The test must be run from src/tools/vim/ directory') |
| 393 sys.exit(1) | 393 sys.exit(1) |
| 394 unittest.main() | 394 unittest.main() |
| OLD | NEW |