blob: d12e0ad3ed324607bdc2929dc9cfe0bc45f501ee [file] [log] [blame]
Ben Murdoch097c5b22016-05-18 11:27:45 +01001#!/usr/bin/env python
2
3# Copyright (c) 2015 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 that the (custom) NoImportLibrary flag is handled correctly.
9"""
10
11import TestGyp
12
13import os
14import sys
15
16if sys.platform == 'win32':
17 test = TestGyp.TestGyp(formats=['ninja'])
18
19 CHDIR = 'importlib'
20 test.run_gyp('noimplib.gyp', chdir=CHDIR)
21 test.build('noimplib.gyp', test.ALL, chdir=CHDIR)
22
23 # The target has an entry point, but no exports. Ordinarily, ninja expects
24 # all DLLs to export some symbols (with the exception of /NOENTRY resource-
25 # only DLLs). When the NoImportLibrary flag is set, this is suppressed. If
26 # this is not working correctly, the expected .lib will never be generated
27 # but will be expected, so the build will not be up to date.
28 test.up_to_date('noimplib.gyp', test.ALL, chdir=CHDIR)
29
30 test.pass_test()