~hjd/ubuntu/wily/gyp/debian-merged

« back to all changes in this revision

Viewing changes to test/compiler-override/gyptest-compiler-global-settings.py

  • Committer: Hans Joachim Desserud
  • Date: 2015-10-31 12:46:59 UTC
  • mfrom: (6.2.6 sid)
  • Revision ID: hans_joachim_desserud-20151031124659-lzxekr6woskh4k0b
Merge latest Debian version

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
test.build(gypfile)
44
44
test.must_contain_all_lines(test.stdout(), ['my_cc.py', 'my_cxx.py', 'FOO'])
45
45
 
 
46
# The xcode generator chokes on the 'host' toolset. Skip the rest of
 
47
# this test (cf. https://code.google.com/p/gyp/issues/detail?id=454).
 
48
if test.format == 'xcode-ninja':
 
49
  test.pass_test()
 
50
 
46
51
# Same again but with the host toolset.
47
52
replacements['TOOLSET'] = 'host'
48
53
s = Template(open(gypfile + '.in').read())
59
64
test.build(gypfile)
60
65
test.must_contain_all_lines(test.stdout(), ['my_cc.py', 'my_cxx.py', 'BAR'])
61
66
 
 
67
# Check that CC_host overrides make_global_settings
 
68
old_env = dict(os.environ)
 
69
os.environ['CC_host'] = '%s %s/my_cc.py SECRET' % (replacements['PYTHON'],
 
70
                                                   replacements['PWD'])
 
71
test.run_gyp(gypfile)
 
72
os.environ.clear()
 
73
os.environ.update(old_env)
 
74
 
 
75
test.build(gypfile)
 
76
test.must_contain_all_lines(test.stdout(), ['SECRET', 'my_cxx.py', 'BAR'])
 
77
 
62
78
test.pass_test()