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

Side by Side Diff: test/win/gyptest-link-ltcg.py

Issue 1400993002: ninja win: Suppress noisy messages from link.exe when LTCG is enabled (Closed) Base URL: https://chromium.googlesource.com/external/gyp@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « pylib/gyp/win_tool.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2013 Google Inc. All rights reserved. 3 # Copyright (c) 2013 Google Inc. 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 """ 7 """
8 Make sure LTCG is working properly. 8 Make sure LTCG is working properly.
9 """ 9 """
10 10
11 import TestGyp 11 import TestGyp
12 12
13 import sys 13 import sys
14 14
15 if sys.platform == 'win32': 15 if sys.platform == 'win32':
16 test = TestGyp.TestGyp(formats=['msvs', 'ninja']) 16 test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
17 17
18 CHDIR = 'linker-flags' 18 CHDIR = 'linker-flags'
19 test.run_gyp('ltcg.gyp', chdir=CHDIR) 19 test.run_gyp('ltcg.gyp', chdir=CHDIR)
20 20
21 # Here we expect LTCG is able to inline functions beyond compile unit. 21 # Here we expect LTCG is able to inline functions beyond compile unit.
22 # Note: This marker is embedded in 'inline_test_main.cc' 22 # Note: This marker is embedded in 'inline_test_main.cc'
23 INLINE_MARKER = '==== inlined ====' 23 INLINE_MARKER = '==== inlined ===='
24 24
25 # link.exe generates following lines when LTCG is enabled.
26 # Note: Future link.exe may or may not generate them. Update as needed.
27 LTCG_LINKER_MESSAGES = ['Generating code', 'Finished generating code']
28
25 # test 'LinkTimeCodeGenerationOptionDefault' 29 # test 'LinkTimeCodeGenerationOptionDefault'
26 test.build('ltcg.gyp', 'test_ltcg_off', chdir=CHDIR) 30 test.build('ltcg.gyp', 'test_ltcg_off', chdir=CHDIR)
27 test.run_built_executable('test_ltcg_off', chdir=CHDIR) 31 test.run_built_executable('test_ltcg_off', chdir=CHDIR)
28 test.must_not_contain_any_line(test.stdout(), [INLINE_MARKER]) 32 test.must_not_contain_any_line(test.stdout(), [INLINE_MARKER])
29 33
30 # test 'LinkTimeCodeGenerationOptionUse' 34 # test 'LinkTimeCodeGenerationOptionUse'
31 test.build('ltcg.gyp', 'test_ltcg_on', chdir=CHDIR) 35 test.build('ltcg.gyp', 'test_ltcg_on', chdir=CHDIR)
32 test.must_contain_any_line(test.stdout(), ['Generating code']) 36 if test.format == 'ninja':
37 # Make sure ninja win_tool.py filters out noisy lines.
38 test.must_not_contain_any_line(test.stdout(), LTCG_LINKER_MESSAGES)
39 elif test.format == 'msvs':
40 test.must_contain_any_line(test.stdout(), LTCG_LINKER_MESSAGES)
33 test.run_built_executable('test_ltcg_on', chdir=CHDIR) 41 test.run_built_executable('test_ltcg_on', chdir=CHDIR)
34 test.must_contain_any_line(test.stdout(), [INLINE_MARKER]) 42 test.must_contain_any_line(test.stdout(), [INLINE_MARKER])
35 43
36 test.pass_test() 44 test.pass_test()
OLDNEW
« no previous file with comments | « pylib/gyp/win_tool.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698