提交 3b808381 编写于 作者: O openharmony_ci 提交者: Gitee

!701 按照门禁要求对所有BUILD.gn脚本进行格式化

Merge pull request !701 from Caoruihong/gnformat
......@@ -46,7 +46,10 @@ copy("copy_toybox_config") {
}
build_ext_component("build_toybox") {
deps = [ ":copy_toybox_src", ":copy_toybox_config" ]
deps = [
":copy_toybox_config",
":copy_toybox_src",
]
deps += [ "//prebuilts/lite/sysroot" ]
exec_path = rebase_path("$target_out_dir/toybox_build")
......
......@@ -31,4 +31,4 @@ import("//kernel/liteos_a/liteos.gni")
executable("trace") {
sources = [ "src/trace.c" ]
}
\ No newline at end of file
}
......@@ -34,11 +34,11 @@ kernel_module(module_name) {
sources = [
"core/los_bitmap.c",
"core/los_process.c",
"core/los_smp.c",
"core/los_swtmr.c",
"core/los_sys.c",
"core/los_task.c",
"core/los_tick.c",
"core/los_smp.c",
"ipc/los_event.c",
"ipc/los_futex.c",
"ipc/los_ipcdebug.c",
......
......@@ -33,8 +33,8 @@ module_switch = defined(LOSCFG_KERNEL_TRACE)
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"los_trace.c",
"cnv/trace_cnv.c",
"los_trace.c",
]
include_dirs = [
......@@ -43,11 +43,11 @@ kernel_module(module_name) {
"pipeline",
]
if (defined(LOSCFG_RECORDER_MODE_OFFLINE)){
if (defined(LOSCFG_RECORDER_MODE_OFFLINE)) {
sources += [ "trace_offline.c" ]
}
if (defined(LOSCFG_RECORDER_MODE_ONLINE)){
if (defined(LOSCFG_RECORDER_MODE_ONLINE)) {
sources += [ "trace_online.c" ]
}
......
......@@ -69,13 +69,13 @@ kernel_module(module_name) {
"-D__memchr_arm=memchr",
]
sources += [
"src/arch/arm/memset.S",
"src/arch/arm/memcmp.S",
"src/arch/arm/memset.S",
]
} else {
sources += [
"src/memset.c",
"src/memcmp.c",
"src/memset.c",
]
}
......
......@@ -45,7 +45,8 @@ template("kernel_module") {
if (target_name != current_dir_name) {
build_gn = rebase_path("BUILD.gn")
cmd = "if grep -q '^\s*group\s*(\s*\"$current_dir_name\"\s*)\s*{\s*\$' $build_gn; then echo true; else echo false; fi"
has_current_dir_group = exec_script("//build/lite/run_shell_cmd.py", [ cmd ], "value")
has_current_dir_group =
exec_script("//build/lite/run_shell_cmd.py", [ cmd ], "value")
if (!has_current_dir_group) {
module_name = target_name
group(current_dir_name) {
......@@ -66,7 +67,8 @@ template("kernel_module") {
template("config") {
config(target_name) {
if (defined(invoker.module_switch) && !invoker.module_switch && target_name == "public") {
if (defined(invoker.module_switch) && !invoker.module_switch &&
target_name == "public") {
not_needed(invoker, "*")
forward_variables_from(invoker, [ "configs" ])
} else {
......
......@@ -36,14 +36,13 @@ local_flags = [
"-Wno-narrowing",
"-fPIE",
]
if (LOSCFG_USER_TEST_SMP == "enable" || (LOSCFG_USER_TEST_SMP == "default" && board_name == "hispark_taurus")) {
if (LOSCFG_USER_TEST_SMP == "enable" ||
(LOSCFG_USER_TEST_SMP == "default" && board_name == "hispark_taurus")) {
local_flags += [ "-DLOSCFG_USER_TEST_SMP" ]
}
config("public_config_for_door") {
cflags = [
"-DLOSCFG_USER_TEST_SMOKE",
]
cflags = [ "-DLOSCFG_USER_TEST_SMOKE" ]
cflags += local_flags
cflags_cc = cflags
}
......@@ -58,9 +57,7 @@ config("public_config_for_all") {
}
config("public_config_for_pressure") {
cflags = [
"-DLOSCFG_USER_TEST_PRESSURE",
]
cflags = [ "-DLOSCFG_USER_TEST_PRESSURE" ]
cflags += local_flags
cflags_cc = cflags
}
......@@ -276,7 +273,8 @@ group("unittest") {
}
if (LOSCFG_USER_TEST_SECURITY_CAPABILITY == true) {
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
deps += [ "security/capability:liteos_a_security_capability_unittest_door" ]
deps +=
[ "security/capability:liteos_a_security_capability_unittest_door" ]
}
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
deps += [ "security/capability:liteos_a_security_capability_unittest" ]
......
......@@ -41,8 +41,7 @@ sources_entry = [
"ipc_test.cpp",
]
sources_smoke = [
]
sources_smoke = []
sources_full = [
"full/IPC_test_mkfifoat_001.cpp",
......
......@@ -41,12 +41,9 @@ sources_entry = [
"drivers_hid_test.cpp",
]
sources_smoke = [
"smoke/hid_test_001.cpp",
]
sources_smoke = [ "smoke/hid_test_001.cpp" ]
sources_full = [
]
sources_full = []
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_drivers_hid_unittest_door") {
......@@ -73,4 +70,4 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
configs = [ "../..:public_config_for_all" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
}
}
\ No newline at end of file
}
......@@ -41,12 +41,9 @@ sources_entry = [
"drivers_storage_test.cpp",
]
sources_smoke = [
"smoke/storage_test_001.cpp",
]
sources_smoke = [ "smoke/storage_test_001.cpp" ]
sources_full = [
]
sources_full = []
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_drivers_storage_unittest_door") {
......@@ -73,4 +70,4 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
configs = [ "../..:public_config_for_all" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
}
}
\ No newline at end of file
}
......@@ -46,8 +46,7 @@ sources_smoke = [
"smoke/dynload_test_004.cpp",
]
sources_full = [
]
sources_full = []
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_dynload_unittest_door") {
......@@ -74,4 +73,4 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
configs = [ "..:public_config_for_all" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
}
}
\ No newline at end of file
}
......@@ -49,9 +49,7 @@ sources_smoke = [
"smoke/it_test_exc_005.cpp",
]
sources_full = [
"full/it_test_fexecve_001.cpp",
]
sources_full = [ "full/it_test_fexecve_001.cpp" ]
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_exc_unittest_door") {
......@@ -78,4 +76,4 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
configs = [ "..:public_config_for_all" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
}
}
\ No newline at end of file
}
......@@ -41,8 +41,7 @@ sources_entry = [
"It_vfs_proc.cpp",
]
sources_smoke = [
]
sources_smoke = []
sources_full = [
"full/It_vfs_proc_001.cpp",
......@@ -78,4 +77,4 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
configs = [ "../..:public_config_for_all" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
}
}
\ No newline at end of file
}
......@@ -42,9 +42,7 @@ sources_entry = [
"VfsFatTest.cpp",
]
sources_smoke = [
"smoke/It_vfs_fat_026.cpp",
]
sources_smoke = [ "smoke/It_vfs_fat_026.cpp" ]
sources_pressure = [
"pressure/It_fs_fat_performance_001.cpp",
......
......@@ -47,8 +47,7 @@ sources_smoke = [
"smoke/liteipc_test_002.cpp",
]
sources_full = [
]
sources_full = []
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_liteipc_unittest_door") {
......
......@@ -41,9 +41,7 @@ sources_entry = [
"mem_shm_test.cpp",
]
sources_smoke = [
"smoke/shm_test_011.cpp",
]
sources_smoke = [ "smoke/shm_test_011.cpp" ]
sources_full = [
"full/shm_test_001.cpp",
......
......@@ -59,8 +59,7 @@ sources_smoke = [
"smoke/user_copy_test_001.cpp",
]
sources_full = [
]
sources_full = []
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_mem_vm_unittest_door") {
......
......@@ -44,8 +44,8 @@ common_include_dirs = [
]
sources_entry = [
"../../common/osTest.cpp",
"net_netdb_test.cpp",
"../../common/osTest.cpp",
"net_netdb_test.cpp",
]
sources_smoke = [
......
......@@ -64,8 +64,7 @@ sources_smoke = [
"smoke/net_socket_test_013.cpp",
]
sources_full = [
]
sources_full = []
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_net_socket_unittest_door") {
......
......@@ -46,8 +46,7 @@ sources_smoke = [
"smoke/It_posix_mem_003.cpp",
]
sources_full = [
]
sources_full = []
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_posix_mem_unittest_door") {
......
......@@ -70,7 +70,6 @@ sources_full = [
"full/pthread_mutex_test_023.cpp",
"full/pthread_mutex_test_024.cpp",
"full/pthread_mutex_test_025.cpp",
]
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
......
......@@ -41,13 +41,9 @@ sources_entry = [
"process_rwlock_test.cpp",
]
sources_smoke = [
"smoke/pthread_rwlock_test_001.cpp",
]
sources_smoke = [ "smoke/pthread_rwlock_test_001.cpp" ]
sources_full = [
"full/pthread_rwlock_test_002.cpp",
]
sources_full = [ "full/pthread_rwlock_test_002.cpp" ]
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_rwlock_unittest_door") {
......
......@@ -41,12 +41,9 @@ sources_entry = [
"process_spinlock_test.cpp",
]
sources_smoke = [
"smoke/pthread_spinlock_test_001.cpp",
]
sources_smoke = [ "smoke/pthread_spinlock_test_001.cpp" ]
sources_full = [
]
sources_full = []
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_spinlock_unittest_door") {
......
......@@ -41,12 +41,9 @@ sources_entry = [
"security_reugid_test.cpp",
]
sources_smoke = [
"smoke/reugid_test_001.cpp",
]
sources_smoke = [ "smoke/reugid_test_001.cpp" ]
sources_full = [
]
sources_full = []
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_security_reugid_unittest_door") {
......
......@@ -41,12 +41,9 @@ sources_entry = [
"security_vid_test.cpp",
]
sources_smoke = [
"smoke/vid_test_001.cpp",
]
sources_smoke = [ "smoke/vid_test_001.cpp" ]
sources_full = [
]
sources_full = []
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_security_vid_unittest_door") {
......
......@@ -51,7 +51,7 @@ sources_smoke = [
"smoke/mkfifo_test_002.cpp",
"smoke/pipe_test_002.cpp",
"smoke/pipe_test_004.cpp",
"smoke/signal_test_002.cpp",
"smoke/signal_test_009.cpp",
"smoke/signal_test_013.cpp",
......@@ -109,7 +109,6 @@ sources_full = [
"full/pipe_test_003.cpp",
"full/pipe_test_005.cpp",
"full/pipe_test_006.cpp",
]
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
......
......@@ -51,8 +51,7 @@ sources_smoke = [
"smoke/timer_test_tzset_002.cpp",
]
sources_full = [
]
sources_full = []
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_time_timer_unittest_door") {
......
......@@ -48,8 +48,7 @@ sources_smoke = [
"smoke/trace_test_004.cpp",
]
sources_full = [
]
sources_full = []
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_trace_unittest_door") {
......
......@@ -30,7 +30,6 @@
import("//build/lite/config/test.gni")
import("../config.gni")
common_include_dirs = [
"//third_party/googletest/googletest/include",
"../common/include",
......@@ -55,8 +54,7 @@ sources_smoke = [
"smoke/util_test_007.cpp",
]
sources_full = [
]
sources_full = []
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_util_unittest_door") {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册