Migrate VHAL default config to AIDL.
Test: atest VehicleHalDefaultConfigTest Bug: 199337732 Change-Id: I9d96c82598427a597245d73a15c22eccff672250
This commit is contained in:
parent
e4923de337
commit
379c33ca66
5 changed files with 1395 additions and 2 deletions
|
@ -1,10 +1,13 @@
|
||||||
{
|
{
|
||||||
"presubmit": [
|
"presubmit": [
|
||||||
{
|
{
|
||||||
"name": "VehicleHalVehicleUtilsTest"
|
"name": "VehicleHalAidlHidlCompatibilityTest"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "VehicleHalAidlHidlCompatibilityTest"
|
"name": "VehicleHalDefaultConfigTest"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "VehicleHalVehicleUtilsTest"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
31
automotive/vehicle/aidl/impl/default_config/Android.bp
Normal file
31
automotive/vehicle/aidl/impl/default_config/Android.bp
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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 {
|
||||||
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||||
|
}
|
||||||
|
|
||||||
|
cc_library_headers {
|
||||||
|
name: "VehicleHalDefaultConfig",
|
||||||
|
vendor: true,
|
||||||
|
local_include_dirs: ["include"],
|
||||||
|
export_include_dirs: ["include"],
|
||||||
|
defaults: ["VehicleHalDefaults"],
|
||||||
|
static_libs: ["VehicleHalUtils"],
|
||||||
|
header_libs: ["VehicleHalTestUtilHeaders"],
|
||||||
|
export_static_lib_headers: ["VehicleHalUtils"],
|
||||||
|
export_header_lib_headers: ["VehicleHalTestUtilHeaders"],
|
||||||
|
}
|
1286
automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h
Normal file
1286
automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h
Normal file
File diff suppressed because it is too large
Load diff
34
automotive/vehicle/aidl/impl/default_config/test/Android.bp
Normal file
34
automotive/vehicle/aidl/impl/default_config/test/Android.bp
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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 {
|
||||||
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||||
|
}
|
||||||
|
|
||||||
|
cc_test {
|
||||||
|
name: "VehicleHalDefaultConfigTest",
|
||||||
|
vendor: true,
|
||||||
|
defaults: ["VehicleHalDefaults"],
|
||||||
|
srcs: ["*.cpp"],
|
||||||
|
static_libs: [
|
||||||
|
"VehicleHalUtils",
|
||||||
|
"libgtest",
|
||||||
|
],
|
||||||
|
header_libs: [
|
||||||
|
"VehicleHalDefaultConfig",
|
||||||
|
],
|
||||||
|
test_suites: ["general-tests"],
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2021 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <DefaultConfig.h>
|
||||||
|
#include <VehicleUtils.h>
|
||||||
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
namespace android {
|
||||||
|
namespace hardware {
|
||||||
|
namespace automotive {
|
||||||
|
namespace vehicle {
|
||||||
|
|
||||||
|
namespace test {
|
||||||
|
|
||||||
|
TEST(DefaultConfigTest, loadDefaultConfigs) {
|
||||||
|
for (ConfigDeclaration config : kVehicleProperties) {
|
||||||
|
ASSERT_NE(0, config.config.prop);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace test
|
||||||
|
|
||||||
|
} // namespace vehicle
|
||||||
|
} // namespace automotive
|
||||||
|
} // namespace hardware
|
||||||
|
} // namespace android
|
Loading…
Reference in a new issue