OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2013 Google Inc. All rights reserved. | 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 | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """ | 7 """ |
8 Make sure a relink is performed when a .def file is touched. | 8 Make sure a relink is performed when a .def file is touched. |
9 """ | 9 """ |
10 | 10 |
| 11 from __future__ import print_function |
| 12 |
11 import TestGyp | 13 import TestGyp |
12 | 14 |
13 import sys | 15 import sys |
14 | 16 |
15 if sys.platform == 'win32': | 17 if sys.platform == 'win32': |
16 print "This test is currently disabled: https://crbug.com/483696." | 18 print("This test is currently disabled: https://crbug.com/483696.") |
17 sys.exit(0) | 19 sys.exit(0) |
18 | 20 |
19 test = TestGyp.TestGyp(formats=['msvs', 'ninja']) | 21 test = TestGyp.TestGyp(formats=['msvs', 'ninja']) |
20 | 22 |
21 CHDIR = 'linker-flags' | 23 CHDIR = 'linker-flags' |
22 target = 'test_deffile_dll_ok' | 24 target = 'test_deffile_dll_ok' |
23 def_contents = test.read('linker-flags/deffile.def') | 25 def_contents = test.read('linker-flags/deffile.def') |
24 | 26 |
25 # This first build makes sure everything is up to date. | 27 # This first build makes sure everything is up to date. |
26 test.run_gyp('deffile.gyp', chdir=CHDIR) | 28 test.run_gyp('deffile.gyp', chdir=CHDIR) |
(...skipping 18 matching lines...) Expand all Loading... |
45 test.write('linker-flags/deffile.def', new_def_contents) | 47 test.write('linker-flags/deffile.def', new_def_contents) |
46 test.build('deffile.gyp', target, chdir=CHDIR) | 48 test.build('deffile.gyp', target, chdir=CHDIR) |
47 test.up_to_date('deffile.gyp', target, chdir=CHDIR) | 49 test.up_to_date('deffile.gyp', target, chdir=CHDIR) |
48 | 50 |
49 if not HasExport('test_deffile_dll_ok.dll', 'AnExportedFunction'): | 51 if not HasExport('test_deffile_dll_ok.dll', 'AnExportedFunction'): |
50 test.fail_test() | 52 test.fail_test() |
51 if not HasExport('test_deffile_dll_ok.dll', 'AnotherExportedFunction'): | 53 if not HasExport('test_deffile_dll_ok.dll', 'AnotherExportedFunction'): |
52 test.fail_test() | 54 test.fail_test() |
53 | 55 |
54 test.pass_test() | 56 test.pass_test() |
OLD | NEW |