blob: fe4b8b5a2699713f3f2348d0941141660c80d8c4 [file] [log] [blame]
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
kernel_version = "5.4"
java_test_host {
name: "VirtHostTestCases",
srcs: [ "java/**/*.java" ],
test_suites: [
"general-tests",
],
libs: [
"tradefed",
],
java_resources: [
":virt-host-test-host",
":virt-host-test-kernel-arm64",
":virt-host-test-initramfs-arm64",
],
}
genrule_defaults {
name: "virt-host-test-kernel-defaults",
tools: [ "lz4" ],
cmd: "$(location lz4) -d $(in) $(out)",
}
genrule {
name: "virt-host-test-kernel-arm64",
defaults: [ "virt-host-test-kernel-defaults" ],
srcs: [ ":cf-kernel-" + kernel_version + "-arm64" ],
out: [ "kernel_arm64-v8a" ],
}
genrule {
name: "virt-host-test-initramfs-generic",
tools: [ "mkbootfs" ],
tool_files: [ "scripts/build_initramfs.sh" ],
srcs: [ ":virt-host-test-guest" ],
cmd: "GEN_DIR=$(genDir) " +
"OUT=$(out) " +
"MKBOOTFS=$(location mkbootfs) " +
"$(location scripts/build_initramfs.sh) $(in)",
out: [ "initramfs_generic.cpio" ],
}
genrule {
name: "virt-host-test-initramfs-arm64",
srcs: [
":cf-initramfs-" + kernel_version + "-arm64",
":virt-host-test-initramfs-generic",
],
out: [ "initramfs_arm64-v8a.cpio" ],
tools: [ "lz4" ],
tool_files: [ "scripts/concat_initramfs.sh" ],
cmd: "OUT=$(out) " +
"LZ4=$(location lz4) " +
"$(location scripts/concat_initramfs.sh) $(in)",
}