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

Side by Side Diff: test/analyzer/gyptest-analyzer.py

Issue 1088163002: Analyzer didn't match correctly targets that defined path to inputs with '.' (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
OLDNEW
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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 # Verifies paths with // are fixed up correctly. 221 # Verifies paths with // are fixed up correctly.
222 _CreateConfigFile(['parent_source.c'], []) 222 _CreateConfigFile(['parent_source.c'], [])
223 run_analyzer() 223 run_analyzer()
224 EnsureContains(matched=True, build_targets={'exe', 'exe3'}) 224 EnsureContains(matched=True, build_targets={'exe', 'exe3'})
225 225
226 # Verifies relative paths are resolved correctly. 226 # Verifies relative paths are resolved correctly.
227 _CreateConfigFile(['subdir/subdir_source.h'], []) 227 _CreateConfigFile(['subdir/subdir_source.h'], [])
228 run_analyzer() 228 run_analyzer()
229 EnsureContains(matched=True, build_targets={'exe'}) 229 EnsureContains(matched=True, build_targets={'exe'})
230 230
231 # Verifies relative paths in inputs are resolved correctly.
232 _CreateConfigFile(['rel_path1.h'], [])
233 run_analyzer()
234 EnsureContains(matched=True, build_targets={'exe'})
235
231 # Various permutations when passing in targets. 236 # Various permutations when passing in targets.
232 _CreateConfigFile(['exe2.c', 'subdir/subdir2b_source.c'], ['exe', 'exe3']) 237 _CreateConfigFile(['exe2.c', 'subdir/subdir2b_source.c'], ['exe', 'exe3'])
233 run_analyzer() 238 run_analyzer()
234 EnsureContains(matched=True, targets={'exe3'}, build_targets={'exe2', 'exe3'}) 239 EnsureContains(matched=True, targets={'exe3'}, build_targets={'exe2', 'exe3'})
235 240
236 _CreateConfigFile(['exe2.c', 'subdir/subdir2b_source.c'], ['exe']) 241 _CreateConfigFile(['exe2.c', 'subdir/subdir2b_source.c'], ['exe'])
237 run_analyzer() 242 run_analyzer()
238 EnsureContains(matched=True, build_targets={'exe2', 'exe3'}) 243 EnsureContains(matched=True, build_targets={'exe2', 'exe3'})
239 244
240 # Verifies duplicates are ignored. 245 # Verifies duplicates are ignored.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 352
348 _CreateConfigFile(['d.c'], []) 353 _CreateConfigFile(['d.c'], [])
349 run_analyzer4() 354 run_analyzer4()
350 EnsureContains(matched=True, build_targets={'a', 'b', 'c', 'd'}) 355 EnsureContains(matched=True, build_targets={'a', 'b', 'c', 'd'})
351 356
352 _CreateConfigFile(['i.c'], []) 357 _CreateConfigFile(['i.c'], [])
353 run_analyzer4() 358 run_analyzer4()
354 EnsureContains(matched=True, build_targets={'h'}) 359 EnsureContains(matched=True, build_targets={'h'})
355 360
356 test.pass_test() 361 test.pass_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698