OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2012 Google Inc. All rights reserved. | 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 | 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 we generate a manifest file when linking binaries, including | 8 Make sure we generate a manifest file when linking binaries, including |
9 handling AdditionalManifestFiles. | 9 handling AdditionalManifestFiles. |
10 """ | 10 """ |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 return None | 45 return None |
46 else: | 46 else: |
47 raise | 47 raise |
48 | 48 |
49 test = TestGyp.TestGyp(formats=['msvs', 'ninja']) | 49 test = TestGyp.TestGyp(formats=['msvs', 'ninja']) |
50 | 50 |
51 CHDIR = 'linker-flags' | 51 CHDIR = 'linker-flags' |
52 test.run_gyp('generate-manifest.gyp', chdir=CHDIR) | 52 test.run_gyp('generate-manifest.gyp', chdir=CHDIR) |
53 test.build('generate-manifest.gyp', test.ALL, chdir=CHDIR) | 53 test.build('generate-manifest.gyp', test.ALL, chdir=CHDIR) |
54 | 54 |
| 55 # Make sure that generation of .generated.manifest does not cause a relink. |
| 56 test.run_gyp('generate-manifest.gyp', chdir=CHDIR) |
| 57 test.up_to_date('generate-manifest.gyp', test.ALL, chdir=CHDIR) |
| 58 |
55 def test_manifest(filename, generate_manifest, embedded_manifest, | 59 def test_manifest(filename, generate_manifest, embedded_manifest, |
56 extra_manifest): | 60 extra_manifest): |
57 exe_file = test.built_file_path(filename, chdir=CHDIR) | 61 exe_file = test.built_file_path(filename, chdir=CHDIR) |
58 if not generate_manifest: | 62 if not generate_manifest: |
59 test.must_not_exist(exe_file + '.manifest') | 63 test.must_not_exist(exe_file + '.manifest') |
60 manifest = extract_manifest(exe_file, 1) | 64 manifest = extract_manifest(exe_file, 1) |
61 test.fail_test(manifest) | 65 test.fail_test(manifest) |
62 return | 66 return |
63 if embedded_manifest: | 67 if embedded_manifest: |
64 manifest = extract_manifest(exe_file, 1) | 68 manifest = extract_manifest(exe_file, 1) |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 extra_manifest=True) | 114 extra_manifest=True) |
111 test_manifest('test_generate_manifest_true_with_extra_manifest_list.exe', | 115 test_manifest('test_generate_manifest_true_with_extra_manifest_list.exe', |
112 generate_manifest=True, | 116 generate_manifest=True, |
113 embedded_manifest=False, | 117 embedded_manifest=False, |
114 extra_manifest=True) | 118 extra_manifest=True) |
115 test_manifest('test_generate_manifest_false_with_extra_manifest_list.exe', | 119 test_manifest('test_generate_manifest_false_with_extra_manifest_list.exe', |
116 generate_manifest=False, | 120 generate_manifest=False, |
117 embedded_manifest=False, | 121 embedded_manifest=False, |
118 extra_manifest=True) | 122 extra_manifest=True) |
119 test.pass_test() | 123 test.pass_test() |
OLD | NEW |