VTS provides rootable environment for ApkVerityTest to run. ApkVerityTest needs to write block device to verify the failure case of fs-verity. Test: see ApkVerityTests and block_device_writer in `unzip -l out/host/linux-x86/vts-core/android-vts-core.zip` Bug: 150641206 Change-Id: Idc71907a28f68fc873c5cac940aa706e0b79843e
53 lines
1.9 KiB
Plaintext
53 lines
1.9 KiB
Plaintext
// Copyright (C) 2019 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.
|
|
|
|
// This is a cc_test just because it supports test_suites. This should be converted to something
|
|
// like cc_binary_test_helper once supported.
|
|
cc_test {
|
|
// Depending on how the test runs, the executable may be uploaded to different location.
|
|
// Before the bug in the file pusher is fixed, workaround by making the name unique.
|
|
// See b/124718249#comment12.
|
|
name: "block_device_writer_module",
|
|
stem: "block_device_writer",
|
|
|
|
srcs: ["block_device_writer.cpp"],
|
|
cflags: [
|
|
"-D_FILE_OFFSET_BITS=64",
|
|
"-Wall",
|
|
"-Werror",
|
|
"-Wextra",
|
|
"-g",
|
|
],
|
|
shared_libs: ["libbase", "libutils"],
|
|
// For some reasons, cuttlefish (x86) uses x86_64 test suites for testing. Unfortunately, when
|
|
// the uploader does not pick up the executable from correct output location. The following
|
|
// workaround allows the test to:
|
|
// * upload the 32-bit exectuable for both 32 and 64 bits devices to use
|
|
// * refer to the same executable name in Java
|
|
// * no need to force the Java test to be archiecture specific.
|
|
//
|
|
// See b/145573317 for details.
|
|
multilib: {
|
|
lib32: {
|
|
suffix: "",
|
|
},
|
|
lib64: {
|
|
suffix: "64", // not really used
|
|
},
|
|
},
|
|
|
|
test_suites: ["general-tests", "pts", "vts-core"],
|
|
gtest: false,
|
|
}
|