1#!/usr/bin/env python 2 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 5# found in the LICENSE file. 6 7""" 8Verifies that list xcode_settings are flattened before being exported to the 9environment. 10""" 11 12import TestGyp 13 14import sys 15 16if sys.platform == 'darwin': 17 print "This test is currently disabled: https://crbug.com/483696." 18 sys.exit(0) 19 20 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) 21 22 CHDIR = 'non-strs-flattened-to-env' 23 INFO_PLIST_PATH = 'Test.app/Contents/Info.plist' 24 25 test.run_gyp('test.gyp', chdir=CHDIR) 26 test.build('test.gyp', test.ALL, chdir=CHDIR) 27 info_plist = test.built_file_path(INFO_PLIST_PATH, chdir=CHDIR) 28 test.must_exist(info_plist) 29 test.must_contain(info_plist, '''\ 30\t<key>My Variable</key> 31\t<string>some expansion</string>''') 32 test.must_contain(info_plist, '''\ 33\t<key>CFlags</key> 34\t<string>-fstack-protector-all -fno-strict-aliasing -DS="A Space"</string>''') 35 36 test.pass_test() 37