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

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

Issue 233713003: Change cxxflags test to build in same env as gyp (+ test make instead of ninja) (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@cm
Patch Set: Switch to make only Created 6 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
« no previous file with comments | « no previous file | 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) 2012 Google Inc. All rights reserved. 3 # Copyright (c) 2012 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 Verifies the use of the environment during regeneration when the gyp file 8 Verifies the use of the environment during regeneration when the gyp file
9 changes, specifically via build of an executable with C++ flags specified by 9 changes, specifically via build of an executable with C++ flags specified by
10 CXXFLAGS. 10 CXXFLAGS.
11 11
12 In this test, gyp happens within a local environment, but build outside of it. 12 In this test, gyp and build both run in same local environment.
13 (Build with different environment has different results for some build
14 systems and platforms.)
13 """ 15 """
14 16
15 import TestGyp 17 import TestGyp
16 18
17 FORMATS = ('ninja',) 19 # ninja fails on Windows; contrast with cflags test
20 FORMATS = ('make',)
18 21
19 test = TestGyp.TestGyp(formats=FORMATS) 22 test = TestGyp.TestGyp(formats=FORMATS)
20 23
21 # We reset the environ after calling gyp. When the auto-regeneration happens,
22 # the same define should be reused anyway.
23 with TestGyp.LocalEnv({'CXXFLAGS': '-O0'}): 24 with TestGyp.LocalEnv({'CXXFLAGS': '-O0'}):
24 test.run_gyp('cxxflags.gyp') 25 test.run_gyp('cxxflags.gyp')
25 26 test.build('cxxflags.gyp')
26 test.build('cxxflags.gyp')
27 27
28 expect = """\ 28 expect = """\
29 Using no optimization flag 29 Using no optimization flag
30 """ 30 """
31 test.run_built_executable('cxxflags', stdout=expect) 31 test.run_built_executable('cxxflags', stdout=expect)
32 32
33 test.sleep() 33 test.sleep()
34 34
35 with TestGyp.LocalEnv({'CXXFLAGS': '-O2'}): 35 with TestGyp.LocalEnv({'CXXFLAGS': '-O2'}):
36 test.run_gyp('cxxflags.gyp') 36 test.run_gyp('cxxflags.gyp')
37 37 test.build('cxxflags.gyp')
38 test.build('cxxflags.gyp')
39 38
40 expect = """\ 39 expect = """\
41 Using an optimization flag 40 Using an optimization flag
42 """ 41 """
43 test.run_built_executable('cxxflags', stdout=expect) 42 test.run_built_executable('cxxflags', stdout=expect)
44 43
45 test.pass_test() 44 test.pass_test()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698