blob: 8f2d4bc70fa0f22108f9d43a96e230fbfd0500d4 [file] [log] [blame]
// 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, thus auto_gen_config:false below.
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
},
},
auto_gen_config: false,
test_suites: ["general-tests", "pts", "vts"],
gtest: false,
}
java_library_host {
name: "block_device_writer_jar",
srcs: ["src/**/*.java"],
libs: ["tradefed", "junit"],
}