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 mac_framework_headers works properly. 9""" 10 11import TestGyp 12 13import sys 14 15if sys.platform == 'darwin': 16 # TODO(thakis): Make this work with ninja, make. http://crbug.com/129013 17 test = TestGyp.TestGyp(formats=['xcode']) 18 19 CHDIR = 'framework-headers' 20 test.run_gyp('test.gyp', chdir=CHDIR) 21 22 # Test that headers are installed for frameworks 23 test.build('test.gyp', 'test_framework_headers_framework', chdir=CHDIR) 24 25 test.built_file_must_exist( 26 'TestFramework.framework/Versions/A/TestFramework', chdir=CHDIR) 27 28 test.built_file_must_exist( 29 'TestFramework.framework/Versions/A/Headers/myframework.h', chdir=CHDIR) 30 31 # Test that headers are installed for static libraries. 32 test.build('test.gyp', 'test_framework_headers_static', chdir=CHDIR) 33 34 test.built_file_must_exist('libTestLibrary.a', chdir=CHDIR) 35 36 test.built_file_must_exist('include/myframework.h', chdir=CHDIR) 37 38 test.pass_test() 39