blob: 498028d605177ce1a218d3fd547459f36df766b2 [file] [log] [blame]
Armelle Laine4c9d64a2024-11-20 04:42:35 +00001// Copyright (C) 2024 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17 default_team: "trendy_team_trusty",
18}
19
20// python -c "import hashlib; print(hashlib.sha256(b'trusty_test_vm_salt').hexdigest())"
21trusty_test_vm_salt = "5ce3eab1a08540e1334c83f54b8608aa6c23feee6939693cac41441449c5a51f"
22
23TRUSTY_TEST_VM_VERSION = 1
24
25avb_add_hash_footer {
26 name: "trusty_test_vm_signed",
27 filename: "trusty_test_vm_signed",
28 partition_name: "boot",
29 private_key: ":trusty_vm_sign_key",
30 salt: trusty_test_vm_salt,
31 rollback_index: TRUSTY_TEST_VM_VERSION,
32 src: ":empty_file",
33 enabled: false,
34 arch: {
35 x86_64: {
36 src: ":trusty-test-lk.elf",
37 enabled: true,
38 },
39 },
40}
41
42prebuilt_etc {
43 name: "trusty_test_vm_config",
44 enabled: false,
45 arch: {
46 x86_64: {
47 src: "vm_config_lk_x86_64.json",
48 enabled: true,
49 },
50 },
51 filename: "trusty-test_vm-config.json",
52}
53
Orlando Arbildo0347f9d2025-01-29 20:14:21 +000054prebuilt_etc {
55 name: "trusty_vm_launcher_sh",
56 enabled: false,
57 arch: {
58 x86_64: {
59 src: "trusty-vm-launcher.sh",
60 enabled: true,
61 },
62 },
63 filename: "trusty-vm-launcher.sh",
64}
65
66prebuilt_etc {
67 name: "trusty_wait_ready_sh",
68 enabled: false,
69 arch: {
70 x86_64: {
71 src: "trusty-wait-ready.sh",
72 enabled: true,
73 },
74 },
75 filename: "trusty-wait-ready.sh",
76}
77
Armelle Laine4c9d64a2024-11-20 04:42:35 +000078sh_test {
79 name: "TrustyTestVM_UnitTests",
80 src: "trusty-ut-ctrl.sh",
81 filename_from_src: true,
82 data: [
83 ":trusty_test_vm_signed",
84 ":trusty_test_vm_config",
85 "trusty-vm-launcher.sh",
86 "trusty-wait-ready.sh",
87 ],
88 // TODO(b/378367793) use the AndroidTest.xml generated from the trusty
89 // test-map for test_vm payload
90 test_config_template: "AndroidTest.xml",
91 test_suites: [
92 "general-tests",
93 ],
94 enabled: false,
95 arch: {
96 x86_64: {
97 enabled: true,
98 },
99 },
100}