OSDN Git Service

Update tests for enforcing minor version upgrade.
authorYifan Hong <elsk@google.com>
Wed, 15 Feb 2017 23:18:19 +0000 (15:18 -0800)
committerSteven Moreland <smoreland@google.com>
Thu, 16 Feb 2017 06:11:39 +0000 (06:11 +0000)
Test: ./hardware/interfaces/update-makefiles.sh
Test: mma

Bug: 28825532

Change-Id: I1ae86f597f184d75ad5476b248e03248346b0c33

tests/versioning/2.3/Android.bp
tests/versioning/2.3/Android.mk
tests/versioning/2.3/IBar.hal
tests/versioning/2.3/IBaz.hal [new file with mode: 0644]
tests/versioning/2.3/IFoo.hal

index e48ed94..3cc2076 100644 (file)
@@ -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",
     ],
 }
index 4b51160..68e6be4 100644 (file)
@@ -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
index 946d42e..fe38e76 100644 (file)
@@ -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 (file)
index 0000000..e28792c
--- /dev/null
@@ -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 {
+
+};
index c450dd2..2c76500 100644 (file)
@@ -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 {
 
 };