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

Side by Side Diff: test/make_global_settings/full-toolchain/gyptest-make_global_settings.py

Issue 164023009: Support for custom NM/readelf binaries in your toolchain. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 6 years, 3 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
(Empty)
1 #!/usr/bin/env python
2
3 # Copyright (c) 2014 Google Inc. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 """
8 Verifies make_global_settings works with the full toolchain.
9 """
10
11 import os
12 import sys
13 import TestGyp
14
15 if sys.platform == 'win32':
16 # cross compiling not supported by ninja on windows
17 # and make not supported on windows at all.
18 sys.exit(0)
19
20 test = TestGyp.TestGyp(formats=['ninja'])
21 # Must set the test format to something with a flavor (the part after the '-')
22 # in order to test the desired behavior. Since we want to run a non-host
23 # toolchain, we have to set the flavor to something that the ninja generator
24 # doesn't know about, so it doesn't default to the host-specific tools (e.g.,
25 # 'otool' on mac to generate the .TOC).
26 #
27 # Note that we can't just pass format=['ninja-some_toolchain'] to the
28 # constructor above, because then this test wouldn't be recognized as a ninja
29 # format test.
30 test.formats = ['ninja-some_flavor']
31
32 gyp_file = 'make_global_settings.gyp'
33
34 test.run_gyp(gyp_file,
35 # Teach the .gyp file about the location of my_nm.py and
36 # my_readelf.py, and the python executable.
37 '-Dworkdir=%s' % test.workdir,
38 '-Dpython=%s' % sys.executable)
39 test.build(gyp_file, arguments=['-v'])
40
41 expected = ['MY_CC', 'MY_CXX']
42 test.must_contain_all_lines(test.stdout(), expected)
43
44 test.must_contain(test.built_file_path('RAN_MY_NM'), 'RAN_MY_NM')
45 test.must_contain(test.built_file_path('RAN_MY_READELF'), 'RAN_MY_READELF')
46
47 test.pass_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698