mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-11-23 08:49:59 +00:00
refactor: move dfx tests
Signed-off-by: aqxyjay <zhangchunxin@huawei.com>
This commit is contained in:
parent
f77261fff4
commit
f181ec93e4
@ -94,13 +94,12 @@ tests/core/common/ zhusiyuan2@huawei.com
|
||||
interfaces/kits/common/softbus_common.h zhusiyuan2@huawei.com
|
||||
|
||||
[DFX]
|
||||
dfx/ zhusiyuan2@huawei.com
|
||||
tests/core/common/dfx zhusiyuan2@huawei.com
|
||||
dfx/ zhusiyuan2@huawei.com
|
||||
tests/dfx zhusiyuan2@huawei.com
|
||||
|
||||
[DFXInterface]
|
||||
hisysevent.yaml litongxin3@huawei.com
|
||||
interfaces/kits/common/softbus_error_code.h litongxin3@huawei.com
|
||||
dfx/interface litongxin3@huawei.com
|
||||
|
||||
[Framework]
|
||||
core/frame/ zhangfengxi@huawei.com
|
||||
|
@ -80,9 +80,8 @@ if (defined(ohos_lite)) {
|
||||
"$dsoftbus_root_path/components/nstackx/nstackx_core/dfile/interface",
|
||||
]
|
||||
include_dirs += conn_common_inc + trans_common_inc
|
||||
dfx_src = [
|
||||
"$dsoftbus_dfx_path/event/legacy/hisysevent_adapter/softbus_hisysevt_nstack_virtual.c",
|
||||
]
|
||||
dfx_src =
|
||||
[ "$dsoftbus_dfx_path/event/legacy/softbus_hisysevt_nstack_virtual.c" ]
|
||||
sources = common_utils_src
|
||||
sources += conn_common_src + trans_common_src + dfx_src
|
||||
sources += [ "message_handler/message_handler.c" ]
|
||||
|
@ -11,8 +11,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("../../../dsoftbus.gni")
|
||||
import("../../../core/transmission/common/trans_common.gni")
|
||||
import("../../../dsoftbus.gni")
|
||||
|
||||
softbus_adapter_common = "${dsoftbus_root_path}/adapter/common"
|
||||
|
||||
|
@ -17,7 +17,7 @@ dsoftbus_sdk_path = "${dsoftbus_root_path}/sdk"
|
||||
dsoftbus_core_path = "${dsoftbus_root_path}/core"
|
||||
dsoftbus_dfx_path = "${dsoftbus_root_path}/dfx"
|
||||
dsoftbus_test_path = "${dsoftbus_root_path}/tests"
|
||||
dsoftbus_test_dfx_path = "${dsoftbus_test_path}/core/common/dfx"
|
||||
dsoftbus_test_dfx_path = "${dsoftbus_test_path}/dfx"
|
||||
dsoftbus_fuzz_out_path = "dsoftbus/soft_bus"
|
||||
|
||||
declare_args() {
|
||||
|
@ -48,6 +48,7 @@ if (defined(ohos_lite)) {
|
||||
"core/discovery:unittest",
|
||||
"core/frame:unittest",
|
||||
"core/transmission:unittest",
|
||||
"dfx:unittest",
|
||||
"sdk/bus_center:unittest",
|
||||
"sdk/discovery:unittest",
|
||||
"sdk/frame/common:unittest",
|
||||
@ -70,6 +71,7 @@ if (defined(ohos_lite)) {
|
||||
"core/discovery:fuzztest",
|
||||
"core/frame:fuzztest",
|
||||
"core/transmission:fuzztest",
|
||||
"dfx:fuzztest",
|
||||
"sdk/bus_center:fuzztest",
|
||||
"sdk/frame:fuzztest",
|
||||
"sdk/transmission:fuzztest",
|
||||
|
@ -18,12 +18,6 @@ group("unittest") {
|
||||
testonly = true
|
||||
deps = [
|
||||
"bitmap:unittest",
|
||||
"dfx/anonymize:unittest",
|
||||
"dfx/event:unittest",
|
||||
"dfx/hidumper_adapter/unittest:unittest",
|
||||
"dfx/hisysevent_adapter/unittest:unittest",
|
||||
"dfx/log:unittest",
|
||||
"dfx/statistics/unittest:unittest",
|
||||
"json_utils:unittest",
|
||||
"network:unittest",
|
||||
"queue:unittest",
|
||||
@ -37,8 +31,6 @@ group("unittest") {
|
||||
group("fuzztest") {
|
||||
testonly = true
|
||||
deps = [
|
||||
"dfx/hidumper_adapter/fuzztest:fuzztest",
|
||||
"dfx/hisysevent_adapter/fuzztest:fuzztest",
|
||||
"json_utils:fuzztest",
|
||||
"message_handler:fuzztest",
|
||||
"utils/fuzztest:fuzztest",
|
||||
|
35
tests/dfx/BUILD.gn
Normal file
35
tests/dfx/BUILD.gn
Normal file
@ -0,0 +1,35 @@
|
||||
# Copyright (c) 2024 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/test.gni")
|
||||
import("../../dsoftbus.gni")
|
||||
|
||||
group("unittest") {
|
||||
testonly = true
|
||||
deps = [
|
||||
"anonymize:unittest",
|
||||
"dumper/legacy/unittest:unittest",
|
||||
"event:unittest",
|
||||
"event/legacy/unittest:unittest",
|
||||
"log:unittest",
|
||||
"statistics/unittest:unittest",
|
||||
]
|
||||
}
|
||||
|
||||
group("fuzztest") {
|
||||
testonly = true
|
||||
deps = [
|
||||
"dumper/legacy/fuzztest:fuzztest",
|
||||
"event/legacy/fuzztest:fuzztest",
|
||||
]
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
import("//build/config/features.gni")
|
||||
import("//build/ohos.gni")
|
||||
import("//build/test.gni")
|
||||
import("../../../../../../../dsoftbus.gni")
|
||||
import("../../../../../dsoftbus.gni")
|
||||
|
||||
##############################fuzztest##########################################
|
||||
|
@ -12,9 +12,9 @@
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/test.gni")
|
||||
import("../../../../../../dsoftbus.gni")
|
||||
import("../../../../dsoftbus.gni")
|
||||
|
||||
module_output_path = "dsoftbus/common/dfx"
|
||||
module_output_path = "dsoftbus/dfx"
|
||||
|
||||
ohos_unittest("SoftBusDfxAnonymizeTest") {
|
||||
module_out_path = module_output_path
|
@ -15,14 +15,14 @@
|
||||
import("//build/config/features.gni")
|
||||
import("//build/ohos.gni")
|
||||
import("//build/test.gni")
|
||||
import("../../../../../../../dsoftbus.gni")
|
||||
import("../../../../../../dsoftbus.gni")
|
||||
|
||||
##############################fuzztest##########################################
|
||||
|
||||
ohos_fuzztest("SoftBusHiDumperFuzzTest") {
|
||||
module_out_path = dsoftbus_fuzz_out_path
|
||||
fuzz_config_file =
|
||||
"$dsoftbus_test_dfx_path/hidumper_adapter/fuzztest/softbushidumper_fuzzer"
|
||||
"$dsoftbus_test_dfx_path/dumper/legacy/fuzztest/softbushidumper_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"$dsoftbus_dfx_path/interface/include",
|
@ -14,10 +14,9 @@
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
import("//build/ohos.gni")
|
||||
import("//build/test.gni")
|
||||
import("../../../../../../dsoftbus.gni")
|
||||
import("../../../../../dsoftbus.gni")
|
||||
|
||||
module_output_path = "dsoftbus/common"
|
||||
dsoftbus_root_path = "../../../../../.."
|
||||
|
||||
ohos_unittest("HidumperTest") {
|
||||
module_out_path = module_output_path
|
@ -15,13 +15,14 @@
|
||||
import("//build/config/features.gni")
|
||||
import("//build/ohos.gni")
|
||||
import("//build/test.gni")
|
||||
import("../../../../../../../dsoftbus.gni")
|
||||
import("../../../../../../dsoftbus.gni")
|
||||
|
||||
##############################fuzztest##########################################
|
||||
|
||||
ohos_fuzztest("SoftBusHiSysEvtFuzzTest") {
|
||||
module_out_path = dsoftbus_fuzz_out_path
|
||||
fuzz_config_file = "$dsoftbus_test_dfx_path/hisysevent_adapter/fuzztest/softbushisysevt_fuzzer"
|
||||
fuzz_config_file =
|
||||
"$dsoftbus_test_dfx_path/event/legacy/fuzztest/softbushisysevt_fuzzer"
|
||||
|
||||
include_dirs = [
|
||||
"$dsoftbus_root_path/core/common/include",
|
@ -11,9 +11,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("../../../../../../dsoftbus.gni")
|
||||
|
||||
dsoftbus_root_path = "../../../../../.."
|
||||
import("../../../../../dsoftbus.gni")
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
@ -12,9 +12,9 @@
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/test.gni")
|
||||
import("../../../../../../dsoftbus.gni")
|
||||
import("../../../../dsoftbus.gni")
|
||||
|
||||
module_output_path = "dsoftbus/common/dfx"
|
||||
module_output_path = "dsoftbus/dfx"
|
||||
|
||||
ohos_unittest("SoftBusDfxEventTest") {
|
||||
module_out_path = module_output_path
|
@ -12,9 +12,9 @@
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/test.gni")
|
||||
import("../../../../../../dsoftbus.gni")
|
||||
import("../../../../dsoftbus.gni")
|
||||
|
||||
module_output_path = "dsoftbus/common/dfx"
|
||||
module_output_path = "dsoftbus/dfx"
|
||||
|
||||
ohos_unittest("SoftBusDfxLogTest") {
|
||||
module_out_path = module_output_path
|
@ -14,10 +14,9 @@
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
import("//build/ohos.gni")
|
||||
import("//build/test.gni")
|
||||
import("../../../../../../dsoftbus.gni")
|
||||
import("../../../../dsoftbus.gni")
|
||||
|
||||
module_output_path = "dsoftbus/common"
|
||||
dsoftbus_root_path = "../../../../../.."
|
||||
|
||||
ohos_unittest("TransNetworkStatisticsTest") {
|
||||
module_out_path = module_output_path
|
Loading…
Reference in New Issue
Block a user