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

Unified Diff: test/analyzer/gyptest-analyzer.py

Issue 671233004: Moves warning about invalid targets into 'invalid_targets' in result (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pylib/gyp/generator/analyzer.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/analyzer/gyptest-analyzer.py
===================================================================
--- test/analyzer/gyptest-analyzer.py (revision 1993)
+++ test/analyzer/gyptest-analyzer.py (working copy)
@@ -76,8 +76,8 @@
print 'unexpected error', result.get('error')
test.fail_test()
- if result.get('warning', None):
- print 'unexpected warning', result.get('warning')
+ if result.get('invalid_targets', None):
+ print 'unexpected invalid_targets', result.get('invalid_targets')
test.fail_test()
actual_targets = set(result['targets'])
@@ -105,8 +105,8 @@
print 'unexpected error', result.get('error')
test.fail_test()
- if result.get('warning', None):
- print 'unexpected warning', result.get('warning')
+ if result.get('invalid_targets', None):
+ print 'unexpected invalid_targets', result.get('invalid_targets')
test.fail_test()
if result['status'] != found_all:
@@ -135,12 +135,13 @@
test.fail_test()
-def EnsureWarning(expected_warning_string):
- """Verifies output contains the warning string."""
+def EnsureInvalidTargets(expected_invalid_targets):
+ """Verifies output contains invalid_targets."""
result = _ReadOutputFileContents()
- if result.get('warning', '').find(expected_warning_string) == -1:
- print 'actual warning:', result.get('warning', ''), \
- '\nexpected warning:', expected_warning_string
+ actual_invalid_targets = set(result['invalid_targets'])
+ if actual_invalid_targets != expected_invalid_targets:
+ print 'actual invalid_targets:', actual_invalid_targets, \
+ '\nexpected :', expected_invalid_targets
test.fail_test()
# Verifies config_path must be specified.
@@ -152,10 +153,10 @@
'-Ganalyzer_output_path=analyzer_output')
EnsureError('Unable to open file bogus_file')
-# Verify get warning when bad target is specified.
+# Verify 'invalid_targets' is present when bad target is specified.
_CreateConfigFile(['exe2.c'], ['bad_target'])
run_analyzer()
-EnsureWarning('Unable to find all targets')
+EnsureInvalidTargets({'bad_target'})
# Verifies config_path must point to a valid json file.
_CreateBogusConfigFile()
« no previous file with comments | « pylib/gyp/generator/analyzer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698