martijn | d369e670 | 2017-03-21 18:36:45 | [diff] [blame] | 1 | # Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | import("//build/compiled_action.gni") |
| 6 | |
Martijn Croonen | b1383da | 2017-10-11 11:56:35 | [diff] [blame^] | 7 | # Generates a header file based on the real preload list. |
Martijn Croonen | 526c7ebb | 2017-05-24 17:32:22 | [diff] [blame] | 8 | compiled_action("generate_transport_security_state") { |
| 9 | tool = "//net/tools/transport_security_state_generator" |
| 10 | |
| 11 | # Inputs in order expected by the command line of the tool. |
| 12 | inputs = [ |
| 13 | "transport_security_state_static.json", |
| 14 | "transport_security_state_static.pins", |
| 15 | "transport_security_state_static.template", |
| 16 | ] |
| 17 | outputs = [ |
| 18 | "$target_gen_dir/transport_security_state_static.h", |
| 19 | ] |
| 20 | args = |
| 21 | rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir) |
| 22 | } |
| 23 | |
Martijn Croonen | b1383da | 2017-10-11 11:56:35 | [diff] [blame^] | 24 | # Generates a header file for use in unittests. |
| 25 | compiled_action("transport_security_state_unittest_data_default") { |
| 26 | tool = "//net/tools/transport_security_state_generator" |
| 27 | |
| 28 | # Inputs in order expected by the command line of the tool. |
| 29 | inputs = [ |
| 30 | "transport_security_state_static_unittest_default.json", |
| 31 | "transport_security_state_static_unittest_default.pins", |
| 32 | "transport_security_state_static_unittest.template", |
| 33 | ] |
| 34 | outputs = [ |
| 35 | "$target_gen_dir/transport_security_state_static_unittest_default.h", |
| 36 | ] |
| 37 | args = |
| 38 | rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir) |
| 39 | } |
| 40 | |
| 41 | # Generates a number of header files that are used by integration tests for the |
| 42 | # generation process and preload format. |
martijn | d369e670 | 2017-03-21 18:36:45 | [diff] [blame] | 43 | compiled_action_foreach("transport_security_state_unittest_data") { |
| 44 | tool = "//net/tools/transport_security_state_generator" |
| 45 | sources = [ |
martijn | d369e670 | 2017-03-21 18:36:45 | [diff] [blame] | 46 | "transport_security_state_static_unittest1.json", |
| 47 | "transport_security_state_static_unittest2.json", |
| 48 | "transport_security_state_static_unittest3.json", |
| 49 | ] |
| 50 | |
| 51 | # Inputs in order expected by the command line of the tool. |
| 52 | inputs = [ |
| 53 | "transport_security_state_static_unittest.pins", |
| 54 | "transport_security_state_static_unittest.template", |
| 55 | ] |
| 56 | outputs = [ |
| 57 | "$target_gen_dir/{{source_name_part}}.h", |
| 58 | ] |
| 59 | args = |
| 60 | [ rebase_path("{{source_name_part}}.json", root_build_dir) ] + |
| 61 | rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir) |
| 62 | } |