1342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch#!/usr/bin/env python 2342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch 3342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch# Copyright (c) 2012 Google Inc. All rights reserved. 4342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch# Use of this source code is governed by a BSD-style license that can be 5342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch# found in the LICENSE file. 6342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch 7342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch""" 8342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen MurdochMake sure macro expansion of $(ProjectName) is handled. 9342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch""" 10342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch 11342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdochimport TestGyp 12342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch 13342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdochimport sys 14342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch 15342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdochif sys.platform == 'win32': 16342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch test = TestGyp.TestGyp(formats=['msvs', 'ninja']) 17342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch 18342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch CHDIR = 'vs-macros' 19342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch test.run_gyp('projectname.gyp', chdir=CHDIR) 20342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch test.build('projectname.gyp', test.ALL, chdir=CHDIR) 21342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch test.built_file_must_exist('test_expansions_plus_something.exe', chdir=CHDIR) 22342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch test.built_file_must_exist( 23342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch 'test_with_product_name_plus_something.exe', chdir=CHDIR) 24342c50ce1624b485728b9a4fc41d8bbf37eb46cfBen Murdoch test.pass_test() 25