mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
graphics: add gralloc tests to VTS
Test: vts-tradefed run vts -m HalGraphicsAllocatorHidlTargetTest Test: vts-tradefed run vts -m HalGraphicsMapperHidlTargetTest Change-Id: I35e03b42e693da1bd3cfc6beac2a64771e0b8ed9
This commit is contained in:
19
graphics/Android.mk
Normal file
19
graphics/Android.mk
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Copyright (C) 2016 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.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(call all-subdir-makefiles)
|
||||
19
graphics/allocator/2.0/Android.mk
Normal file
19
graphics/allocator/2.0/Android.mk
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Copyright (C) 2016 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.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(call all-subdir-makefiles)
|
||||
169
graphics/allocator/2.0/vts/AllocatorClient.vts
Normal file
169
graphics/allocator/2.0/vts/AllocatorClient.vts
Normal file
@@ -0,0 +1,169 @@
|
||||
component_class: HAL_HIDL
|
||||
component_type_version: 2.0
|
||||
component_name: "IAllocatorClient"
|
||||
|
||||
package: "android.hardware.graphics.allocator"
|
||||
|
||||
import: "android.hardware.graphics.allocator@2.0::types"
|
||||
import: "android.hardware.graphics.common@1.0::types"
|
||||
|
||||
interface: {
|
||||
attribute: {
|
||||
name: "::android::hardware::graphics::allocator::V2_0::IAllocatorClient::BufferDescriptorInfo"
|
||||
type: TYPE_STRUCT
|
||||
struct_value: {
|
||||
name: "width"
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint32_t"
|
||||
}
|
||||
struct_value: {
|
||||
name: "height"
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint32_t"
|
||||
}
|
||||
struct_value: {
|
||||
name: "layerCount"
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint32_t"
|
||||
}
|
||||
struct_value: {
|
||||
name: "format"
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::common::V1_0::PixelFormat"
|
||||
}
|
||||
struct_value: {
|
||||
name: "producerUsageMask"
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
struct_value: {
|
||||
name: "consumerUsageMask"
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "createDescriptor"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
return_type_hidl: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_STRUCT
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::IAllocatorClient::BufferDescriptorInfo"
|
||||
}
|
||||
callflow: {
|
||||
entry: true
|
||||
}
|
||||
callflow: {
|
||||
next: "*"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "destroyDescriptor"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
callflow: {
|
||||
exit: true
|
||||
}
|
||||
callflow: {
|
||||
next: "*"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "testAllocate"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_VECTOR
|
||||
vector_value: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
}
|
||||
callflow: {
|
||||
next: "allocate"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "allocate"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
return_type_hidl: {
|
||||
type: TYPE_VECTOR
|
||||
vector_value: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_VECTOR
|
||||
vector_value: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
}
|
||||
callflow: {
|
||||
next: "exportHandle"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "free"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
callflow: {
|
||||
exit: true
|
||||
}
|
||||
callflow: {
|
||||
next: "*"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "exportHandle"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
return_type_hidl: {
|
||||
type: TYPE_HANDLE
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
callflow: {
|
||||
next: "free"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
19
graphics/allocator/2.0/vts/Android.mk
Normal file
19
graphics/allocator/2.0/vts/Android.mk
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Copyright (C) 2016 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.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(LOCAL_PATH)/functional/vts/testcases/hal/graphics/allocator/hidl/target/Android.mk
|
||||
@@ -31,7 +31,11 @@ cc_test {
|
||||
],
|
||||
static_libs: ["libgtest"],
|
||||
cflags: [
|
||||
"--coverage",
|
||||
"-O0",
|
||||
"-g",
|
||||
],
|
||||
ldflags: [
|
||||
"--coverage",
|
||||
],
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#
|
||||
# Copyright (C) 2016 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.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(call all-subdir-makefiles)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := HalGraphicsAllocatorHidlTargetTest
|
||||
VTS_CONFIG_SRC_DIR := testcases/hal/graphics/allocator/hidl/target
|
||||
include test/vts/tools/build/Android.host_config.mk
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2016 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.
|
||||
-->
|
||||
<configuration description="Config for VTS Graphics Allocator HIDL HAL's basic target-side test cases">
|
||||
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
|
||||
<option name="push-group" value="HidlHalTest.push" />
|
||||
</target_preparer>
|
||||
<target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
|
||||
<test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
|
||||
<option name="test-module-name" value="HalGraphicsAllocatorHidlTargetTest" />
|
||||
<option name="binary-test-sources" value="
|
||||
_32bit::DATA/nativetest/graphics_allocator_hidl_hal_test/graphics_allocator_hidl_hal_test,
|
||||
_64bit::DATA/nativetest64/graphics_allocator_hidl_hal_test/graphics_allocator_hidl_hal_test,
|
||||
" />
|
||||
<option name="binary-test-type" value="gtest" />
|
||||
<option name="test-timeout" value="1m" />
|
||||
</test>
|
||||
</configuration>
|
||||
19
graphics/allocator/Android.mk
Normal file
19
graphics/allocator/Android.mk
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Copyright (C) 2016 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.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(call all-subdir-makefiles)
|
||||
19
graphics/mapper/2.0/Android.mk
Normal file
19
graphics/mapper/2.0/Android.mk
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Copyright (C) 2016 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.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(call all-subdir-makefiles)
|
||||
19
graphics/mapper/2.0/vts/Android.mk
Normal file
19
graphics/mapper/2.0/vts/Android.mk
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Copyright (C) 2016 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.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(LOCAL_PATH)/functional/vts/testcases/hal/graphics/mapper/hidl/target/Android.mk
|
||||
280
graphics/mapper/2.0/vts/Mapper.vts
Normal file
280
graphics/mapper/2.0/vts/Mapper.vts
Normal file
@@ -0,0 +1,280 @@
|
||||
component_class: HAL_HIDL
|
||||
component_type_version: 2.0
|
||||
component_name: "IMapper"
|
||||
|
||||
package: "android.hardware.graphics.mapper"
|
||||
|
||||
import: "android.hardware.graphics.allocator@2.0::types"
|
||||
import: "android.hardware.graphics.common@1.0::types"
|
||||
import: "android.hardware.graphics.mapper@2.0::types"
|
||||
|
||||
interface: {
|
||||
attribute: {
|
||||
name: "::android::hardware::graphics::mapper::V2_0::IMapper::Rect"
|
||||
type: TYPE_STRUCT
|
||||
struct_value: {
|
||||
name: "left"
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "int32_t"
|
||||
}
|
||||
struct_value: {
|
||||
name: "top"
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "int32_t"
|
||||
}
|
||||
struct_value: {
|
||||
name: "width"
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "int32_t"
|
||||
}
|
||||
struct_value: {
|
||||
name: "height"
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "int32_t"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "retain"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_HANDLE
|
||||
}
|
||||
callflow: {
|
||||
entry: true
|
||||
}
|
||||
callflow: {
|
||||
next: "*"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "release"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_HANDLE
|
||||
}
|
||||
callflow: {
|
||||
exit: true
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "getDimensions"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
return_type_hidl: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint32_t"
|
||||
}
|
||||
return_type_hidl: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint32_t"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_HANDLE
|
||||
}
|
||||
callflow: {
|
||||
next: "*"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "getFormat"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::common::V1_0::PixelFormat"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_HANDLE
|
||||
}
|
||||
callflow: {
|
||||
next: "*"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "getLayerCount"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
return_type_hidl: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint32_t"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_HANDLE
|
||||
}
|
||||
callflow: {
|
||||
next: "*"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "getProducerUsageMask"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
return_type_hidl: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_HANDLE
|
||||
}
|
||||
callflow: {
|
||||
next: "*"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "getConsumerUsageMask"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
return_type_hidl: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_HANDLE
|
||||
}
|
||||
callflow: {
|
||||
next: "*"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "getBackingStore"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
return_type_hidl: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_HANDLE
|
||||
}
|
||||
callflow: {
|
||||
next: "*"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "getStride"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
return_type_hidl: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint32_t"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_HANDLE
|
||||
}
|
||||
callflow: {
|
||||
next: "*"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "lock"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
return_type_hidl: {
|
||||
type: TYPE_POINTER
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_HANDLE
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_STRUCT
|
||||
predefined_type: "::android::hardware::graphics::mapper::V2_0::IMapper::Rect"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_HANDLE
|
||||
}
|
||||
callflow: {
|
||||
next: "unlock"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "lockFlex"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
return_type_hidl: {
|
||||
type: TYPE_STRUCT
|
||||
predefined_type: "::android::hardware::graphics::mapper::V2_0::FlexLayout"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_HANDLE
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "uint64_t"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_STRUCT
|
||||
predefined_type: "::android::hardware::graphics::mapper::V2_0::IMapper::Rect"
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_HANDLE
|
||||
}
|
||||
callflow: {
|
||||
next: "unlock"
|
||||
}
|
||||
}
|
||||
|
||||
api: {
|
||||
name: "unlock"
|
||||
return_type_hidl: {
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
|
||||
}
|
||||
return_type_hidl: {
|
||||
type: TYPE_HANDLE
|
||||
}
|
||||
arg: {
|
||||
type: TYPE_HANDLE
|
||||
}
|
||||
callflow: {
|
||||
next: "*"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -33,7 +33,11 @@ cc_test {
|
||||
],
|
||||
static_libs: ["libgtest"],
|
||||
cflags: [
|
||||
"--coverage",
|
||||
"-O0",
|
||||
"-g",
|
||||
],
|
||||
ldflags: [
|
||||
"--coverage",
|
||||
],
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#
|
||||
# Copyright (C) 2016 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.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(call all-subdir-makefiles)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := HalGraphicsMapperHidlTargetTest
|
||||
VTS_CONFIG_SRC_DIR := testcases/hal/graphics/mapper/hidl/target
|
||||
include test/vts/tools/build/Android.host_config.mk
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2016 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.
|
||||
-->
|
||||
<configuration description="Config for VTS Graphics Mapper HIDL HAL's basic target-side test cases">
|
||||
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.VtsFilePusher">
|
||||
<option name="push-group" value="HidlHalTest.push" />
|
||||
</target_preparer>
|
||||
<target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer" />
|
||||
<test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
|
||||
<option name="test-module-name" value="HalGraphicsMapperHidlTargetTest" />
|
||||
<option name="binary-test-sources" value="
|
||||
_32bit::DATA/nativetest/graphics_mapper_hidl_hal_test/graphics_mapper_hidl_hal_test,
|
||||
_64bit::DATA/nativetest64/graphics_mapper_hidl_hal_test/graphics_mapper_hidl_hal_test,
|
||||
" />
|
||||
<option name="binary-test-type" value="gtest" />
|
||||
<option name="test-timeout" value="1m" />
|
||||
</test>
|
||||
</configuration>
|
||||
139
graphics/mapper/2.0/vts/types.vts
Normal file
139
graphics/mapper/2.0/vts/types.vts
Normal file
@@ -0,0 +1,139 @@
|
||||
component_class: HAL_HIDL
|
||||
component_type_version: 2.0
|
||||
component_name: "types"
|
||||
|
||||
package: "android.hardware.graphics.mapper"
|
||||
|
||||
|
||||
attribute: {
|
||||
name: "::android::hardware::graphics::mapper::V2_0::FlexComponent"
|
||||
type: TYPE_ENUM
|
||||
enum_value: {
|
||||
scalar_type: "int32_t"
|
||||
|
||||
enumerator: "Y"
|
||||
scalar_value: {
|
||||
int32_t: 1
|
||||
}
|
||||
enumerator: "CB"
|
||||
scalar_value: {
|
||||
int32_t: 2
|
||||
}
|
||||
enumerator: "CR"
|
||||
scalar_value: {
|
||||
int32_t: 4
|
||||
}
|
||||
enumerator: "R"
|
||||
scalar_value: {
|
||||
int32_t: 1024
|
||||
}
|
||||
enumerator: "G"
|
||||
scalar_value: {
|
||||
int32_t: 2048
|
||||
}
|
||||
enumerator: "B"
|
||||
scalar_value: {
|
||||
int32_t: 4096
|
||||
}
|
||||
enumerator: "A"
|
||||
scalar_value: {
|
||||
int32_t: 1073741824
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
attribute: {
|
||||
name: "::android::hardware::graphics::mapper::V2_0::FlexFormat"
|
||||
type: TYPE_ENUM
|
||||
enum_value: {
|
||||
scalar_type: "int32_t"
|
||||
|
||||
enumerator: "INVALID"
|
||||
scalar_value: {
|
||||
int32_t: 0
|
||||
}
|
||||
enumerator: "Y"
|
||||
scalar_value: {
|
||||
int32_t: 1
|
||||
}
|
||||
enumerator: "YCBCR"
|
||||
scalar_value: {
|
||||
int32_t: 7
|
||||
}
|
||||
enumerator: "YCBCRA"
|
||||
scalar_value: {
|
||||
int32_t: 1073741831
|
||||
}
|
||||
enumerator: "RGB"
|
||||
scalar_value: {
|
||||
int32_t: 7168
|
||||
}
|
||||
enumerator: "RGBA"
|
||||
scalar_value: {
|
||||
int32_t: 1073748992
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
attribute: {
|
||||
name: "::android::hardware::graphics::mapper::V2_0::FlexPlane"
|
||||
type: TYPE_STRUCT
|
||||
struct_value: {
|
||||
name: "topLeft"
|
||||
type: TYPE_POINTER
|
||||
}
|
||||
struct_value: {
|
||||
name: "component"
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::mapper::V2_0::FlexComponent"
|
||||
}
|
||||
struct_value: {
|
||||
name: "bitsPerComponent"
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "int32_t"
|
||||
}
|
||||
struct_value: {
|
||||
name: "bitsUsed"
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "int32_t"
|
||||
}
|
||||
struct_value: {
|
||||
name: "hIncrement"
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "int32_t"
|
||||
}
|
||||
struct_value: {
|
||||
name: "vIncrement"
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "int32_t"
|
||||
}
|
||||
struct_value: {
|
||||
name: "hSubsampling"
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "int32_t"
|
||||
}
|
||||
struct_value: {
|
||||
name: "vSubsampling"
|
||||
type: TYPE_SCALAR
|
||||
scalar_type: "int32_t"
|
||||
}
|
||||
}
|
||||
|
||||
attribute: {
|
||||
name: "::android::hardware::graphics::mapper::V2_0::FlexLayout"
|
||||
type: TYPE_STRUCT
|
||||
struct_value: {
|
||||
name: "format"
|
||||
type: TYPE_ENUM
|
||||
predefined_type: "::android::hardware::graphics::mapper::V2_0::FlexFormat"
|
||||
}
|
||||
struct_value: {
|
||||
name: "planes"
|
||||
type: TYPE_VECTOR
|
||||
vector_value: {
|
||||
type: TYPE_STRUCT
|
||||
predefined_type: "::android::hardware::graphics::mapper::V2_0::FlexPlane"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
19
graphics/mapper/Android.mk
Normal file
19
graphics/mapper/Android.mk
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Copyright (C) 2016 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.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(call all-subdir-makefiles)
|
||||
Reference in New Issue
Block a user