diff options
author | Yifan Hong <elsk@google.com> | 2017-02-15 15:18:19 -0800 |
---|---|---|
committer | Steven Moreland <smoreland@google.com> | 2017-02-16 06:11:39 +0000 |
commit | 6283d249f948d41640658db417ba987b26e0378a (patch) | |
tree | 8fc6892076e629e9bb49b7a4b19b40b8599a6b1e /tests/versioning | |
parent | dcec84e96c28066fd00c778334cfb8fb5d156ad0 (diff) | |
download | platform_hardware_interfaces-6283d249f948d41640658db417ba987b26e0378a.tar.gz platform_hardware_interfaces-6283d249f948d41640658db417ba987b26e0378a.tar.bz2 platform_hardware_interfaces-6283d249f948d41640658db417ba987b26e0378a.zip |
Update tests for enforcing minor version upgrade.
Test: ./hardware/interfaces/update-makefiles.sh
Test: mma
Bug: 28825532
Change-Id: I1ae86f597f184d75ad5476b248e03248346b0c33
Diffstat (limited to 'tests/versioning')
-rw-r--r-- | tests/versioning/2.3/Android.bp | 11 | ||||
-rw-r--r-- | tests/versioning/2.3/Android.mk | 40 | ||||
-rw-r--r-- | tests/versioning/2.3/IBar.hal | 2 | ||||
-rw-r--r-- | tests/versioning/2.3/IBaz.hal | 23 | ||||
-rw-r--r-- | tests/versioning/2.3/IFoo.hal | 2 |
5 files changed, 76 insertions, 2 deletions
diff --git a/tests/versioning/2.3/Android.bp b/tests/versioning/2.3/Android.bp index e48ed949d1..3cc207646d 100644 --- a/tests/versioning/2.3/Android.bp +++ b/tests/versioning/2.3/Android.bp @@ -4,6 +4,7 @@ filegroup { name: "android.hardware.tests.versioning@2.3_hal", srcs: [ "IBar.hal", + "IBaz.hal", "IFoo.hal", ], } @@ -17,6 +18,7 @@ genrule { ], out: [ "android/hardware/tests/versioning/2.3/BarAll.cpp", + "android/hardware/tests/versioning/2.3/BazAll.cpp", "android/hardware/tests/versioning/2.3/FooAll.cpp", ], } @@ -34,6 +36,11 @@ genrule { "android/hardware/tests/versioning/2.3/BnHwBar.h", "android/hardware/tests/versioning/2.3/BpHwBar.h", "android/hardware/tests/versioning/2.3/BsBar.h", + "android/hardware/tests/versioning/2.3/IBaz.h", + "android/hardware/tests/versioning/2.3/IHwBaz.h", + "android/hardware/tests/versioning/2.3/BnHwBaz.h", + "android/hardware/tests/versioning/2.3/BpHwBaz.h", + "android/hardware/tests/versioning/2.3/BsBaz.h", "android/hardware/tests/versioning/2.3/IFoo.h", "android/hardware/tests/versioning/2.3/IHwFoo.h", "android/hardware/tests/versioning/2.3/BnHwFoo.h", @@ -54,13 +61,17 @@ cc_library_shared { "liblog", "libutils", "libcutils", + "android.hardware.tests.versioning@1.0", "android.hardware.tests.versioning@2.2", + "android.hidl.base@1.0", ], export_shared_lib_headers: [ "libhidlbase", "libhidltransport", "libhwbinder", "libutils", + "android.hardware.tests.versioning@1.0", "android.hardware.tests.versioning@2.2", + "android.hidl.base@1.0", ], } diff --git a/tests/versioning/2.3/Android.mk b/tests/versioning/2.3/Android.mk index 4b511606cf..68e6be46b9 100644 --- a/tests/versioning/2.3/Android.mk +++ b/tests/versioning/2.3/Android.mk @@ -13,6 +13,7 @@ intermediates := $(call local-generated-sources-dir, COMMON) HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX) LOCAL_JAVA_LIBRARIES := \ + android.hardware.tests.versioning@1.0-java \ android.hardware.tests.versioning@2.2-java \ android.hidl.base@1.0-java \ @@ -37,6 +38,25 @@ $(GEN): $(LOCAL_PATH)/IBar.hal LOCAL_GENERATED_SOURCES += $(GEN) # +# Build IBaz.hal +# +GEN := $(intermediates)/android/hardware/tests/versioning/V2_3/IBaz.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBaz.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.versioning@2.3::IBaz + +$(GEN): $(LOCAL_PATH)/IBaz.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) + +# # Build IFoo.hal # GEN := $(intermediates)/android/hardware/tests/versioning/V2_3/IFoo.java @@ -68,6 +88,7 @@ intermediates := $(call local-generated-sources-dir, COMMON) HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX) LOCAL_STATIC_JAVA_LIBRARIES := \ + android.hardware.tests.versioning@1.0-java-static \ android.hardware.tests.versioning@2.2-java-static \ android.hidl.base@1.0-java-static \ @@ -92,6 +113,25 @@ $(GEN): $(LOCAL_PATH)/IBar.hal LOCAL_GENERATED_SOURCES += $(GEN) # +# Build IBaz.hal +# +GEN := $(intermediates)/android/hardware/tests/versioning/V2_3/IBaz.java +$(GEN): $(HIDL) +$(GEN): PRIVATE_HIDL := $(HIDL) +$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBaz.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.versioning@2.3::IBaz + +$(GEN): $(LOCAL_PATH)/IBaz.hal + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN) + +# # Build IFoo.hal # GEN := $(intermediates)/android/hardware/tests/versioning/V2_3/IFoo.java diff --git a/tests/versioning/2.3/IBar.hal b/tests/versioning/2.3/IBar.hal index 946d42e06c..fe38e76a54 100644 --- a/tests/versioning/2.3/IBar.hal +++ b/tests/versioning/2.3/IBar.hal @@ -18,7 +18,7 @@ package android.hardware.tests.versioning@2.3; import @2.2::IBar; -// Must extend @2.3::IBar. +// Must extend @2.2::IBar. interface IBar extends @2.2::IBar { }; diff --git a/tests/versioning/2.3/IBaz.hal b/tests/versioning/2.3/IBaz.hal new file mode 100644 index 0000000000..e28792cc9d --- /dev/null +++ b/tests/versioning/2.3/IBaz.hal @@ -0,0 +1,23 @@ +/* + * 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. + */ + +package android.hardware.tests.versioning@2.3; + +import @1.0::IFoo; + +interface IBaz extends @1.0::IFoo { + +}; diff --git a/tests/versioning/2.3/IFoo.hal b/tests/versioning/2.3/IFoo.hal index c450dd294b..2c76500d6d 100644 --- a/tests/versioning/2.3/IFoo.hal +++ b/tests/versioning/2.3/IFoo.hal @@ -18,7 +18,7 @@ package android.hardware.tests.versioning@2.3; import @2.2::IFoo; -// Must extend @2.3::IFoo. +// Must extend @2.2::IFoo. interface IFoo extends @2.2::IFoo { }; |