1#!/usr/bin/env python
2
3# Copyright (c) 2016 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 Windows drivers are built correctly.
9"""
10
11import TestGyp
12import TestCmd
13
14import sys
15
16if sys.platform == 'win32':
17  test = TestGyp.TestGyp(formats=['msvs'])
18
19  CHDIR = 'win-driver-target-type'
20  test.run_gyp('win-driver-target-type.gyp', chdir=CHDIR)
21  maybe_missing = r'[\s\S]+?(WindowsKernelModeDriver|Build succeeded.)[\s\S]+?'
22  test.build('win-driver-target-type.gyp', 'win_driver_target_type',
23             chdir=CHDIR, stdout=maybe_missing,
24             status=[0, 1], match=TestCmd.match_re_dotall)
25
26
27  test.pass_test()
28