OLD | NEW |
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # This file is meant to be included into an target to create a unittest that | 5 # This file is meant to be included into an target to create a unittest that |
6 # invokes a set of no-compile tests. A no-compile test is a test that asserts | 6 # invokes a set of no-compile tests. A no-compile test is a test that asserts |
7 # a particular construct will not compile. | 7 # a particular construct will not compile. |
8 # | 8 # |
9 # Also see: | 9 # Also see: |
10 # http://dev.chromium.org/developers/testing/no-compile-tests | 10 # http://dev.chromium.org/developers/testing/no-compile-tests |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 # compiler and generates a .cc file that is empty on success, or will have a | 52 # compiler and generates a .cc file that is empty on success, or will have a |
53 # series of #error lines on failure, and a set of trivially passing gunit | 53 # series of #error lines on failure, and a set of trivially passing gunit |
54 # TEST() functions on success. This allows us to fail at the compile step when | 54 # TEST() functions on success. This allows us to fail at the compile step when |
55 # something goes wrong, and know during the unittest run that the test was at | 55 # something goes wrong, and know during the unittest run that the test was at |
56 # least processed when things go right. | 56 # least processed when things go right. |
57 | 57 |
58 import("//testing/test.gni") | 58 import("//testing/test.gni") |
59 | 59 |
60 declare_args() { | 60 declare_args() { |
61 # TODO(crbug.com/105388): make sure no-compile test is not flaky. | 61 # TODO(crbug.com/105388): make sure no-compile test is not flaky. |
62 enable_nocompile_tests = is_linux && is_clang && host_cpu == target_cpu | 62 # TODO(crbug.com/695991): reenable if |
| 63 # is_linux && is_clang && host_cpu == target_cpu |
| 64 enable_nocompile_tests = false |
63 } | 65 } |
64 | 66 |
65 if (enable_nocompile_tests) { | 67 if (enable_nocompile_tests) { |
66 import("//build/config/sysroot.gni") | 68 import("//build/config/sysroot.gni") |
67 template("nocompile_test") { | 69 template("nocompile_test") { |
68 nocompile_target = target_name + "_run_nocompile" | 70 nocompile_target = target_name + "_run_nocompile" |
69 | 71 |
70 action_foreach(nocompile_target) { | 72 action_foreach(nocompile_target) { |
71 script = "//tools/nocompile_driver.py" | 73 script = "//tools/nocompile_driver.py" |
72 sources = invoker.sources | 74 sources = invoker.sources |
(...skipping 15 matching lines...) Expand all Loading... |
88 rebase_path(result_path, root_build_dir), | 90 rebase_path(result_path, root_build_dir), |
89 ] | 91 ] |
90 } | 92 } |
91 | 93 |
92 test(target_name) { | 94 test(target_name) { |
93 deps = invoker.deps + [ ":$nocompile_target" ] | 95 deps = invoker.deps + [ ":$nocompile_target" ] |
94 sources = get_target_outputs(":$nocompile_target") | 96 sources = get_target_outputs(":$nocompile_target") |
95 } | 97 } |
96 } | 98 } |
97 } | 99 } |
OLD | NEW |