OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2014 Google Inc. All rights reserved. | 2 # Copyright (c) 2014 Google Inc. 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 analyzer | 6 """Tests for analyzer |
7 """ | 7 """ |
8 | 8 |
9 import json | 9 import json |
10 import TestGyp | 10 import TestGyp |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 _CreateConfigFile(['f.c'], ['a']) | 298 _CreateConfigFile(['f.c'], ['a']) |
299 run_analyzer3() | 299 run_analyzer3() |
300 EnsureContains(matched=True, targets={'a'}, build_targets={'a', 'b'}) | 300 EnsureContains(matched=True, targets={'a'}, build_targets={'a', 'b'}) |
301 | 301 |
302 _CreateConfigFile(['f.c'], []) | 302 _CreateConfigFile(['f.c'], []) |
303 run_analyzer3() | 303 run_analyzer3() |
304 EnsureContains(matched=True, build_targets={'a', 'b'}) | 304 EnsureContains(matched=True, build_targets={'a', 'b'}) |
305 | 305 |
306 _CreateConfigFile(['c.c', 'e.c'], []) | 306 _CreateConfigFile(['c.c', 'e.c'], []) |
307 run_analyzer3() | 307 run_analyzer3() |
308 EnsureContains(matched=True, build_targets={'a', 'b'}) | 308 EnsureContains(matched=True, build_targets={'a', 'b', 'c', 'e'}) |
309 | 309 |
310 _CreateConfigFile(['d.c'], ['a']) | 310 _CreateConfigFile(['d.c'], ['a']) |
311 run_analyzer3() | 311 run_analyzer3() |
312 EnsureContains(matched=True, targets={'a'}, build_targets={'a', 'b'}) | 312 EnsureContains(matched=True, targets={'a'}, build_targets={'a', 'b'}) |
313 | 313 |
314 _CreateConfigFile(['a.c'], ['a', 'b']) | 314 _CreateConfigFile(['a.c'], ['a', 'b']) |
315 run_analyzer3() | 315 run_analyzer3() |
316 EnsureContains(matched=True, targets={'a'}, build_targets={'a'}) | 316 EnsureContains(matched=True, targets={'a'}, build_targets={'a'}) |
317 | 317 |
318 _CreateConfigFile(['a.c'], ['a', 'b']) | 318 _CreateConfigFile(['a.c'], ['a', 'b']) |
(...skipping 16 matching lines...) Expand all Loading... |
335 run_analyzer3() | 335 run_analyzer3() |
336 EnsureContains(matched=True, build_targets={'a'}) | 336 EnsureContains(matched=True, build_targets={'a'}) |
337 | 337 |
338 _CreateConfigFile(['d.c'], []) | 338 _CreateConfigFile(['d.c'], []) |
339 run_analyzer3() | 339 run_analyzer3() |
340 EnsureContains(matched=True, build_targets={'a', 'b'}) | 340 EnsureContains(matched=True, build_targets={'a', 'b'}) |
341 | 341 |
342 # Assertions around test4.gyp. | 342 # Assertions around test4.gyp. |
343 _CreateConfigFile(['f.c'], []) | 343 _CreateConfigFile(['f.c'], []) |
344 run_analyzer4() | 344 run_analyzer4() |
345 EnsureContains(matched=True, build_targets={'e'}) | 345 EnsureContains(matched=True, build_targets={'e', 'f'}) |
346 | 346 |
347 _CreateConfigFile(['d.c'], []) | 347 _CreateConfigFile(['d.c'], []) |
348 run_analyzer4() | 348 run_analyzer4() |
349 EnsureContains(matched=True, build_targets={'a'}) | 349 EnsureContains(matched=True, build_targets={'a', 'b', 'c', 'd'}) |
350 | 350 |
351 _CreateConfigFile(['i.c'], []) | 351 _CreateConfigFile(['i.c'], []) |
352 run_analyzer4() | 352 run_analyzer4() |
353 EnsureContains(matched=True, build_targets={'h'}) | 353 EnsureContains(matched=True, build_targets={'h'}) |
354 | 354 |
355 test.pass_test() | 355 test.pass_test() |
OLD | NEW |