OLD | NEW |
1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2006-2008 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 __doc__ = """ | 5 __doc__ = """ |
6 Configuration for building base_unittests{,.exe}. | 6 Configuration for building base_unittests{,.exe}. |
7 """ | 7 """ |
8 | 8 |
9 Import('env') | 9 Import('env') |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 ) | 34 ) |
35 | 35 |
36 if env.Bit('linux'): | 36 if env.Bit('linux'): |
37 env.Append( | 37 env.Append( |
38 # We need 'Xss' (X Screen Saver) in LIBS if we want idletimer_unittest | 38 # We need 'Xss' (X Screen Saver) in LIBS if we want idletimer_unittest |
39 LIBS = [ | 39 LIBS = [ |
40 'event', | 40 'event', |
41 ], | 41 ], |
42 ) | 42 ) |
43 | 43 |
44 # These test files work on *all* platforms; tests that don't work | 44 input_files = ChromeFileList([ |
45 # cross-platform live below. | 45 # TODO(sgk): |
46 input_files = [ | 46 # We're deliberately mis-indenting the MSVSFilter() calls here |
| 47 # so we don't have to re-indent the file name entries when the |
| 48 # MSVSFilter() calls go away in (favor of automated generation |
| 49 # of the heirarchy). |
| 50 MSVSFilter('support', [ |
| 51 'multiprocess_test.h', |
| 52 'no_windows2000_unittest.h', |
| 53 'run_all_unittests.cc', |
| 54 'test_suite.h', |
| 55 ]), |
| 56 |
| 57 MSVSFilter('base_tests', [ |
47 'at_exit_unittest.cc', | 58 'at_exit_unittest.cc', |
48 'atomicops_unittest.cc', | 59 'atomicops_unittest.cc', |
49 'clipboard_unittest.cc', | 60 'clipboard_unittest.cc', |
50 'command_line_unittest.cc', | 61 'command_line_unittest.cc', |
51 'condition_variable_unittest.cc', | 62 'condition_variable_unittest.cc', |
| 63 'directory_watcher_unittest.cc', |
52 'field_trial_unittest.cc', | 64 'field_trial_unittest.cc', |
53 'file_path_unittest.cc', | 65 'file_path_unittest.cc', |
54 'file_util_unittest.cc', | 66 'file_util_unittest.cc', |
| 67 'file_version_info_unittest.cc', |
55 'histogram_unittest.cc', | 68 'histogram_unittest.cc', |
56 'hmac_unittest.cc', | 69 'hmac_unittest.cc', |
57 'idletimer_unittest.cc', | 70 'idletimer_unittest.cc', |
58 'json_reader_unittest.cc', | 71 'json_reader_unittest.cc', |
59 'json_writer_unittest.cc', | 72 'json_writer_unittest.cc', |
60 'lazy_instance_unittest.cc', | 73 'lazy_instance_unittest.cc', |
61 'linked_ptr_unittest.cc', | 74 'linked_ptr_unittest.cc', |
62 'message_loop_unittest.cc', | 75 'message_loop_unittest.cc', |
| 76 'gfx/native_theme_unittest.cc', |
| 77 'object_watcher_unittest.cc', |
63 'observer_list_unittest.cc', | 78 'observer_list_unittest.cc', |
64 'path_service_unittest.cc', | 79 'path_service_unittest.cc', |
| 80 'pe_image_unittest.cc', |
65 'pickle_unittest.cc', | 81 'pickle_unittest.cc', |
66 'pr_time_unittest.cc', | 82 'pr_time_unittest.cc', |
67 'process_util_unittest.cc', | 83 'process_util_unittest.cc', |
68 'rand_util_unittest.cc', | 84 'rand_util_unittest.cc', |
| 85 'gfx/rect_unittest.cc', |
69 'ref_counted_unittest.cc', | 86 'ref_counted_unittest.cc', |
70 'run_all_unittests.cc', | |
71 'scoped_ptr_unittest.cc', | 87 'scoped_ptr_unittest.cc', |
72 'sha2_unittest.cc', | 88 'sha2_unittest.cc', |
73 'shared_memory_unittest.cc', | 89 'shared_memory_unittest.cc', |
74 'simple_thread_unittest.cc', | 90 'simple_thread_unittest.cc', |
75 'singleton_unittest.cc', | 91 'singleton_unittest.cc', |
76 'stack_container_unittest.cc', | 92 'stack_container_unittest.cc', |
77 'stats_table_unittest.cc', | 93 'stats_table_unittest.cc', |
78 'string_escape_unittest.cc', | 94 'string_escape_unittest.cc', |
79 'string_piece_unittest.cc', | 95 'string_piece_unittest.cc', |
80 'string_tokenizer_unittest.cc', | 96 'string_tokenizer_unittest.cc', |
81 'string_util_unittest.cc', | 97 'string_util_unittest.cc', |
82 'sys_info_unittest.cc', | 98 'sys_info_unittest.cc', |
| 99 'sys_string_conversions_unittest.cc', |
| 100 'system_monitor_unittest.cc', |
83 'thread_collision_warner_unittest.cc', | 101 'thread_collision_warner_unittest.cc', |
84 'thread_local_storage_unittest.cc', | 102 'thread_local_storage_unittest.cc', |
85 'thread_local_unittest.cc', | 103 'thread_local_unittest.cc', |
86 'thread_unittest.cc', | 104 'thread_unittest.cc', |
87 'time_unittest.cc', | 105 'time_unittest.cc', |
| 106 'time_unittest_win.cc', |
88 'timer_unittest.cc', | 107 'timer_unittest.cc', |
89 'tracked_objects_unittest.cc', | 108 'tracked_objects_unittest.cc', |
90 'tuple_unittest.cc', | 109 'tuple_unittest.cc', |
91 'values_unittest.cc', | 110 'values_unittest.cc', |
92 'waitable_event_unittest.cc', | 111 'waitable_event_unittest.cc', |
93 'watchdog_unittest.cc', | 112 'watchdog_unittest.cc', |
| 113 'win_util_unittest.cc', |
| 114 'wmi_util_unittest.cc', |
94 'word_iterator_unittest.cc', | 115 'word_iterator_unittest.cc', |
95 'worker_pool_unittest.cc', | 116 ]), |
96 | 117 |
97 'gfx/native_theme_unittest.cc', | 118 MSVSFilter('gfx_tests', [ |
98 'gfx/png_codec_unittest.cc', | 119 'gfx/png_codec_unittest.cc', |
99 'gfx/rect_unittest.cc', | 120 ]), |
100 ] | 121 ]) |
101 | 122 |
102 if env.Bit('posix'): | 123 if env.Bit('posix'): |
103 # Remove files that still need to be ported from the input_files list. | 124 # Remove files that still need to be ported from the input_files list. |
104 # TODO(port): delete files from this list as they get ported. | 125 # TODO(port): delete files from this list as they get ported. |
105 to_be_ported_files = [ | 126 input_files.Remove( |
106 # We have an implementation of idle_timer, but it's unclear if we want it | 127 # We have an implementation of idle_timer, but it's unclear if we want it |
107 # yet, so it's commented out for now. Leave this 'unported'. | 128 # yet, so it's commented out for now. Leave this 'unported'. |
108 'idletimer_unittest.cc', | 129 'idletimer_unittest.cc', |
109 | 130 |
110 'gfx/native_theme_unittest.cc', | 131 'gfx/native_theme_unittest.cc', |
111 ] | 132 ) |
112 for remove in to_be_ported_files: | |
113 input_files.remove(remove) | |
114 | 133 |
115 if env.Bit('mac'): | 134 if env.Bit('mac'): |
116 # Remove files that still need to be ported from the input_files list. | 135 # Remove files that still need to be ported from the input_files list. |
117 # TODO(port): delete files from this list as they get ported. | 136 # TODO(port): delete files from this list as they get ported. |
118 to_be_ported_files = [ | 137 input_files.Remove( |
119 'process_util_unittest.cc', | 138 'process_util_unittest.cc', |
120 'stats_table_unittest.cc', | 139 'stats_table_unittest.cc', |
121 ] | 140 ) |
122 for remove in to_be_ported_files: | |
123 input_files.remove(remove) | |
124 | 141 |
125 | 142 |
126 if env.Bit('windows'): | 143 if not env.Bit('windows'): |
127 # Windows-specific tests. | 144 # Remove Windows-specific tests. |
128 input_files.extend([ | 145 input_files.Remove( |
129 'directory_watcher_unittest.cc', | 146 'directory_watcher_unittest.cc', |
130 'file_version_info_unittest.cc', | 147 'file_version_info_unittest.cc', |
131 'object_watcher_unittest.cc', | 148 'object_watcher_unittest.cc', |
132 'pe_image_unittest.cc', | 149 'pe_image_unittest.cc', |
| 150 'system_monitor_unittest.cc', |
133 'sys_string_conversions_unittest.cc', | 151 'sys_string_conversions_unittest.cc', |
134 'time_unittest_win.cc', | 152 'time_unittest_win.cc', |
135 'win_util_unittest.cc', | 153 'win_util_unittest.cc', |
136 'wmi_util_unittest.cc', | 154 'wmi_util_unittest.cc', |
137 ]) | 155 ) |
138 | 156 |
139 if env.Bit('mac'): | 157 if env.Bit('mac'): |
140 # Mac-specific tests. | 158 # Mac-specific tests. |
141 input_files.extend([ | 159 input_files.Extend([ |
142 'mac_util_unittest.cc', | 160 'mac_util_unittest.cc', |
143 ]) | 161 ]) |
144 | 162 |
145 env.ChromeTestProgram('base_unittests', input_files) | 163 env.ChromeTestProgram('base_unittests', input_files) |
146 | 164 |
147 env.ChromeMSVSProject('$BASE_DIR/build/base_unittests.vcproj', | 165 p = env.ChromeMSVSProject('build/base_unittests.vcproj', |
148 dependencies = [ | 166 guid='{27A30967-4BBA-48D1-8522-CDE95F7B1CEC}', |
149 '$BASE_DIR/build/base.vcproj', | 167 dependencies=[ |
150 '$ZLIB_DIR/zlib.vcproj', | 168 '$BASE_DIR/build/base.vcproj', |
151 '$ICU38_DIR/build/icu.vcproj', | 169 '$ZLIB_DIR/zlib.vcproj', |
152 '$BASE_DIR/build/base_gfx.vcproj', | 170 '$ICU38_DIR/build/icu.vcproj', |
153 '$TESTING_DIR/gtest.vcproj', | 171 '$BASE_DIR/build/base_gfx.vcproj', |
154 '$LIBPNG_DIR/libpng.vcproj', | 172 '$TESTING_DIR/gtest.vcproj', |
155 '$SKIA_DIR/skia.vcproj', | 173 '$LIBPNG_DIR/libpng.vcproj', |
156 ], | 174 '$SKIA_DIR/skia.vcproj', |
157 guid='{27A30967-4BBA-48D1-8522-CDE95F7B1CEC}') | 175 ], |
| 176 files=input_files, |
| 177 tools = [ |
| 178 'VCPreBuildEventTool', |
| 179 'VCCustomBuildTool', |
| 180 'VCXMLDataGeneratorTool', |
| 181 'VCWebServiceProxyGeneratorTool', |
| 182 'VCMIDLTool', |
| 183 MSVSTool('VCCLCompilerTool', |
| 184 PreprocessorDefinitions='UNIT_TEST'), |
| 185 'VCManagedResourceCompilerTool', |
| 186 'VCResourceCompilerTool', |
| 187 'VCPreLinkEventTool', |
| 188 'VCLinkerTool', |
| 189 'VCALinkTool', |
| 190 'VCManifestTool', |
| 191 'VCXDCMakeTool', |
| 192 'VCBscMakeTool', |
| 193 'VCFxCopTool', |
| 194 'VCAppVerifierTool', |
| 195 'VCWebDeploymentTool', |
| 196 'VCPostBuildEventTool', |
| 197 ]) |
| 198 |
| 199 p.AddConfig('Debug|Win32', |
| 200 ConfigurationType = '1', |
| 201 InheritedPropertySheets = [ |
| 202 '$(SolutionDir)../build/debug.vsprops', |
| 203 './base_unittests.vsprops', |
| 204 '$(SolutionDir)../testing/using_gtest.vsprops', |
| 205 ]) |
| 206 |
| 207 p.AddConfig('Release|Win32', |
| 208 ConfigurationType = '1', |
| 209 InheritedPropertySheets = [ |
| 210 '$(SolutionDir)../build/release.vsprops', |
| 211 './base_unittests.vsprops', |
| 212 '$(SolutionDir)../testing/using_gtest.vsprops', |
| 213 ]) |
| 214 |
| 215 env.AlwaysBuild(p) |
| 216 |
| 217 i = env.Command('$CHROME_SRC_DIR/base/build/base_unittests.vcproj', p, |
| 218 Copy('$TARGET', '$SOURCE')) |
| 219 Alias('msvs', i) |
158 | 220 |
159 # TODO(sgk) should this be moved into base.lib like everything else? This will | 221 # TODO(sgk) should this be moved into base.lib like everything else? This will |
160 # require updating a bunch of other SConscripts which link directly against | 222 # require updating a bunch of other SConscripts which link directly against |
161 # this generated object file. | 223 # this generated object file. |
162 env.StaticObject('perftimer.cc') | 224 env.StaticObject('perftimer.cc') |
163 | 225 |
164 # Since run_all_perftests supplies a main, we cannot have it in base.lib | 226 # Since run_all_perftests supplies a main, we cannot have it in base.lib |
165 env.StaticObject('run_all_perftests.cc') | 227 env.StaticObject('run_all_perftests.cc') |
OLD | NEW |