OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 __doc__ = """ |
| 6 Configuration for building base_unittests{,.exe}. |
| 7 """ |
| 8 |
| 9 Import('env') |
| 10 |
| 11 env = env.Clone() |
| 12 |
| 13 env.SConscript([ |
| 14 '$BASE_DIR/using_base.scons', |
| 15 '$BASE_DIR/gfx/using_base_gfx.scons', |
| 16 '$GTEST_DIR/../using_gtest.scons', |
| 17 '$ICU38_DIR/using_icu38.scons', |
| 18 '$LIBPNG_DIR/using_libpng.scons', |
| 19 '$SKIA_DIR/using_skia.scons', |
| 20 '$ZLIB_DIR/using_zlib.scons', |
| 21 ], {'env':env}) |
| 22 |
| 23 if env['PLATFORM'] in ('posix', 'darwin'): |
| 24 env.SConscript([ |
| 25 '$LIBEVENT_DIR/using_libevent.scons', |
| 26 ], {'env':env}) |
| 27 |
| 28 env.Prepend( |
| 29 CPPPATH = [ |
| 30 '$ROOT_DIR', |
| 31 ], |
| 32 CPPDEFINES = [ |
| 33 'GOOGLE_CHROME_BUILD', |
| 34 ], |
| 35 ) |
| 36 |
| 37 if env['PLATFORM'] == 'win32': |
| 38 env.Prepend( |
| 39 CCFLAGS = [ |
| 40 '/TP', |
| 41 '/WX', |
| 42 ], |
| 43 CPPDEFINES = [ |
| 44 '_WIN32_WINNT=0x0600', |
| 45 'WINVER=0x0600', |
| 46 '_HAS_EXCEPTIONS=0', |
| 47 ], |
| 48 LINKFLAGS = [ |
| 49 '/MANIFEST', |
| 50 '/DELAYLOAD:"dwmapi.dll"', |
| 51 '/DELAYLOAD:"uxtheme.dll"', |
| 52 '/MACHINE:X86', |
| 53 '/FIXED:No', |
| 54 |
| 55 '/safeseh', |
| 56 '/dynamicbase', |
| 57 '/ignore:4199', |
| 58 '/nxcompat', |
| 59 ], |
| 60 ) |
| 61 |
| 62 # These test files work on *all* platforms; tests that don't work |
| 63 # cross-platform live below. |
| 64 input_files = [ |
| 65 'at_exit_unittest.cc', |
| 66 'atomicops_unittest.cc', |
| 67 'clipboard_unittest.cc', |
| 68 'command_line_unittest.cc', |
| 69 'condition_variable_unittest.cc', |
| 70 'file_path_unittest.cc', |
| 71 'file_util_unittest.cc', |
| 72 'histogram_unittest.cc', |
| 73 'hmac_unittest.cc', |
| 74 'idletimer_unittest.cc', |
| 75 'json_reader_unittest.cc', |
| 76 'json_writer_unittest.cc', |
| 77 'lazy_instance_unittest.cc', |
| 78 'linked_ptr_unittest.cc', |
| 79 'message_loop_unittest.cc', |
| 80 'observer_list_unittest.cc', |
| 81 'path_service_unittest.cc', |
| 82 'pickle_unittest.cc', |
| 83 'pr_time_unittest.cc', |
| 84 'process_util_unittest.cc', |
| 85 'rand_util_unittest.cc', |
| 86 'ref_counted_unittest.cc', |
| 87 'run_all_unittests.cc', |
| 88 'scoped_ptr_unittest.cc', |
| 89 'sha2_unittest.cc', |
| 90 'shared_memory_unittest.cc', |
| 91 'simple_thread_unittest.cc', |
| 92 'singleton_unittest.cc', |
| 93 'stack_container_unittest.cc', |
| 94 'stats_table_unittest.cc', |
| 95 'string_escape_unittest.cc', |
| 96 'string_piece_unittest.cc', |
| 97 'string_tokenizer_unittest.cc', |
| 98 'string_util_unittest.cc', |
| 99 'sys_info_unittest.cc', |
| 100 'thread_local_storage_unittest.cc', |
| 101 'thread_local_unittest.cc', |
| 102 'thread_unittest.cc', |
| 103 'time_unittest.cc', |
| 104 'timer_unittest.cc', |
| 105 'tracked_objects_unittest.cc', |
| 106 'tuple_unittest.cc', |
| 107 'values_unittest.cc', |
| 108 'waitable_event_unittest.cc', |
| 109 'watchdog_unittest.cc', |
| 110 'word_iterator_unittest.cc', |
| 111 'worker_pool_unittest.cc', |
| 112 |
| 113 'gfx/convolver_unittest.cc', |
| 114 'gfx/image_operations_unittest.cc', |
| 115 'gfx/native_theme_unittest.cc', |
| 116 'gfx/png_codec_unittest.cc', |
| 117 'gfx/rect_unittest.cc', |
| 118 'gfx/uniscribe_unittest.cc', |
| 119 'gfx/vector_canvas_unittest.cc', |
| 120 ] |
| 121 |
| 122 if env['PLATFORM'] in ('posix', 'darwin'): |
| 123 #env.ChromeTestProgram('debug_message', ['debug_message.cc']) |
| 124 |
| 125 # Remove files that still need to be ported from the input_files list. |
| 126 # TODO(port): delete files from this list as they get ported. |
| 127 to_be_ported_files = [ |
| 128 'clipboard_unittest.cc', |
| 129 'idletimer_unittest.cc', |
| 130 'process_util_unittest.cc', |
| 131 'stats_table_unittest.cc', |
| 132 'watchdog_unittest.cc', |
| 133 'gfx/native_theme_unittest.cc', |
| 134 'gfx/uniscribe_unittest.cc', |
| 135 'gfx/vector_canvas_unittest.cc', |
| 136 ] |
| 137 for remove in to_be_ported_files: |
| 138 input_files.remove(remove) |
| 139 |
| 140 if env['PLATFORM'] == 'win32': |
| 141 # Windows-specific tests. |
| 142 input_files.extend([ |
| 143 'file_version_info_unittest.cc', |
| 144 'object_watcher_unittest.cc', |
| 145 'pe_image_unittest.cc', |
| 146 'sys_string_conversions_win_unittest.cc', |
| 147 'time_unittest_win.cc', |
| 148 'win_util_unittest.cc', |
| 149 'wmi_util_unittest.cc', |
| 150 ]) |
| 151 |
| 152 if env['PLATFORM'] == 'darwin': |
| 153 # Mac-specific tests. |
| 154 input_files.extend([ |
| 155 'platform_test_mac.mm', |
| 156 ]) |
| 157 |
| 158 base_unittests = env.ChromeTestProgram('base_unittests', input_files) |
| 159 |
| 160 # Install up a level to allow unit test path assumptions to be valid. |
| 161 installed_base_unittests = env.Install('$TARGET_ROOT', base_unittests) |
| 162 |
| 163 env.Alias('base', installed_base_unittests) |
| 164 |
| 165 # TODO(sgk) should this be moved into base.lib like everything else? This will |
| 166 # require updating a bunch of other SConscripts which link directly against |
| 167 # this generated object file. |
| 168 env.StaticObject('perftimer.cc') |
| 169 |
| 170 # Since run_all_perftests supplies a main, we cannot have it in base.lib |
| 171 env.StaticObject('run_all_perftests.cc') |
OLD | NEW |