| # Copyright 2018 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//testing/libfuzzer/fuzzer_test.gni") |
| |
| component("impl") { |
| output_name = "learning_impl" |
| visibility = [ |
| "//media/learning/impl:unit_tests", |
| "//media/learning/impl:learning_fuzzer", |
| |
| # Actual clients. |
| "//content/browser", |
| "//media/capabilities", |
| "//media/mojo/services", |
| ] |
| |
| sources = [ |
| "distribution_reporter.cc", |
| "distribution_reporter.h", |
| "extra_trees_trainer.cc", |
| "extra_trees_trainer.h", |
| "feature_provider.cc", |
| "feature_provider.h", |
| "learning_session_impl.cc", |
| "learning_session_impl.h", |
| "learning_task_controller_helper.cc", |
| "learning_task_controller_helper.h", |
| "learning_task_controller_impl.cc", |
| "learning_task_controller_impl.h", |
| "lookup_table_trainer.cc", |
| "lookup_table_trainer.h", |
| "model.h", |
| "one_hot.cc", |
| "one_hot.h", |
| "random_number_generator.cc", |
| "random_number_generator.h", |
| "random_tree_trainer.cc", |
| "random_tree_trainer.h", |
| "training_algorithm.h", |
| "voting_ensemble.cc", |
| "voting_ensemble.h", |
| ] |
| |
| defines = [ "IS_LEARNING_IMPL_IMPL" ] |
| |
| deps = [ |
| "//base", |
| "//services/metrics/public/cpp:metrics_cpp", |
| "//services/metrics/public/cpp:ukm_builders", |
| ] |
| |
| public_deps = [ "//media/learning/common" ] |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| |
| sources = [ |
| "distribution_reporter_unittest.cc", |
| "extra_trees_trainer_unittest.cc", |
| "fisher_iris_dataset.cc", |
| "fisher_iris_dataset.h", |
| "learning_session_impl_unittest.cc", |
| "learning_task_controller_helper_unittest.cc", |
| "learning_task_controller_impl_unittest.cc", |
| "lookup_table_trainer_unittest.cc", |
| "one_hot_unittest.cc", |
| "random_number_generator_unittest.cc", |
| "random_tree_trainer_unittest.cc", |
| "test_random_number_generator.cc", |
| "test_random_number_generator.h", |
| ] |
| |
| deps = [ |
| ":impl", |
| "//base/test:test_support", |
| "//components/ukm:test_support", |
| "//media:test_support", |
| "//media/learning/impl", |
| "//testing/gtest", |
| ] |
| } |
| |
| fuzzer_test("learning_fuzzer") { |
| sources = [ "learning_fuzzertest.cc" ] |
| deps = [ |
| ":impl", |
| "//base", |
| "//base/test:test_support", |
| ] |
| } |