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("fieldtrial_testing_config_action") { |
6 visibility = [ ":fieldtrial_testing_config" ] | 6 visibility = [ ":fieldtrial_testing_config" ] |
7 script = "//tools/variations/fieldtrial_to_struct.py" | 7 script = "//tools/variations/fieldtrial_to_struct.py" |
8 | 8 |
9 if (is_win) { | 9 if (is_win) { |
10 source = "//testing/variations/fieldtrial_testing_config_win.json" | 10 platform = "win" |
11 } | 11 } |
12 if (is_mac) { | 12 if (is_mac) { |
13 source = "//testing/variations/fieldtrial_testing_config_mac.json" | 13 platform = "mac" |
14 } | 14 } |
15 if (is_linux) { | 15 if (is_linux) { |
16 source = "//testing/variations/fieldtrial_testing_config_linux.json" | 16 platform = "linux" |
17 } | 17 } |
18 if (is_chromeos) { | 18 if (is_chromeos) { |
19 source = "//testing/variations/fieldtrial_testing_config_chromeos.json" | 19 platform = "chromeos" |
20 } | 20 } |
21 if (is_android) { | 21 if (is_android) { |
22 source = "//testing/variations/fieldtrial_testing_config_android.json" | 22 platform = "android" |
23 } | 23 } |
24 if (is_ios) { | 24 if (is_ios) { |
25 source = "//testing/variations/fieldtrial_testing_config_ios.json" | 25 platform = "ios" |
26 } | 26 } |
27 | 27 |
| 28 source = "//testing/variations/fieldtrial_testing_config.json" |
| 29 |
28 inputs = [ | 30 inputs = [ |
29 "//tools/json_to_struct/element_generator.py", | 31 "//tools/json_to_struct/element_generator.py", |
30 "//tools/json_to_struct/json_to_struct.py", | 32 "//tools/json_to_struct/json_to_struct.py", |
31 "//tools/json_to_struct/struct_generator.py", | 33 "//tools/json_to_struct/struct_generator.py", |
32 source, | 34 source, |
33 ] | 35 ] |
34 out_name = "fieldtrial_testing_config" | 36 out_name = "fieldtrial_testing_config" |
35 outputs = [ | 37 outputs = [ |
36 "$target_gen_dir/$out_name.cc", | 38 "$target_gen_dir/$out_name.cc", |
37 "$target_gen_dir/$out_name.h", | 39 "$target_gen_dir/$out_name.h", |
38 ] | 40 ] |
39 | 41 |
40 args = [ | 42 args = [ |
41 rebase_path(source, root_build_dir), | 43 rebase_path(source, root_build_dir), |
42 "--destbase=" + rebase_path(target_gen_dir, root_build_dir), | 44 "--destbase=" + rebase_path(target_gen_dir, root_build_dir), |
43 "--namespace=chrome_variations", | 45 "--namespace=chrome_variations", |
44 "--schema=" + | 46 "--schema=" + |
45 rebase_path("fieldtrial_testing_config_schema.json", root_build_dir), | 47 rebase_path("fieldtrial_testing_config_schema.json", root_build_dir), |
| 48 "--platform=" + platform, |
46 "--output=$out_name", | 49 "--output=$out_name", |
47 ] | 50 ] |
48 } | 51 } |
49 | 52 |
50 source_set("fieldtrial_testing_config") { | 53 source_set("fieldtrial_testing_config") { |
51 sources = get_target_outputs(":fieldtrial_testing_config_action") | 54 sources = get_target_outputs(":fieldtrial_testing_config_action") |
52 deps = [ | 55 deps = [ |
53 ":fieldtrial_testing_config_action", | 56 ":fieldtrial_testing_config_action", |
54 ] | 57 ] |
55 } | 58 } |
OLD | NEW |