| 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 the net_unittests{,.exe} executable. | 6 Configuration for building the net_unittests{,.exe} executable. |
| 7 """ | 7 """ |
| 8 | 8 |
| 9 Import('env') | 9 Import('env') |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 '$LIBEVENT_DIR/using_libevent.scons', | 27 '$LIBEVENT_DIR/using_libevent.scons', |
| 28 ], {'env':env}) | 28 ], {'env':env}) |
| 29 | 29 |
| 30 if env.Bit('windows'): | 30 if env.Bit('windows'): |
| 31 env.Prepend( | 31 env.Prepend( |
| 32 CCFLAGS = [ | 32 CCFLAGS = [ |
| 33 '/WX', | 33 '/WX', |
| 34 ], | 34 ], |
| 35 ) | 35 ) |
| 36 | 36 |
| 37 input_files = ChromeFileList([ | 37 input_files = [ |
| 38 # TODO(sgk): violate standard indentation so we don't have to | |
| 39 # reindent too much when we remove the explicit MSVSFilter() calls | |
| 40 # in favor of generating the hierarchy to reflect the file system. | |
| 41 MSVSFilter('support', [ | |
| 42 'build/precompiled_net.cc', | |
| 43 'build/precompiled_net.h', | |
| 44 'base/run_all_unittests.cc', | |
| 45 ]), | |
| 46 MSVSFilter('tests', [ | |
| 47 MSVSFilter('disk_cache', [ | |
| 48 'disk_cache/addr_unittest.cc', | |
| 49 'disk_cache/backend_unittest.cc', | |
| 50 'disk_cache/block_files_unittest.cc', | |
| 51 'disk_cache/disk_cache_test_base.cc', | |
| 52 'disk_cache/disk_cache_test_base.h', | |
| 53 'disk_cache/disk_cache_test_util.cc', | |
| 54 'disk_cache/disk_cache_test_util.h', | |
| 55 'disk_cache/entry_unittest.cc', | |
| 56 'disk_cache/mapped_file_unittest.cc', | |
| 57 'disk_cache/storage_block_unittest.cc', | |
| 58 ]), | |
| 59 MSVSFilter('http', [ | |
| 60 'http/http_auth_cache_unittest.cc', | |
| 61 'http/http_auth_handler_basic_unittest.cc', | |
| 62 'http/http_auth_handler_digest_unittest.cc', | |
| 63 'http/http_auth_unittest.cc', | |
| 64 'http/http_cache_unittest.cc', | |
| 65 'http/http_chunked_decoder_unittest.cc', | |
| 66 'http/http_network_layer_unittest.cc', | |
| 67 'http/http_network_transaction_unittest.cc', | |
| 68 'http/http_response_headers_unittest.cc', | |
| 69 'http/http_transaction_unittest.cc', | |
| 70 'http/http_transaction_unittest.h', | |
| 71 'http/http_transaction_winhttp_unittest.cc', | |
| 72 'http/http_util_unittest.cc', | |
| 73 'http/http_vary_data_unittest.cc', | |
| 74 'http/winhttp_request_throttle_unittest.cc', | |
| 75 ]), | |
| 76 MSVSFilter('base', [ | |
| 77 'base/auth_cache_unittest.cc', | 38 'base/auth_cache_unittest.cc', |
| 78 'base/base64_unittest.cc', | 39 'base/base64_unittest.cc', |
| 79 'base/bzip2_filter_unittest.cc', | 40 'base/bzip2_filter_unittest.cc', |
| 80 'base/client_socket_pool_unittest.cc', | 41 'base/client_socket_pool_unittest.cc', |
| 81 'base/cookie_monster_unittest.cc', | 42 'base/cookie_monster_unittest.cc', |
| 82 'base/cookie_policy_unittest.cc', | 43 'base/cookie_policy_unittest.cc', |
| 83 'base/data_url_unittest.cc', | 44 'base/data_url_unittest.cc', |
| 84 'base/directory_lister_unittest.cc', | 45 'base/directory_lister_unittest.cc', |
| 85 'base/escape_unittest.cc', | 46 'base/escape_unittest.cc', |
| 86 'base/file_stream_unittest.cc', | 47 'base/file_stream_unittest.cc', |
| 87 'base/filter_unittest.cc', | 48 'base/filter_unittest.cc', |
| 88 'base/gzip_filter_unittest.cc', | 49 'base/gzip_filter_unittest.cc', |
| 89 'base/host_resolver_unittest.cc', | 50 'base/host_resolver_unittest.cc', |
| 90 'base/listen_socket_unittest.cc', | 51 'base/listen_socket_unittest.cc', |
| 91 'base/listen_socket_unittest.h', | |
| 92 'base/mime_sniffer_unittest.cc', | 52 'base/mime_sniffer_unittest.cc', |
| 93 'base/mime_util_unittest.cc', | 53 'base/mime_util_unittest.cc', |
| 94 'base/net_util_unittest.cc', | 54 'base/net_util_unittest.cc', |
| 95 'base/registry_controlled_domain_unittest.cc', | 55 'base/registry_controlled_domain_unittest.cc', |
| 96 'base/sdch_filter_unittest.cc', | 56 'base/run_all_unittests.cc', |
| 57 'base/ssl_test_util.cc', |
| 97 'base/ssl_client_socket_unittest.cc', | 58 'base/ssl_client_socket_unittest.cc', |
| 98 'base/ssl_config_service_unittest.cc', | |
| 99 'base/tcp_client_socket_unittest.cc', | 59 'base/tcp_client_socket_unittest.cc', |
| 100 'base/telnet_server_unittest.cc', | 60 'base/telnet_server_unittest.cc', |
| 101 'base/test_completion_callback_unittest.cc', | 61 'base/test_completion_callback_unittest.cc', |
| 102 'base/wininet_util_unittest.cc', | |
| 103 'base/x509_certificate_unittest.cc', | 62 'base/x509_certificate_unittest.cc', |
| 104 ]), | 63 'disk_cache/addr_unittest.cc', |
| 105 MSVSFilter('url_request', [ | 64 'disk_cache/backend_unittest.cc', |
| 106 'url_request/url_request_unittest.cc', | 65 'disk_cache/block_files_unittest.cc', |
| 107 'url_request/url_request_unittest.h', | 66 'disk_cache/disk_cache_test_base.cc', |
| 108 ]), | 67 'disk_cache/disk_cache_test_util.cc', |
| 109 MSVSFilter('proxy', [ | 68 'disk_cache/entry_unittest.cc', |
| 69 'disk_cache/mapped_file_unittest.cc', |
| 70 'disk_cache/storage_block_unittest.cc', |
| 71 'http/http_auth_cache_unittest.cc', |
| 72 'http/http_auth_handler_basic_unittest.cc', |
| 73 'http/http_auth_handler_digest_unittest.cc', |
| 74 'http/http_auth_unittest.cc', |
| 75 'http/http_cache_unittest.cc', |
| 76 'http/http_chunked_decoder_unittest.cc', |
| 77 'http/http_network_layer_unittest.cc', |
| 78 'http/http_network_transaction_unittest.cc', |
| 79 'http/http_response_headers_unittest.cc', |
| 80 'http/http_transaction_unittest.cc', |
| 81 'http/http_util_unittest.cc', |
| 82 'http/http_vary_data_unittest.cc', |
| 110 'proxy/proxy_script_fetcher_unittest.cc', | 83 'proxy/proxy_script_fetcher_unittest.cc', |
| 111 'proxy/proxy_service_unittest.cc', | 84 'proxy/proxy_service_unittest.cc', |
| 112 ]), | 85 'url_request/url_request_unittest.cc', |
| 113 ]), | 86 ] |
| 114 ]) | |
| 115 | 87 |
| 116 if not env.Bit('windows'): | 88 if env.Bit('windows'): |
| 117 input_files.Remove([ | 89 input_files.extend([ |
| 118 'base/wininet_util_unittest.cc', | 90 'base/wininet_util_unittest.cc', |
| 119 'http/http_transaction_winhttp_unittest.cc', | 91 'http/http_transaction_winhttp_unittest.cc', |
| 120 'http/winhttp_request_throttle_unittest.cc', | 92 'http/winhttp_request_throttle_unittest.cc', |
| 121 ]) | 93 ]) |
| 122 | 94 |
| 123 if env.Bit('linux'): | 95 if env.Bit('linux'): |
| 124 # TODO(port): | 96 # TODO(port): |
| 125 input_files.Remove([ | 97 to_be_ported_files = [ |
| 126 'base/sdch_filter_unittest.cc', | 98 'base/sdch_filter_unittest.cc', |
| 127 'base/ssl_config_service_unittest.cc', | 99 'base/ssl_config_service_unittest.cc', |
| 128 ]) | 100 ] |
| 101 input_files = list(set(input_files) - set(to_be_ported_files)) |
| 129 | 102 |
| 130 if env.Bit('mac'): | 103 if env.Bit('mac'): |
| 131 input_files.Extend([ | 104 input_files.extend([ |
| 132 '../base/platform_test_mac$OBJSUFFIX', | 105 '../base/platform_test_mac$OBJSUFFIX', |
| 133 ]) | 106 ]) |
| 134 | 107 |
| 135 # TODO(port): | 108 # TODO(port): |
| 136 input_files.Remove([ | 109 to_be_ported_files = [ |
| 137 'base/x509_certificate_unittest.cc', | 110 'base/x509_certificate_unittest.cc', |
| 138 'base/sdch_filter_unittest.cc', | 111 'base/sdch_filter_unittest.cc', |
| 139 'base/ssl_config_service_unittest.cc', | 112 'base/ssl_config_service_unittest.cc', |
| 140 'url_request/url_request_unittest.cc', | 113 'url_request/url_request_unittest.cc', |
| 141 ]) | 114 ] |
| 115 input_files = list(set(input_files) - set(to_be_ported_files)) |
| 142 | 116 |
| 143 net_unittests = env.ChromeTestProgram('net_unittests', input_files) | 117 env.ChromeTestProgram('net_unittests', input_files) |
| 144 | 118 |
| 145 p = env.ChromeMSVSProject('$NET_DIR/build/net_unittests.vcproj', | 119 env.ChromeMSVSProject('$NET_DIR/build/net_unittests.vcproj', |
| 146 dependencies = [ | 120 dependencies = [ |
| 147 '$BASE_DIR/build/base.vcproj', | 121 '$BASE_DIR/build/base.vcproj', |
| 148 '$BZIP2_DIR/bzip2.vcproj', | 122 '$BZIP2_DIR/bzip2.vcproj', |
| 149 '$NET_DIR/build/net.vcproj', | 123 '$NET_DIR/build/net.vcproj', |
| 150 '$MODP_B64_DIR/modp_b64.vcproj', | 124 '$MODP_B64_DIR/modp_b64.vcproj', |
| 151 '$ZLIB_DIR/zlib.vcproj', | 125 '$ZLIB_DIR/zlib.vcproj', |
| 152 '$ICU38_DIR/build/icu.vcproj', | 126 '$ICU38_DIR/build/icu.vcproj', |
| 153 '$TESTING_DIR/gtest.vcproj', | 127 '$TESTING_DIR/gtest.vcproj', |
| 154 '$GOOGLEURL_DIR/build/googleurl.vcproj', | 128 '$GOOGLEURL_DIR/build/googleurl.vcproj', |
| 155 '$SDCH_DIR/sdch.vcproj', | 129 '$SDCH_DIR/sdch.vcproj', |
| 156 ], | 130 ], |
| 157 guid='{E99DA267-BE90-4F45-88A1-6919DB2C7567}', | 131 guid='{E99DA267-BE90-4F45-88A1-6919DB2C7567}') |
| 158 # TODO: restore when we can derive all info, | |
| 159 # on all platforms, from the windows build targets. | |
| 160 #buildtargets=net_unittests, | |
| 161 files=input_files, | |
| 162 ConfigurationType='1') | |
| 163 | |
| 164 p.AddConfig('Debug|Win32', | |
| 165 InheritedPropertySheets=[ | |
| 166 '$(SolutionDir)../build/common.vsprops', | |
| 167 '$(SolutionDir)../build/debug.vsprops', | |
| 168 '$(SolutionDir)../testing/using_gtest.vsprops', | |
| 169 ], | |
| 170 tools=[ | |
| 171 'VCPreBuildEventTool', | |
| 172 'VCCustomBuildTool', | |
| 173 'VCXMLDataGeneratorTool', | |
| 174 'VCWebServiceProxyGeneratorTool', | |
| 175 'VCMIDLTool', | |
| 176 MSVSTool('VCCLCompilerTool', | |
| 177 PrecompiledHeaderThrough='precompiled_net.h', | |
| 178 ForcedIncludeFiles='precompiled_net.h', | |
| 179 PreprocessorDefinitions='UNIT_TEST', | |
| 180 UsePrecompiledHeader='2'), | |
| 181 'VCManagedResourceCompilerTool', | |
| 182 'VCResourceCompilerTool', | |
| 183 'VCPreLinkEventTool', | |
| 184 'VCLinkerTool', | |
| 185 'VCALinkTool', | |
| 186 'VCManifestTool', | |
| 187 'VCXDCMakeTool', | |
| 188 'VCBscMakeTool', | |
| 189 'VCFxCopTool', | |
| 190 'VCAppVerifierTool', | |
| 191 'VCWebDeploymentTool', | |
| 192 'VCPostBuildEventTool', | |
| 193 ]) | |
| 194 | |
| 195 p.AddConfig('Release|Win32', | |
| 196 InheritedPropertySheets=[ | |
| 197 '$(SolutionDir)../build/common.vsprops', | |
| 198 '$(SolutionDir)../build/release.vsprops', | |
| 199 '$(SolutionDir)../testing/using_gtest.vsprops', | |
| 200 ], | |
| 201 tools=[ | |
| 202 'VCPreBuildEventTool', | |
| 203 'VCCustomBuildTool', | |
| 204 'VCXMLDataGeneratorTool', | |
| 205 'VCWebServiceProxyGeneratorTool', | |
| 206 'VCMIDLTool', | |
| 207 MSVSTool('VCCLCompilerTool', | |
| 208 PreprocessorDefinitions='UNIT_TEST'), | |
| 209 'VCManagedResourceCompilerTool', | |
| 210 'VCResourceCompilerTool', | |
| 211 'VCPreLinkEventTool', | |
| 212 'VCLinkerTool', | |
| 213 'VCALinkTool', | |
| 214 'VCManifestTool', | |
| 215 'VCXDCMakeTool', | |
| 216 'VCBscMakeTool', | |
| 217 'VCFxCopTool', | |
| 218 'VCAppVerifierTool', | |
| 219 'VCWebDeploymentTool', | |
| 220 'VCPostBuildEventTool', | |
| 221 ]) | |
| 222 | |
| 223 # TODO: Remove when we can derive this information | |
| 224 p.AddFileConfig('build/precompiled_net.cc', | |
| 225 'Debug|Win32', | |
| 226 tools=[ | |
| 227 MSVSTool('VCCLCompilerTool', | |
| 228 UsePrecompiledHeader='1'), | |
| 229 ]) | |
| 230 | |
| 231 # TODO: Remove when we can derive this information | |
| 232 p.AddFileConfig('build/precompiled_net.cc', | |
| 233 'Release|Win32', | |
| 234 ExcludedFromBuild='true', | |
| 235 tools=[ | |
| 236 'VCCLCompilerTool', | |
| 237 ]) | |
| 238 | |
| 239 env.AlwaysBuild(p) | |
| 240 | |
| 241 i = env.Command('$CHROME_SRC_DIR/net/build/net_unittests.vcproj', p, | |
| 242 Copy('$TARGET', '$SOURCE')) | |
| 243 Alias('msvs', i) | |
| OLD | NEW |