Deprecate DefaultConfig.h.
We migrated DefaultConfig.h to config JSON files. Test: Presubmit Bug: 238685398 Change-Id: Ia3d2e5b34b0cdbfb5078129aabfe4b080e2e67a8
This commit is contained in:
parent
31b0fd2fa4
commit
9ba443f061
4 changed files with 0 additions and 65 deletions
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
* 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: [
|
||||
"VehicleHalJsonConfigLoaderHeaders",
|
||||
"VehicleHalTestUtilHeaders",
|
||||
],
|
||||
export_static_lib_headers: ["VehicleHalUtils"],
|
||||
export_header_lib_headers: [
|
||||
"VehicleHalTestUtilHeaders",
|
||||
"VehicleHalJsonConfigLoaderHeaders",
|
||||
],
|
||||
}
|
|
@ -30,8 +30,6 @@ cc_test {
|
|||
"libgtest",
|
||||
],
|
||||
header_libs: [
|
||||
// TODO(b/238685398): Remove this once we deprecate DefaultConfig.h
|
||||
"VehicleHalDefaultConfig",
|
||||
"IVehicleGeneratedHeaders",
|
||||
],
|
||||
shared_libs: [
|
||||
|
@ -55,13 +53,9 @@ cc_test {
|
|||
"libgtest",
|
||||
],
|
||||
cflags: [
|
||||
// TODO(b/238685398): Remove this once we deprecate DefaultConfig.h
|
||||
"-DENABLE_VENDOR_CLUSTER_PROPERTY_FOR_TESTING",
|
||||
"-DENABLE_VEHICLE_HAL_TEST_PROPERTIES",
|
||||
],
|
||||
header_libs: [
|
||||
// TODO(b/238685398): Remove this once we deprecate DefaultConfig.h
|
||||
"VehicleHalDefaultConfig",
|
||||
"IVehicleGeneratedHeaders",
|
||||
],
|
||||
shared_libs: [
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <DefaultConfig.h>
|
||||
#include <JsonConfigLoader.h>
|
||||
#include <VehicleUtils.h>
|
||||
#include <android-base/file.h>
|
||||
|
@ -80,26 +79,6 @@ TEST(DefaultConfigTest, TestloadVendorClusterTestProperties) {
|
|||
ASSERT_TRUE(result.ok()) << result.error().message();
|
||||
}
|
||||
|
||||
// TODO(b/238685398): Remove this test after we deprecate DefaultConfig.h
|
||||
TEST(DefaultConfigTest, TestCompatibleWithDefaultConfigHeader) {
|
||||
auto configsFromHeaderFile = defaultconfig::getDefaultConfigs();
|
||||
|
||||
std::vector<ConfigDeclaration> configsFromJson;
|
||||
JsonConfigLoader loader;
|
||||
for (const char* file :
|
||||
std::vector<const char*>({kDefaultPropertiesConfigFile, kTestPropertiesConfigFile,
|
||||
kVendorClusterTestPropertiesConfigFile})) {
|
||||
auto result = loadConfig(loader, file);
|
||||
ASSERT_TRUE(result.ok()) << result.error().message();
|
||||
for (auto& [propId, configDeclaration] : result.value()) {
|
||||
configsFromJson.push_back(configDeclaration);
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT_EQ(configsFromHeaderFile.size(), configsFromJson.size());
|
||||
ASSERT_THAT(configsFromHeaderFile, UnorderedElementsAreArray(configsFromJson));
|
||||
}
|
||||
|
||||
#endif // ENABLE_VEHICLE_HAL_TEST_PROPERTIES
|
||||
|
||||
} // namespace test
|
||||
|
|
|
@ -61,6 +61,5 @@ cc_test {
|
|||
data: [
|
||||
":VehicleHalDefaultProperties_JSON",
|
||||
],
|
||||
header_libs: ["VehicleHalDefaultConfig"],
|
||||
test_suites: ["device-tests"],
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue