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 optimization settings are extracted properly. | 8 Make sure optimization settings are extracted properly. |
9 """ | 9 """ |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 ninja_file = test.built_file_path('obj/test_opt_lev_speed.ninja', chdir=CHDIR) | 31 ninja_file = test.built_file_path('obj/test_opt_lev_speed.ninja', chdir=CHDIR) |
32 test.must_contain(ninja_file, 'cflags = /O2') | 32 test.must_contain(ninja_file, 'cflags = /O2') |
33 | 33 |
34 ninja_file = test.built_file_path('obj/test_opt_lev_max.ninja', chdir=CHDIR) | 34 ninja_file = test.built_file_path('obj/test_opt_lev_max.ninja', chdir=CHDIR) |
35 test.must_contain(ninja_file, 'cflags = /Ox') | 35 test.must_contain(ninja_file, 'cflags = /Ox') |
36 | 36 |
37 ninja_file = test.built_file_path('obj/test_opt_unset.ninja', chdir=CHDIR) | 37 ninja_file = test.built_file_path('obj/test_opt_unset.ninja', chdir=CHDIR) |
38 test.must_not_contain(ninja_file, '/Od') | 38 test.must_not_contain(ninja_file, '/Od') |
39 test.must_not_contain(ninja_file, '/O1') | 39 test.must_not_contain(ninja_file, '/O1') |
40 test.must_not_contain(ninja_file, '/O2') | |
41 test.must_not_contain(ninja_file, '/Ox') | 40 test.must_not_contain(ninja_file, '/Ox') |
| 41 # Set by default if none specified. |
| 42 test.must_contain(ninja_file, '/O2') |
42 | 43 |
43 ninja_file = test.built_file_path('obj/test_opt_fpo.ninja', chdir=CHDIR) | 44 ninja_file = test.built_file_path('obj/test_opt_fpo.ninja', chdir=CHDIR) |
44 test.must_contain(ninja_file, '/Oy') | 45 test.must_contain(ninja_file, '/Oy') |
45 test.must_not_contain(ninja_file, '/Oy-') | 46 test.must_not_contain(ninja_file, '/Oy-') |
46 | 47 |
47 ninja_file = test.built_file_path('obj/test_opt_fpo_off.ninja', chdir=CHDIR) | 48 ninja_file = test.built_file_path('obj/test_opt_fpo_off.ninja', chdir=CHDIR) |
48 test.must_contain(ninja_file, '/Oy-') | 49 test.must_contain(ninja_file, '/Oy-') |
49 | 50 |
50 ninja_file = test.built_file_path('obj/test_opt_intrinsic.ninja', | 51 ninja_file = test.built_file_path('obj/test_opt_intrinsic.ninja', |
51 chdir=CHDIR) | 52 chdir=CHDIR) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 96 |
96 ninja_file = test.built_file_path('obj/test_opt_fso.ninja', | 97 ninja_file = test.built_file_path('obj/test_opt_fso.ninja', |
97 chdir=CHDIR) | 98 chdir=CHDIR) |
98 test.must_contain(ninja_file, '/GT') | 99 test.must_contain(ninja_file, '/GT') |
99 | 100 |
100 ninja_file = test.built_file_path('obj/test_opt_fso_off.ninja', | 101 ninja_file = test.built_file_path('obj/test_opt_fso_off.ninja', |
101 chdir=CHDIR) | 102 chdir=CHDIR) |
102 test.must_not_contain(ninja_file, '/GT') | 103 test.must_not_contain(ninja_file, '/GT') |
103 | 104 |
104 test.pass_test() | 105 test.pass_test() |
OLD | NEW |