Merge "Revert "Vehicle hal driver in vts""
diff --git a/sysfuzzer/vtscompiler/code_gen/driver/HalHidlCodeGen.cpp b/sysfuzzer/vtscompiler/code_gen/driver/HalHidlCodeGen.cpp
index 9370f01..e8f6938 100644
--- a/sysfuzzer/vtscompiler/code_gen/driver/HalHidlCodeGen.cpp
+++ b/sysfuzzer/vtscompiler/code_gen/driver/HalHidlCodeGen.cpp
@@ -219,6 +219,8 @@
<< "\n";
exit(-1);
}
+ } else if (return_type_hidl.type() == TYPE_HANDLE) {
+ out << "native_handle_t* ";
} else {
cerr << __func__ << ":" << __LINE__ << " ERROR unsupported type "
<< return_type_hidl.type() << " for " << api.name() << "\n";
@@ -248,6 +250,8 @@
out << GetCppVariableType(return_type_hidl, &message);
} else if (return_type_hidl.type() == TYPE_STRING) {
out << "::android::hardware::hidl_string";
+ } else if (return_type_hidl.type() == TYPE_HANDLE) {
+ out << "native_handle_t* ";
} else {
cerr << __func__ << ":" << __LINE__ << " ERROR unsupported type "
<< return_type_hidl.type() << " for " << api.name() << "\n";
@@ -834,6 +838,20 @@
}
out.unindent();
out << "}" << "\n";
+ } else if (struct_value.vector_value(0).type() == TYPE_ENUM) {
+ std::string enum_attribute_name =
+ struct_value.vector_value(0).predefined_type();
+ out << "for (int value_index = 0; value_index < "
+ << "var_msg.struct_value(" << struct_index
+ << ").vector_size(); "
+ << "value_index++) {" << "\n";
+ out.indent();
+ out << "arg->" << struct_value.name() << "[value_index] = "
+ << "EnumValue" << enum_attribute_name << "("
+ << "var_msg.struct_value(" << struct_index
+ << ").vector_value(value_index).enum_value());" << "\n";
+ out.unindent();
+ out << "}" << "\n";
} else {
cerr << __func__ << ":" << __LINE__ << " ERROR unsupported type "
<< struct_value.vector_value(0).type() << "\n";
diff --git a/tools/build/tasks/list/vts_test_lib_hidl_package_list.mk b/tools/build/tasks/list/vts_test_lib_hidl_package_list.mk
index 03fb472..7c44a46 100644
--- a/tools/build/tasks/list/vts_test_lib_hidl_package_list.mk
+++ b/tools/build/tasks/list/vts_test_lib_hidl_package_list.mk
@@ -28,6 +28,8 @@
libvts_driver_hidl_power@1.0 \
libvts_profiler_hidl_power@1.0 \
libvts_driver_hidl_light@2.0 \
+ libvts_driver_hidl_boot@1.0 \
+ libvts_profiler_hidl_boot@1.0 \
vts_test_lib_hidl_packages += \
audio_effect_hidl_hal_test \
@@ -37,4 +39,5 @@
sensors_hidl_hal_test \
power_hidl_hal_test \
light_hidl_hal_test \
+ boot_hidl_hal_test \
diff --git a/tools/vts-tradefed/res/push_groups/HidlHalTest.push b/tools/vts-tradefed/res/push_groups/HidlHalTest.push
index b8dd67c..66840ca 100644
--- a/tools/vts-tradefed/res/push_groups/HidlHalTest.push
+++ b/tools/vts-tradefed/res/push_groups/HidlHalTest.push
@@ -20,3 +20,9 @@
DATA/lib/libvts_profiler_hidl_power@1.0.so->/data/local/tmp/32/hw/android.hardware.power@1.0::IPower.profiler.so
DATA/lib64/libvts_profiler_hidl_power@1.0.so->/data/local/tmp/64/hw/android.hardware.power@1.0::IPower.profiler.so
+
+DATA/lib/libvts_driver_hidl_boot@1.0.so->/data/local/tmp/32/libvts_driver_hidl_boot@1.0.so
+DATA/lib64/libvts_driver_hidl_boot@1.0.so->/data/local/tmp/64/libvts_driver_hidl_boot@1.0.so
+
+DATA/lib/libvts_profiler_hidl_boot@1.0.so->/data/local/tmp/32/hw/android.hardware.boot@1.0::IBoot.profiler.so
+DATA/lib64/libvts_profiler_hidl_boot@1.0.so->/data/local/tmp/64/hw/android.hardware.boot@1.0::IBoot.profiler.so