• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python
2
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
5# found in the LICENSE file.
6
7"""
8Make sure macro expansion of $(TargetName) and $(TargetDir) are handled.
9"""
10
11import TestGyp
12
13import sys
14
15if sys.platform == 'win32':
16  test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
17
18  CHDIR = 'vs-macros'
19  test.run_gyp('targetname.gyp', chdir=CHDIR)
20  test.build('targetname.gyp', test.ALL, chdir=CHDIR)
21  test.built_file_must_exist('test_targetname_plus_something1.exe',
22          chdir=CHDIR)
23  test.built_file_must_exist(
24          'prod_prefixtest_targetname_with_prefix_plus_something2.exe',
25          chdir=CHDIR)
26  test.built_file_must_exist('prod_name_plus_something3.exe', chdir=CHDIR)
27  test.built_file_must_exist('prod_prefixprod_name_plus_something4.exe',
28          chdir=CHDIR)
29  test.pass_test()
30