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
3 # found in the LICENSE file.
8 env_tests = env.Clone()
12 '$ICU38_DIR/public/common',
13 '$ICU38_DIR/public/i18n',
17 'U_STATIC_IMPLEMENTATION',
21 if env['PLATFORM'] == 'win32':
29 # These base files work on *all* platforms; files that don't work
30 # cross-platform live below.
35 'bzip2_error_handler.cc',
49 'message_pump_default.cc',
72 'third_party/nspr/prtime.cc',
73 'third_party/nss/sha512.cc',
76 if env['PLATFORM'] == 'win32':
77 # Some of these aren't really Windows-specific, they're just here until
78 # we have the port versions working.
79 # TODO: move all these files to either the cross-platform block above or
80 # a platform-specific block below.
84 'file_version_info.cc',
86 # This group all depends on MessageLoop.
89 'shared_event.cc', # Is this used?
94 'resource_util.cc', # Uses HMODULE, but may be abstractable.
97 if env['PLATFORM'] == 'win32':
99 'base_drag_source.cc',
100 'base_drop_target.cc',
103 'condition_variable_win.cc',
112 'message_pump_win.cc',
114 'platform_thread_win.cc',
115 'process_util_win.cc',
117 'shared_memory_win.cc',
119 'sys_string_conversions_win.cc',
120 'system_monitor_win.cc',
121 'thread_local_storage_win.cc',
122 'thread_local_win.cc',
124 'waitable_event_win.cc',
130 if env['PLATFORM'] in ('darwin', 'posix'):
132 'condition_variable_posix.cc',
133 'debug_util_posix.cc',
134 'file_util_posix.cc',
135 'lock_impl_posix.cc',
136 'message_pump_libevent.cc',
137 'platform_thread_posix.cc',
138 'process_util_posix.cc',
139 'shared_memory_posix.cc',
142 'thread_local_storage_posix.cc',
143 'thread_local_posix.cc',
145 'waitable_event_generic.cc',
148 if env['PLATFORM'] == 'darwin':
153 'file_version_info_mac.mm',
155 'message_pump_mac.mm',
156 'platform_thread_mac.mm',
157 'sys_string_conversions_mac.cc',
158 'worker_pool_mac.mm',
161 if env['PLATFORM'] == 'posix':
163 'atomicops_internals_x86_gcc.cc',
164 'base_paths_linux.cc',
165 'file_util_linux.cc',
168 'sys_string_conversions_linux.cc',
172 env.ChromeStaticLibrary('base', input_files)
177 '$GTEST_DIR/include',
180 '$SKIA_DIR/include/corecg',
181 '$SKIA_DIR/platform',
184 '$ICU38_DIR/public/common',
185 '$ICU38_DIR/public/i18n',
191 'CHROME_PNG_WRITE_SUPPORT',
192 'U_STATIC_IMPLEMENTATION',
193 'GOOGLE_CHROME_BUILD',
208 '$GTEST_DIR/include',
212 if env['PLATFORM'] == 'win32':
219 '_WIN32_WINNT=0x0600',
225 '/DELAYLOAD:"dwmapi.dll"',
226 '/DELAYLOAD:"uxtheme.dll"',
237 if env['PLATFORM'] in ('posix', 'darwin'):
244 # These test files work on *all* platforms; tests that don't work
245 # cross-platform live below.
247 'at_exit_unittest.cc',
248 'atomicops_unittest.cc',
249 'command_line_unittest.cc',
250 'condition_variable_unittest.cc',
251 'file_util_unittest.cc',
253 'histogram_unittest.cc',
254 'json_reader_unittest.cc',
255 'json_writer_unittest.cc',
256 'lazy_instance_unittest.cc',
257 'linked_ptr_unittest.cc',
258 'message_loop_unittest.cc',
259 'observer_list_unittest.cc',
260 'path_service_unittest.cc',
261 'pickle_unittest.cc',
262 'pr_time_unittest.cc',
263 'ref_counted_unittest.cc',
264 'run_all_unittests.cc',
265 'scoped_ptr_unittest.cc',
267 'shared_memory_unittest.cc',
268 'simple_thread_unittest.cc',
269 'singleton_unittest.cc',
270 'stack_container_unittest.cc',
271 'string_escape_unittest.cc',
272 'string_piece_unittest.cc',
273 'string_tokenizer_unittest.cc',
274 'string_util_unittest.cc',
275 'sys_info_unittest.cc',
276 'thread_local_unittest.cc',
277 'thread_local_storage_unittest.cc',
278 'thread_unittest.cc',
281 'tracked_objects_unittest.cc',
283 'values_unittest.cc',
284 'waitable_event_unittest.cc',
285 'word_iterator_unittest.cc',
286 'worker_pool_unittest.cc',
287 'gfx/convolver_unittest.cc',
288 'gfx/image_operations_unittest.cc',
289 'gfx/png_codec_unittest.cc',
290 'gfx/rect_unittest.cc',
293 if env['PLATFORM'] == 'win32':
294 # These tests aren't really Windows-specific, they're just here until
295 # we have the port versions working.
296 env_tests.ChromeTestProgram('debug_message', ['debug_message.cc'])
299 'clipboard_unittest.cc',
300 'idletimer_unittest.cc',
301 'process_util_unittest.cc',
302 'shared_event_unittest.cc',
303 'stats_table_unittest.cc',
304 'watchdog_unittest.cc',
305 'gfx/native_theme_unittest.cc',
306 'gfx/uniscribe_unittest.cc',
307 'gfx/vector_canvas_unittest.cc',
310 if env['PLATFORM'] == 'win32':
311 # Windows-specific tests.
313 'file_version_info_unittest.cc',
314 'object_watcher_unittest.cc',
315 'pe_image_unittest.cc',
316 'sys_string_conversions_win_unittest.cc',
317 'time_unittest_win.cc',
318 'win_util_unittest.cc',
319 'wmi_util_unittest.cc',
322 if env['PLATFORM'] == 'darwin':
324 'platform_test_mac.mm',
327 base_unittests = env_tests.ChromeTestProgram('base_unittests', test_files)
329 # Install up a level to allow unit test path assumptions to be valid.
330 installed_base_unittests = env.Install('$TARGET_ROOT', base_unittests)
337 SConscript(sconscript_dirs, exports=['env'])
340 env.Alias('base', ['.', installed_base_unittests])
342 # TODO(sgk) should this be moved into base.lib like everything else? This will
343 # require updating a bunch of other SConscripts which link directly against
344 # this generated object file.
345 env_tests.StaticObject('perftimer.cc')
347 # Since run_all_perftests supplies a main, we cannot have it in base.lib
348 env_tests.StaticObject('run_all_perftests.cc')