blob: d4ef1b362b50438017fb95c97b33d3b428c68a1f [file] [log] [blame]
Ben Murdoch097c5b22016-05-18 11:27:45 +01001#!/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 warning-as-error is 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('warning-as-error.gyp', chdir=CHDIR)
20
21 # The source file contains a warning, so if WarnAsError is false (or
22 # default, which is also false), then the build should succeed, otherwise it
23 # must fail.
24
25 test.build('warning-as-error.gyp', 'test_warn_as_error_false', chdir=CHDIR)
26 test.build('warning-as-error.gyp', 'test_warn_as_error_unset', chdir=CHDIR)
27 test.build('warning-as-error.gyp', 'test_warn_as_error_true', chdir=CHDIR,
28 status=1)
29
30 test.pass_test()