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""" 8Make sure additional manual compiler flags are extracted properly. 9""" 10 11import TestGyp 12 13import sys 14 15if sys.platform == 'win32': 16 test = TestGyp.TestGyp(formats=['msvs', 'ninja']) 17 18 CHDIR = 'compiler-flags' 19 test.run_gyp('additional-options.gyp', chdir=CHDIR) 20 21 # Warning level not overidden, must fail. 22 test.build('additional-options.gyp', 'test_additional_none', chdir=CHDIR, 23 status=1) 24 25 # Warning level is overridden, must succeed. 26 test.build('additional-options.gyp', 'test_additional_one', chdir=CHDIR) 27 28 test.pass_test() 29