Andrew Scull | 1883487 | 2018-10-12 11:48:09 +0100 | [diff] [blame^] | 1 | # Copyright 2018 Google LLC |
| 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 | |
Andrew Scull | af5e53e | 2018-07-23 19:19:46 +0100 | [diff] [blame] | 15 | import("//build/image/image.gni") |
Andrew Scull | a158e91 | 2018-07-16 11:32:13 +0100 | [diff] [blame] | 16 | |
Andrew Scull | 04502e4 | 2018-09-03 14:54:52 +0100 | [diff] [blame] | 17 | group("tests") { |
| 18 | testonly = true |
| 19 | |
| 20 | deps = [ |
| 21 | ":unit_tests", |
| 22 | ":vm_tests", |
| 23 | ] |
| 24 | } |
| 25 | |
| 26 | group("unit_tests") { |
| 27 | testonly = true |
| 28 | |
| 29 | deps = [ |
| 30 | "//src:unit_tests($mock_toolchain)", |
| 31 | ] |
| 32 | } |
| 33 | |
| 34 | group("vm_tests") { |
Andrew Scull | af5e53e | 2018-07-23 19:19:46 +0100 | [diff] [blame] | 35 | testonly = true |
| 36 | |
| 37 | deps = [ |
| 38 | ":hypervisor", |
Andrew Scull | 4b6c2fc | 2018-10-05 18:14:02 +0100 | [diff] [blame] | 39 | "//test/vm/:primary_only_test($arch_toolchain)", |
| 40 | "//test/vm/:primary_with_secondaries_test($arch_toolchain)", |
Andrew Scull | af5e53e | 2018-07-23 19:19:46 +0100 | [diff] [blame] | 41 | ] |
| 42 | } |
| 43 | |
| 44 | group("hypervisor") { |
Andrew Scull | a158e91 | 2018-07-16 11:32:13 +0100 | [diff] [blame] | 45 | deps = [ |
| 46 | ":hafnium($arch_toolchain)", |
| 47 | ] |
| 48 | } |
| 49 | |
Andrew Scull | a158e91 | 2018-07-16 11:32:13 +0100 | [diff] [blame] | 50 | # Only build the image for the arch |
| 51 | if (current_toolchain == arch_toolchain) { |
| 52 | hypervisor("hafnium") { |
| 53 | deps = [ |
| 54 | "//src", |
| 55 | "//src/arch/${arch}", |
| 56 | ] |
| 57 | } |
| 58 | } |