blob: 0c8a9c6b61e17e3e135973d8799f1dff31878b56 [file] [log] [blame]
Andrew Walbranbc342d42019-02-05 16:56:02 +00001# Copyright 2019 The Hafnium Authors.
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# https://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
15import("//build/image/image.gni")
16
17executable("test_binary") {
18 testonly = true
19 sources = [
20 "linux.c",
21 ]
22 deps = [
23 "//test/hftest:hftest_linux",
24 ]
25 output_name = "test_binary"
26}
27
28linux_initrd("linux_test_initrd") {
29 testonly = true
30 sources = [
31 get_label_info(":test_binary(//build/toolchain:aarch64_linux_clang)",
32 "root_out_dir") + "/test_binary",
33 get_label_info("//driver:linux", "target_out_dir") + "/linux/hafnium.ko",
34 ]
35 deps = [
36 ":test_binary(//build/toolchain:aarch64_linux_clang)",
37 "//driver:linux",
38 ]
39}
40
41initrd("linux_test") {
42 testonly = true
43
44 primary_vm_prebuilt = "//prebuilts/linux-aarch64/linux/vmlinuz"
45 primary_initrd = ":linux_test_initrd"
46}
47
48group("linux") {
49 testonly = true
50
51 deps = [
52 ":linux_test",
53 ]
54}