| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 action("fieldtrial_testing_config_action") { | 5 action("field_trial_testing_config_action") { |
| 6 visibility = [ ":fieldtrial_testing_config" ] | 6 visibility = [ ":field_trial_config" ] |
| 7 script = "//tools/variations/fieldtrial_to_struct.py" | 7 script = "//tools/variations/fieldtrial_to_struct.py" |
| 8 | 8 |
| 9 source = "//testing/variations/fieldtrial_testing_config.json" | 9 source = "//testing/variations/fieldtrial_testing_config.json" |
| 10 inputs = [ | 10 inputs = [ |
| 11 "//tools/json_to_struct/element_generator.py", | 11 "//tools/json_to_struct/element_generator.py", |
| 12 "//tools/json_to_struct/json_to_struct.py", | 12 "//tools/json_to_struct/json_to_struct.py", |
| 13 "//tools/json_to_struct/struct_generator.py", | 13 "//tools/json_to_struct/struct_generator.py", |
| 14 source, | 14 source, |
| 15 ] | 15 ] |
| 16 out_name = "fieldtrial_testing_config" | 16 out_name = "fieldtrial_testing_config" |
| 17 outputs = [ | 17 outputs = [ |
| 18 "$target_gen_dir/$out_name.cc", | 18 "$target_gen_dir/$out_name.cc", |
| 19 "$target_gen_dir/$out_name.h", | 19 "$target_gen_dir/$out_name.h", |
| 20 ] | 20 ] |
| 21 | 21 |
| 22 args = [ | 22 args = [ |
| 23 rebase_path(source, root_build_dir), | 23 rebase_path(source, root_build_dir), |
| 24 "--destbase=" + rebase_path(target_gen_dir, root_build_dir), | 24 "--destbase=" + rebase_path(target_gen_dir, root_build_dir), |
| 25 "--namespace=chrome_variations", | 25 "--namespace=variations", |
| 26 "--schema=" + | 26 "--schema=" + |
| 27 rebase_path("fieldtrial_testing_config_schema.json", root_build_dir), | 27 rebase_path("field_trial_testing_config_schema.json", root_build_dir), |
| 28 "--platform=" + current_os, | 28 "--platform=" + current_os, |
| 29 "--output=$out_name", | 29 "--output=$out_name", |
| 30 ] | 30 ] |
| 31 } | 31 } |
| 32 | 32 |
| 33 source_set("fieldtrial_testing_config") { | 33 static_library("field_trial_config") { |
| 34 sources = get_target_outputs(":fieldtrial_testing_config_action") | 34 sources = [ |
| 35 "field_trial_util.cc", |
| 36 "field_trial_util.h", |
| 37 ] |
| 38 |
| 39 sources += get_target_outputs(":field_trial_testing_config_action") |
| 40 |
| 35 deps = [ | 41 deps = [ |
| 36 ":fieldtrial_testing_config_action", | 42 ":field_trial_testing_config_action", |
| 43 "//base", |
| 44 "//components/variations", |
| 45 "//net", |
| 37 ] | 46 ] |
| 38 } | 47 } |
| 48 |
| 49 source_set("unit_tests") { |
| 50 testonly = true |
| 51 sources = [ |
| 52 "field_trial_util_unittest.cc", |
| 53 ] |
| 54 deps = [ |
| 55 ":field_trial_config", |
| 56 "//base", |
| 57 "//components/variations", |
| 58 "//testing/gtest", |
| 59 ] |
| 60 } |
| OLD | NEW |