blob: 5060c376164c563cdb72b031401c36c2ee7dfa84 [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.
// A rule to collect apps for debugging purpose. See ApkVerityTestAppPrebuilt/README.md.
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
genrule {
name: "CtsApkVerityTestDebugFiles",
srcs: [
":CtsApkVerityTestApp",
":CtsApkVerityTestAppFsvSig",
":CtsApkVerityTestAppDm",
":CtsApkVerityTestAppDmFsvSig",
":CtsApkVerityTestAppSplit",
":CtsApkVerityTestAppSplitFsvSig",
":CtsApkVerityTestAppSplitDm",
":CtsApkVerityTestAppSplitDmFsvSig",
],
cmd: "echo $(in) > $(out)",
out: ["CtsApkVerityTestDebugFiles.txt"],
}
filegroup {
name: "CtsApkVerityTestAppDm",
srcs: ["CtsApkVerityTestApp.dm"],
}
filegroup {
name: "CtsApkVerityTestAppSplitDm",
srcs: ["CtsApkVerityTestAppSplit.dm"],
}
filegroup {
name: "fsverity-debug-key",
srcs: ["fsverity-debug-key.pem"],
}
filegroup {
name: "fsverity-debug-cert",
srcs: ["fsverity-debug.x509.pem"],
}
genrule_defaults {
name: "cts_apk_verity_sig_gen_default",
tools: ["fsverity"],
tool_files: [
":fsverity-debug-key",
":fsverity-debug-cert",
],
cmd: "$(location fsverity) sign $(in) $(out) " +
"--key=$(location :fsverity-debug-key) " +
"--cert=$(location :fsverity-debug-cert) " +
"> /dev/null",
}
genrule {
name: "CtsApkVerityTestAppFsvSig",
defaults: ["cts_apk_verity_sig_gen_default"],
srcs: [":CtsApkVerityTestApp"],
out: ["CtsApkVerityTestApp.apk.fsv_sig"],
}
genrule {
name: "CtsApkVerityTestAppDmFsvSig",
defaults: ["cts_apk_verity_sig_gen_default"],
srcs: [":CtsApkVerityTestAppDm"],
out: ["CtsApkVerityTestApp.dm.fsv_sig"],
}
genrule {
name: "CtsApkVerityTestAppSplitFsvSig",
defaults: ["cts_apk_verity_sig_gen_default"],
srcs: [":CtsApkVerityTestAppSplit"],
out: ["CtsApkVerityTestAppSplit.apk.fsv_sig"],
}
genrule {
name: "CtsApkVerityTestAppSplitDmFsvSig",
defaults: ["cts_apk_verity_sig_gen_default"],
srcs: [":CtsApkVerityTestAppSplitDm"],
out: ["CtsApkVerityTestAppSplit.dm.fsv_sig"],
}