1 #!/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 """ 8 Make sure that the (custom) NoImportLibrary flag is handled correctly. 9 """ 10 11 import TestGyp 12 13 import os 14 import sys 15 16 if 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() 31