From e2011cd887048df17c44c5b3f3c08d2c2e53fd14 Mon Sep 17 00:00:00 2001 From: likailong Date: Fri, 13 Nov 2020 16:26:34 +0800 Subject: [PATCH] Description: liteos-m refactoring Reviewed-by: liulei, shenwei Change-Id: I7baba352c02b78aefc81fc5eca000d840d3b2fe3 --- communication_lite/lwip_hal/BUILD.gn | 41 ++++--- communication_lite/softbus_hal/BUILD.gn | 65 ++++++----- communication_lite/wifiservice_hal/BUILD.gn | 43 ++++---- distributedschedule_lite/samgr_hal/BUILD.gn | 113 +++++++++----------- iot_hardware_lite/wifiiot_hal/BUILD.gn | 72 ++++++------- kernel_lite/kernelcmsis_hal/BUILD.gn | 61 ++++++----- kernel_lite/kernelkal_hal/BUILD.gn | 49 ++++----- 7 files changed, 206 insertions(+), 238 deletions(-) diff --git a/communication_lite/lwip_hal/BUILD.gn b/communication_lite/lwip_hal/BUILD.gn index b78a93502..fa16a5952 100755 --- a/communication_lite/lwip_hal/BUILD.gn +++ b/communication_lite/lwip_hal/BUILD.gn @@ -1,29 +1,26 @@ - # Copyright (c) 2020 Huawei Device Co., Ltd. - # 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. +# Copyright (c) 2020 Huawei Device Co., Ltd. +# 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. import("//test/xts/tools/build/suite_lite.gni") hctest_suite("ActsLwipTest") { - suite_name = "acts" + suite_name = "acts" - sources = [ - "src/lwip_func_test.c", - ] + sources = [ "src/lwip_func_test.c" ] - include_dirs = [ - "//vendor/hisi/hi3861/hi3861/third_party/lwip_sack/include", - "//kernel/liteos_m/components/cmsis", - "//kernel/liteos_m/components/cmsis/2.0", - ] + include_dirs = [ + "//vendor/hisi/hi3861/hi3861/third_party/lwip_sack/include", + "//kernel/liteos_m/kal", + ] - cflags = ["-Wno-error"] + cflags = [ "-Wno-error" ] } diff --git a/communication_lite/softbus_hal/BUILD.gn b/communication_lite/softbus_hal/BUILD.gn index 3fa954f95..6b326d753 100755 --- a/communication_lite/softbus_hal/BUILD.gn +++ b/communication_lite/softbus_hal/BUILD.gn @@ -1,42 +1,37 @@ - # Copyright (c) 2020 Huawei Device Co., Ltd. - # 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. +# Copyright (c) 2020 Huawei Device Co., Ltd. +# 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. import("//test/xts/tools/build/suite_lite.gni") hctest_suite("ActsSoftBusTest") { - suite_name = "acts" - sources = [ - "src/softbus_func_test.c", - ] + suite_name = "acts" + sources = [ "src/softbus_func_test.c" ] - defines = ["HOS_DISCOVERY_3861_BOARD"] - include_dirs = [ - "//vendor/hisi/hi3861/hi3861/include", - "//vendor/hisi/hi3861/hi3861/components/lwip_sack/include", - "//vendor/hisi/hi3861/hi3861/third_party/cjson", - "//third_party/bounds_checking_function/include", - "//kernel/liteos_m/components/cmsis", - "//kernel/liteos_m/components/cmsis/2.0", - "//foundation/communication/interfaces/kits/wifi_lite/wifiservice", - "//foundation/communication/frameworks/wifi_lite/wifiservice/source", - "//foundation/communication/services/softbus_lite/discovery/discovery_service/include", - "//foundation/communication/services/softbus_lite/discovery/include", - "//foundation/communication/interfaces/kits/softbus_lite/discovery", - "//foundation/communication/interfaces/kits/softbus_lite/transport" - ] + defines = [ "HOS_DISCOVERY_3861_BOARD" ] + include_dirs = [ + "//vendor/hisi/hi3861/hi3861/include", + "//vendor/hisi/hi3861/hi3861/components/lwip_sack/include", + "//vendor/hisi/hi3861/hi3861/third_party/cjson", + "//third_party/bounds_checking_function/include", + "//kernel/liteos_m/kal", + "//foundation/communication/interfaces/kits/wifi_lite/wifiservice", + "//foundation/communication/frameworks/wifi_lite/wifiservice/source", + "//foundation/communication/services/softbus_lite/discovery/discovery_service/include", + "//foundation/communication/services/softbus_lite/discovery/include", + "//foundation/communication/interfaces/kits/softbus_lite/discovery", + "//foundation/communication/interfaces/kits/softbus_lite/transport", + ] - deps = [ - "//foundation/communication/services/softbus_lite:softbus", - ] + deps = [ "//foundation/communication/services/softbus_lite:softbus" ] - cflags = [ "-Wno-error" ] + cflags = [ "-Wno-error" ] } diff --git a/communication_lite/wifiservice_hal/BUILD.gn b/communication_lite/wifiservice_hal/BUILD.gn index 746633f73..531732de8 100755 --- a/communication_lite/wifiservice_hal/BUILD.gn +++ b/communication_lite/wifiservice_hal/BUILD.gn @@ -1,29 +1,26 @@ - # Copyright (c) 2020 Huawei Device Co., Ltd. - # 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. +# Copyright (c) 2020 Huawei Device Co., Ltd. +# 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. import("//test/xts/tools/build/suite_lite.gni") hctest_suite("ActsWifiServiceTest") { - suite_name = "acts" - sources = [ - "src/wifiservice_func_test.c", - ] + suite_name = "acts" + sources = [ "src/wifiservice_func_test.c" ] - include_dirs = [ - "//foundation/communication/interfaces/kits/wifi_lite/wifiservice", - "//vendor/hisi/hi3861/hi3861/third_party/lwip_sack/include", - "//kernel/liteos_m/components/cmsis", - "//kernel/liteos_m/components/cmsis/2.0", - ] + include_dirs = [ + "//foundation/communication/interfaces/kits/wifi_lite/wifiservice", + "//vendor/hisi/hi3861/hi3861/third_party/lwip_sack/include", + "//kernel/liteos_m/kal", + ] - cflags = [ "-Wno-error" ] + cflags = [ "-Wno-error" ] } diff --git a/distributedschedule_lite/samgr_hal/BUILD.gn b/distributedschedule_lite/samgr_hal/BUILD.gn index db255e705..b47c80736 100755 --- a/distributedschedule_lite/samgr_hal/BUILD.gn +++ b/distributedschedule_lite/samgr_hal/BUILD.gn @@ -1,68 +1,55 @@ - # Copyright (c) 2020 Huawei Device Co., Ltd. - # 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. +# Copyright (c) 2020 Huawei Device Co., Ltd. +# 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. import("//test/xts/tools/build/suite_lite.gni") hctest_suite("ActsSamgrTest") { - suite_name = "acts" - sources = [ - "utils/samgr_maintenance.c", - - "src/service_func_test.c", - "src/feature_func_test.c", - "src/defaultfeatureapi_func_test.c", - "src/featureapi_func_test.c", - "src/iunknown_func_test.c", - - "src/sendrequest_func_test.c", - "src/sendresponse_func_test.c", - "src/sendsharerequest_func_test.c", - - "src/broadcast_subscribe_func_test.c", - "src/broadcast_publish_func_test.c", - - "src/taskpool_notask_func_test.c", - "src/taskpool_singletask_func_test.c", - "src/taskpool_specifiedtask_func_test.c", - "src/taskpool_sharedtask_func_test.c", - - "src/common_func_test.c", - ] - - include_dirs = [ - "//test/xts/tools/hctest/include", - "//third_party/unity/src", - "//kernel/liteos_m/components/cmsis", - "//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr", - "//foundation/distributedschedule/interfaces/kits/samgr_lite/communication/broadcast", - "//foundation/distributedschedule/services/samgr_lite/samgr/adapter", - "//foundation/distributedschedule/services/samgr_lite/samgr/source", - "//vendor/hisi/hi3861/hi3861/include", - "//vendor/hisi/hi3861/hi3861/components/lwip_sack/include", - "//kernel/liteos_m/components/cmsis/2.0", - "src", - "utils", - ] - deps = [ - "//test/xts/tools/hctest:hctest", - ] - public_deps = [ - "//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter", - ] - defines = [ - "UNITY_INCLUDE_CONFIG_H", - ] - - cflags = [ "-Wno-error" ] + suite_name = "acts" + sources = [ + "src/broadcast_publish_func_test.c", + "src/broadcast_subscribe_func_test.c", + "src/common_func_test.c", + "src/defaultfeatureapi_func_test.c", + "src/feature_func_test.c", + "src/featureapi_func_test.c", + "src/iunknown_func_test.c", + "src/sendrequest_func_test.c", + "src/sendresponse_func_test.c", + "src/sendsharerequest_func_test.c", + "src/service_func_test.c", + "src/taskpool_notask_func_test.c", + "src/taskpool_sharedtask_func_test.c", + "src/taskpool_singletask_func_test.c", + "src/taskpool_specifiedtask_func_test.c", + "utils/samgr_maintenance.c", + ] + + include_dirs = [ + "//test/xts/tools/hctest/include", + "//third_party/unity/src", + "//kernel/liteos_m/kal", + "//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr", + "//foundation/distributedschedule/interfaces/kits/samgr_lite/communication/broadcast", + "//foundation/distributedschedule/services/samgr_lite/samgr/adapter", + "//foundation/distributedschedule/services/samgr_lite/samgr/source", + "//vendor/hisi/hi3861/hi3861/include", + "//vendor/hisi/hi3861/hi3861/components/lwip_sack/include", + "src", + "utils", + ] + deps = [ "//test/xts/tools/hctest:hctest" ] + public_deps = [ "//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter" ] + defines = [ "UNITY_INCLUDE_CONFIG_H" ] + + cflags = [ "-Wno-error" ] } - diff --git a/iot_hardware_lite/wifiiot_hal/BUILD.gn b/iot_hardware_lite/wifiiot_hal/BUILD.gn index b109181cb..8a794ad79 100755 --- a/iot_hardware_lite/wifiiot_hal/BUILD.gn +++ b/iot_hardware_lite/wifiiot_hal/BUILD.gn @@ -1,44 +1,42 @@ - # Copyright (c) 2020 Huawei Device Co., Ltd. - # 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. +# Copyright (c) 2020 Huawei Device Co., Ltd. +# 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. import("//test/xts/tools/build/suite_lite.gni") hctest_suite("ActsWifiIotTest") { - suite_name = "acts" - sources = [ - "src/wifiiot_func_test.c", - "src/wifiiot_flash_func_test.c", - "src/wifiiot_gpio_func_test.c", - "src/wifiiot_i2c_func_test.c", - "src/wifiiot_uart_func_test.c", - "src/wifiiot_adc_func_test.c", - "src/wifiiot_spi_hdx_func_test.c", - "src/wifiiot_spi_slave_func_test.c", - "src/wifiiot_spi_fdx_func_test.c", - "src/wifiiot_sdio_func_test.c", - ] + suite_name = "acts" + sources = [ + "src/wifiiot_adc_func_test.c", + "src/wifiiot_flash_func_test.c", + "src/wifiiot_func_test.c", + "src/wifiiot_gpio_func_test.c", + "src/wifiiot_i2c_func_test.c", + "src/wifiiot_sdio_func_test.c", + "src/wifiiot_spi_fdx_func_test.c", + "src/wifiiot_spi_hdx_func_test.c", + "src/wifiiot_spi_slave_func_test.c", + "src/wifiiot_uart_func_test.c", + ] - include_dirs = [ - "//test/xts/tools/hctest/include", - "//third_party/unity/src", - "src", - "//kernel/liteos_m/components/cmsis", - "//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr", - "//base/iot_hardware/interfaces/kits/wifiiot_lite", - ] + include_dirs = [ + "//test/xts/tools/hctest/include", + "//third_party/unity/src", + "src", + "//kernel/liteos_m/kal", + "//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr", + "//base/iot_hardware/interfaces/kits/wifiiot_lite", + ] - deps = [ - "//test/xts/tools/hctest:hctest", - ] + deps = [ "//test/xts/tools/hctest:hctest" ] - cflags = [ "-Wno-error" ] + cflags = [ "-Wno-error" ] } diff --git a/kernel_lite/kernelcmsis_hal/BUILD.gn b/kernel_lite/kernelcmsis_hal/BUILD.gn index 7fea3589c..501c4964d 100755 --- a/kernel_lite/kernelcmsis_hal/BUILD.gn +++ b/kernel_lite/kernelcmsis_hal/BUILD.gn @@ -1,36 +1,35 @@ - # Copyright (c) 2020 Huawei Device Co., Ltd. - # 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. +# Copyright (c) 2020 Huawei Device Co., Ltd. +# 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. import("//test/xts/tools/build/suite_lite.gni") hctest_suite("ActsCMSISTest") { - suite_name = "acts" - sources = [ - "src/cmsis_task_func_test.c", - "src/cmsis_task_pri_func_test.c", - "src/cmsis_timer_func_test.c", - "src/cmsis_event_func_test.c", - "src/cmsis_mutex_func_test.c", - "src/cmsis_msg_func_test.c", - "src/cmsis_sem_func_test.c", - ] + suite_name = "acts" + sources = [ + "src/cmsis_event_func_test.c", + "src/cmsis_msg_func_test.c", + "src/cmsis_mutex_func_test.c", + "src/cmsis_sem_func_test.c", + "src/cmsis_task_func_test.c", + "src/cmsis_task_pri_func_test.c", + "src/cmsis_timer_func_test.c", + ] - include_dirs = [ - "//test/xts/tools/hctest/include", - "//third_party/unity/src", - "src", - "//kernel/liteos_m/components/cmsis", - "//kernel/liteos_m/components/cmsis/2.0", - ] - cflags = [ "-Wno-error" ] -} \ No newline at end of file + include_dirs = [ + "//test/xts/tools/hctest/include", + "//third_party/unity/src", + "src", + "//kernel/liteos_m/kal", + ] + cflags = [ "-Wno-error" ] +} diff --git a/kernel_lite/kernelkal_hal/BUILD.gn b/kernel_lite/kernelkal_hal/BUILD.gn index 8f81e25ee..c87da06bf 100755 --- a/kernel_lite/kernelkal_hal/BUILD.gn +++ b/kernel_lite/kernelkal_hal/BUILD.gn @@ -1,32 +1,27 @@ - # Copyright (c) 2020 Huawei Device Co., Ltd. - # 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. +# Copyright (c) 2020 Huawei Device Co., Ltd. +# 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. import("//test/xts/tools/build/suite_lite.gni") hctest_suite("ActsKalTest") { - suite_name = "acts" - sources = [ - "src/kal_func_test.c", - ] + suite_name = "acts" + sources = [ "src/kal_func_test.c" ] - include_dirs = [ - "//test/xts/tools/hctest/include", - "//third_party/unity/src", - "src", - "//kernel/liteos_m/components/cmsis", - "//kernel/liteos_m/components/cmsis/2.0", - "//kernel/liteos_m/components/kal/include", - "//kernel/liteos_m/kernel/base/include", - ] - cflags = [ "-Wno-error" ] -} \ No newline at end of file + include_dirs = [ + "//test/xts/tools/hctest/include", + "//third_party/unity/src", + "src", + "//kernel/liteos_m/kal", + ] + cflags = [ "-Wno-error" ] +} -- GitLab