From f40c9a9c71062a828399858b77af8093da6a749d Mon Sep 17 00:00:00 2001 From: liubb_0516 Date: Tue, 4 Jan 2022 17:24:18 +0800 Subject: [PATCH] add ipc test case Signed-off-by: liubb_0516 --- ipc/test/ipc/BUILD.gn | 42 ++++++++++---------- ipc/test/ipc/client/BUILD.gn | 73 ++++++++++++++++------------------ ipc/test/ipc/samgr/BUILD.gn | 77 +++++++++++++++++------------------- ipc/test/ipc/server/BUILD.gn | 73 ++++++++++++++++------------------ 4 files changed, 128 insertions(+), 137 deletions(-) diff --git a/ipc/test/ipc/BUILD.gn b/ipc/test/ipc/BUILD.gn index 5768ac7..671613b 100644 --- a/ipc/test/ipc/BUILD.gn +++ b/ipc/test/ipc/BUILD.gn @@ -1,22 +1,22 @@ -# Copyright (c) 2021 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 +# Copyright (c) 2021 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("//foundation/communication/dsoftbus/dsoftbus.gni") - -lite_component("ipc_test") { - features = [ - "client:ipc_client", - "server:ipc_server", - "samgr:samgr", - ] -} \ No newline at end of file + +import("//foundation/communication/dsoftbus/dsoftbus.gni") + +lite_component("ipc_test") { + features = [ + "client:ipc_client", + "server:ipc_server", + "samgr:samgr", + ] +} diff --git a/ipc/test/ipc/client/BUILD.gn b/ipc/test/ipc/client/BUILD.gn index a98552b..855485e 100644 --- a/ipc/test/ipc/client/BUILD.gn +++ b/ipc/test/ipc/client/BUILD.gn @@ -1,39 +1,36 @@ -# 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 +# 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("//build/lite/config/component/lite_component.gni") - -SUBSYSTEM_DIR = "//foundation/communication/ipc/test" -IPC_CORE_ROOT = "//foundation/communication/ipc/ipc/native/c" - -executable("ipc_client") { - sources = [ - "$SUBSYSTEM_DIR/ipc/client/client.c", - ] - include_dirs = [ - "//third_party/bounds_checking_function/include", - "//utils/native/lite/include", - "$IPC_CORE_ROOT/manager/include", - "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", - "$SUBSYSTEM_DIR/ipc/include", - ] - ldflags = [ - "-lstdc++", - "-lpthread", - ] - deps = [ - "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single" - ] - - configs -= [ "//build/lite/config:clang_opt" ] -} + +import("//build/lite/config/component/lite_component.gni") + +SUBSYSTEM_DIR = "//foundation/communication/ipc/test" +IPC_CORE_ROOT = "//foundation/communication/ipc/ipc/native/c" + +executable("ipc_client") { + sources = [ "$SUBSYSTEM_DIR/ipc/client/client.c" ] + include_dirs = [ + "//third_party/bounds_checking_function/include", + "//utils/native/lite/include", + "$IPC_CORE_ROOT/manager/include", + "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", + "$SUBSYSTEM_DIR/ipc/include", + ] + ldflags = [ + "-lstdc++", + "-lpthread", + ] + deps = + [ "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single" ] + + configs -= [ "//build/lite/config:clang_opt" ] +} diff --git a/ipc/test/ipc/samgr/BUILD.gn b/ipc/test/ipc/samgr/BUILD.gn index f619355..4ab5034 100644 --- a/ipc/test/ipc/samgr/BUILD.gn +++ b/ipc/test/ipc/samgr/BUILD.gn @@ -1,41 +1,38 @@ -# 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 +# 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("//build/lite/config/component/lite_component.gni") - -SUBSYSTEM_DIR = "//foundation/communication/ipc/test" -IPC_CORE_ROOT = "//foundation/communication/ipc/ipc/native/c" - -executable("samgr") { - sources = [ - "$SUBSYSTEM_DIR/ipc/samgr/samgr.c", - ] - include_dirs = [ - "//third_party/bounds_checking_function/include", - "//utils/native/lite/include", - "$IPC_CORE_ROOT/manager/include", - "$IPC_CORE_ROOT/ipc/include", - "//foundation/communication/ipc/services/dbinder/c/include", - "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", - "$SUBSYSTEM_DIR/ipc/include", - ] - ldflags = [ - "-lstdc++", - "-lpthread", - ] - deps = [ - "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single", - ] - - configs -= [ "//build/lite/config:clang_opt" ] -} + +import("//build/lite/config/component/lite_component.gni") + +SUBSYSTEM_DIR = "//foundation/communication/ipc/test" +IPC_CORE_ROOT = "//foundation/communication/ipc/ipc/native/c" + +executable("samgr") { + sources = [ "$SUBSYSTEM_DIR/ipc/samgr/samgr.c" ] + include_dirs = [ + "//third_party/bounds_checking_function/include", + "//utils/native/lite/include", + "$IPC_CORE_ROOT/manager/include", + "$IPC_CORE_ROOT/ipc/include", + "//foundation/communication/ipc/services/dbinder/c/include", + "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", + "$SUBSYSTEM_DIR/ipc/include", + ] + ldflags = [ + "-lstdc++", + "-lpthread", + ] + deps = + [ "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single" ] + + configs -= [ "//build/lite/config:clang_opt" ] +} diff --git a/ipc/test/ipc/server/BUILD.gn b/ipc/test/ipc/server/BUILD.gn index 9fee2af..dd0dece 100644 --- a/ipc/test/ipc/server/BUILD.gn +++ b/ipc/test/ipc/server/BUILD.gn @@ -1,39 +1,36 @@ -# 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 +# 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("//build/lite/config/component/lite_component.gni") - -SUBSYSTEM_DIR = "//foundation/communication/ipc/test" -IPC_CORE_ROOT = "//foundation/communication/ipc/ipc/native/c" - -executable("ipc_server") { - sources = [ - "$SUBSYSTEM_DIR/ipc/server/server.c", - ] - include_dirs = [ - "//third_party/bounds_checking_function/include", - "//utils/native/lite/include", - "$IPC_CORE_ROOT/manager/include", - "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", - "$SUBSYSTEM_DIR/ipc/include", - ] - ldflags = [ - "-lstdc++", - "-lpthread", - ] - deps = [ - "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single" - ] - - configs -= [ "//build/lite/config:clang_opt" ] -} + +import("//build/lite/config/component/lite_component.gni") + +SUBSYSTEM_DIR = "//foundation/communication/ipc/test" +IPC_CORE_ROOT = "//foundation/communication/ipc/ipc/native/c" + +executable("ipc_server") { + sources = [ "$SUBSYSTEM_DIR/ipc/server/server.c" ] + include_dirs = [ + "//third_party/bounds_checking_function/include", + "//utils/native/lite/include", + "$IPC_CORE_ROOT/manager/include", + "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", + "$SUBSYSTEM_DIR/ipc/include", + ] + ldflags = [ + "-lstdc++", + "-lpthread", + ] + deps = + [ "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single" ] + + configs -= [ "//build/lite/config:clang_opt" ] +} -- GitLab