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 """ 8 Make sure disable specific warnings is extracted properly. 9 """ 10 11 import TestGyp 12 13 import sys 14 15 if sys.platform == 'win32': 16 test = TestGyp.TestGyp(formats=['msvs', 'ninja']) 17 18 CHDIR = 'compiler-flags' 19 test.run_gyp('disable-specific-warnings.gyp', chdir=CHDIR) 20 21 # The source file contains a warning, so if WarnAsError is true and 22 # DisableSpecificWarnings for the warning in question is set, then the build 23 # should succeed, otherwise it must fail. 24 25 test.build('disable-specific-warnings.gyp', 26 'test_disable_specific_warnings_set', 27 chdir=CHDIR) 28 test.build('disable-specific-warnings.gyp', 29 'test_disable_specific_warnings_unset', 30 chdir=CHDIR, status=1) 31 32 test.pass_test() 33