| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
| 6 import("//testing/libfuzzer/fuzzer_test.gni") |
| 6 | 7 |
| 7 group("common") { | 8 group("common") { |
| 8 if (is_component_build) { | 9 if (is_component_build) { |
| 9 public_deps = [ | 10 public_deps = [ |
| 10 "//components/policy", | 11 "//components/policy", |
| 11 ] | 12 ] |
| 12 } else { | 13 } else { |
| 13 public_deps = [ | 14 public_deps = [ |
| 14 ":internal", | 15 ":internal", |
| 15 ] | 16 ] |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 "//url", | 150 "//url", |
| 150 ] | 151 ] |
| 151 | 152 |
| 152 if (is_win) { | 153 if (is_win) { |
| 153 libs = [ | 154 libs = [ |
| 154 "shlwapi.lib", | 155 "shlwapi.lib", |
| 155 "userenv.lib", | 156 "userenv.lib", |
| 156 "ntdsapi.lib", | 157 "ntdsapi.lib", |
| 157 ] | 158 ] |
| 158 } | 159 } |
| 159 if (is_win || is_chromeos) { | 160 # Compile on Linux for fuzzer and since code is reused on Chrome OS. |
| 161 if (is_win || is_linux) { |
| 160 sources += [ | 162 sources += [ |
| 161 "preg_parser.cc", | 163 "preg_parser.cc", |
| 162 "preg_parser.h", | 164 "preg_parser.h", |
| 163 "registry_dict.cc", | 165 "registry_dict.cc", |
| 164 "registry_dict.h", | 166 "registry_dict.h", |
| 165 ] | 167 ] |
| 166 } | 168 } |
| 167 if (is_android) { | 169 if (is_android) { |
| 168 sources += [ "cloud/component_cloud_policy_service_stub.cc" ] | 170 sources += [ "cloud/component_cloud_policy_service_stub.cc" ] |
| 169 sources -= [ | 171 sources -= [ |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 "policy_map_unittest.cc", | 291 "policy_map_unittest.cc", |
| 290 "policy_service_impl_unittest.cc", | 292 "policy_service_impl_unittest.cc", |
| 291 "policy_statistics_collector_unittest.cc", | 293 "policy_statistics_collector_unittest.cc", |
| 292 "remote_commands/remote_commands_queue_unittest.cc", | 294 "remote_commands/remote_commands_queue_unittest.cc", |
| 293 "remote_commands/remote_commands_service_unittest.cc", | 295 "remote_commands/remote_commands_service_unittest.cc", |
| 294 "schema_map_unittest.cc", | 296 "schema_map_unittest.cc", |
| 295 "schema_registry_tracking_policy_provider_unittest.cc", | 297 "schema_registry_tracking_policy_provider_unittest.cc", |
| 296 "schema_registry_unittest.cc", | 298 "schema_registry_unittest.cc", |
| 297 "schema_unittest.cc", | 299 "schema_unittest.cc", |
| 298 ] | 300 ] |
| 299 if (is_win || is_chromeos) { | 301 if (is_win || is_linux) { |
| 300 sources += [ | 302 sources += [ |
| 301 "preg_parser_unittest.cc", | 303 "preg_parser_unittest.cc", |
| 302 "registry_dict_unittest.cc", | 304 "registry_dict_unittest.cc", |
| 303 ] | 305 ] |
| 304 } | 306 } |
| 305 if (is_chromeos) { | 307 if (is_chromeos) { |
| 306 sources += [ "proxy_policy_provider_unittest.cc" ] | 308 sources += [ "proxy_policy_provider_unittest.cc" ] |
| 307 } else { | 309 } else { |
| 308 sources += [ | 310 sources += [ |
| 309 "cloud/user_cloud_policy_manager_unittest.cc", | 311 "cloud/user_cloud_policy_manager_unittest.cc", |
| (...skipping 10 matching lines...) Expand all Loading... |
| 320 "cloud/component_cloud_policy_updater_unittest.cc", | 322 "cloud/component_cloud_policy_updater_unittest.cc", |
| 321 "cloud/external_policy_data_fetcher_unittest.cc", | 323 "cloud/external_policy_data_fetcher_unittest.cc", |
| 322 "cloud/external_policy_data_updater_unittest.cc", | 324 "cloud/external_policy_data_updater_unittest.cc", |
| 323 "cloud/resource_cache_unittest.cc", | 325 "cloud/resource_cache_unittest.cc", |
| 324 "config_dir_policy_loader_unittest.cc", | 326 "config_dir_policy_loader_unittest.cc", |
| 325 ] | 327 ] |
| 326 } | 328 } |
| 327 if (is_mac || is_ios) { | 329 if (is_mac || is_ios) { |
| 328 sources += [ "mac_util_unittest.cc" ] | 330 sources += [ "mac_util_unittest.cc" ] |
| 329 } | 331 } |
| 330 if (is_win || is_chromeos) { | 332 if (is_win || is_linux) { |
| 331 # Needed by policy_loader_win_unittest.cc and preg_parser_unittest.cc | 333 # Needed by policy_loader_win_unittest.cc and preg_parser_unittest.cc |
| 332 data = [ | 334 data = [ |
| 333 "//chrome/test/data/policy/", | 335 "//chrome/test/data/policy/", |
| 334 ] | 336 ] |
| 335 } | 337 } |
| 336 | 338 |
| 337 deps = [ | 339 deps = [ |
| 338 ":test_support", | 340 ":test_support", |
| 339 "//base", | 341 "//base", |
| 340 "//base/test:test_support", | 342 "//base/test:test_support", |
| 341 "//components/policy:generated", | 343 "//components/policy:generated", |
| 342 "//components/prefs:test_support", | 344 "//components/prefs:test_support", |
| 343 "//extensions/features", | 345 "//extensions/features", |
| 344 "//google_apis", | 346 "//google_apis", |
| 345 "//net:test_support", | 347 "//net:test_support", |
| 346 "//testing/gmock", | 348 "//testing/gmock", |
| 347 "//testing/gtest", | 349 "//testing/gtest", |
| 348 ] | 350 ] |
| 349 } | 351 } |
| 352 |
| 353 if (is_win || is_linux) { |
| 354 fuzzer_test("preg_parser_fuzzer") { |
| 355 sources = [ |
| 356 "preg_parser_fuzzer.cc", |
| 357 ] |
| 358 seed_corpus = "//chrome/test/data/policy/gpo/fuzzer_corpus" |
| 359 dict = "//chrome/test/data/policy/gpo/fuzzer.dict" |
| 360 deps = [ |
| 361 ":internal", |
| 362 "//base", |
| 363 ] |
| 364 } |
| 365 } |
| OLD | NEW |