Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8c7ab74 authored by Yifan Hong's avatar Yifan Hong Committed by Gerrit Code Review
Browse files

Merge "Test for getHashChain() in IBase."

parents 177171f3 604e8f0d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@ subdirs = [
    "foo/1.0",
    "foo/1.0/default",
    "foo/1.0/default/lib",
    "hash/1.0",
    "hash/1.0/default",
    "inheritance/1.0",
    "inheritance/1.0/default",
    "libhwbinder/1.0",
+59 −0
Original line number Diff line number Diff line
// This file is autogenerated by hidl-gen. Do not edit manually.

filegroup {
    name: "android.hardware.tests.hash@1.0_hal",
    srcs: [
        "IHash.hal",
    ],
}

genrule {
    name: "android.hardware.tests.hash@1.0_genc++",
    tools: ["hidl-gen"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.hash@1.0",
    srcs: [
        ":android.hardware.tests.hash@1.0_hal",
    ],
    out: [
        "android/hardware/tests/hash/1.0/HashAll.cpp",
    ],
}

genrule {
    name: "android.hardware.tests.hash@1.0_genc++_headers",
    tools: ["hidl-gen"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.hash@1.0",
    srcs: [
        ":android.hardware.tests.hash@1.0_hal",
    ],
    out: [
        "android/hardware/tests/hash/1.0/IHash.h",
        "android/hardware/tests/hash/1.0/IHwHash.h",
        "android/hardware/tests/hash/1.0/BnHwHash.h",
        "android/hardware/tests/hash/1.0/BpHwHash.h",
        "android/hardware/tests/hash/1.0/BsHash.h",
    ],
}

cc_library_shared {
    name: "android.hardware.tests.hash@1.0",
    generated_sources: ["android.hardware.tests.hash@1.0_genc++"],
    generated_headers: ["android.hardware.tests.hash@1.0_genc++_headers"],
    export_generated_headers: ["android.hardware.tests.hash@1.0_genc++_headers"],
    shared_libs: [
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "liblog",
        "libutils",
        "libcutils",
        "android.hidl.base@1.0",
    ],
    export_shared_lib_headers: [
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "libutils",
        "android.hidl.base@1.0",
    ],
}
+76 −0
Original line number Diff line number Diff line
# This file is autogenerated by hidl-gen. Do not edit manually.

LOCAL_PATH := $(call my-dir)

################################################################################

include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.tests.hash@1.0-java
LOCAL_MODULE_CLASS := JAVA_LIBRARIES

intermediates := $(call local-generated-sources-dir, COMMON)

HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)

LOCAL_JAVA_LIBRARIES := \
    android.hidl.base@1.0-java \


#
# Build IHash.hal
#
GEN := $(intermediates)/android/hardware/tests/hash/V1_0/IHash.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IHash.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.tests.hash@1.0::IHash

$(GEN): $(LOCAL_PATH)/IHash.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)
include $(BUILD_JAVA_LIBRARY)


################################################################################

include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.tests.hash@1.0-java-static
LOCAL_MODULE_CLASS := JAVA_LIBRARIES

intermediates := $(call local-generated-sources-dir, COMMON)

HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)

LOCAL_STATIC_JAVA_LIBRARIES := \
    android.hidl.base@1.0-java-static \


#
# Build IHash.hal
#
GEN := $(intermediates)/android/hardware/tests/hash/V1_0/IHash.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IHash.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.tests.hash@1.0::IHash

$(GEN): $(LOCAL_PATH)/IHash.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)
include $(BUILD_STATIC_JAVA_LIBRARY)



include $(call all-makefiles-under,$(LOCAL_PATH))
+32 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 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.
 */

package android.hardware.tests.hash@1.0;

/**
 * Test interface for hashing HAL files.
 * This file is FREEZED to ensure its hash doesn't change.
 */
interface IHash {
    /**
     * Dummy.
     */
    dummy();
    /**
     * Dummy.
     */
    functions();
};
+15 −0
Original line number Diff line number Diff line
cc_library_shared {
    name: "android.hardware.tests.hash@1.0-impl",
    relative_install_path: "hw",
    proprietary: true,
    srcs: [
        "Hash.cpp",
    ],
    shared_libs: [
        "libhidlbase",
        "libhidltransport",
        "libutils",
        "android.hardware.tests.hash@1.0",
        "android.hidl.base@1.0",
    ],
}
Loading