diff --git a/commonlibrary/toolchain/BUILD.gn b/commonlibrary/toolchain/BUILD.gn index be6736db53843ade7285edfdbcbf87b29ff9f2bc..7d36b548855265beeef66a1ec851372cc6620af3 100644 --- a/commonlibrary/toolchain/BUILD.gn +++ b/commonlibrary/toolchain/BUILD.gn @@ -14,17 +14,19 @@ import("//build/ohos_var.gni") import("//test/xts/tools/build/suite.gni") group("toolchain") { - testonly = true - deps = [ "//third_party/musl:libctest" ] - if (is_standard_system) { - deps += [ ":tar_dllib" ] + if (!(product_name == "m40")) { + testonly = true + deps = [ "//third_party/musl:libctest" ] + if (is_standard_system) { + deps += [ ":tar_dllib" ] + } } } action("tar_testcases") { testonly = true deps = [ - "libc-test:ActToolChainTest", + "libc-test:ActsToolChainTest", "//third_party/musl:libctest", ] project_dir = rebase_path(".") @@ -42,7 +44,7 @@ action("tar_testcases") { _outputs = [ "$target_out_dir/libc-test.tar" ] outputs = _outputs - input_path = rebase_path("$test_path/tests/unittest/libc-test") + input_path = rebase_path("$test_path/musl/libc-test") output_path = rebase_path("$test_path/suites/acts/testcases/libc-test.tar") print("root_build_dir-49", root_build_dir) diff --git a/commonlibrary/toolchain/libc-test/BUILD.gn b/commonlibrary/toolchain/libc-test/BUILD.gn index 6005a9e89a0457c9d7141dfd59b330ef73c7832d..138bcdaf5edfe669531eedfb1768445d1da3677b 100755 --- a/commonlibrary/toolchain/libc-test/BUILD.gn +++ b/commonlibrary/toolchain/libc-test/BUILD.gn @@ -27,7 +27,7 @@ config("module_private_config") { } ######################################################## -ohos_moduletest_suite("ActToolChainTest") { +ohos_moduletest_suite("ActsToolChainTest") { configs = [ ":module_private_config" ] cflags_cc = [ "-DHILOG_ENABLE" ] defines = [ "_STANDARD_SYSTEM_" ] diff --git a/commonlibrary/toolchain/libc-test/Test.json b/commonlibrary/toolchain/libc-test/Test.json index 5cb7392de961150926ffea088544a385adde1a10..7c4a5012ce8d403df010895fdbfa9a1dc66cf8a9 100755 --- a/commonlibrary/toolchain/libc-test/Test.json +++ b/commonlibrary/toolchain/libc-test/Test.json @@ -1,8 +1,16 @@ { + "description": "Configuration for ActsToolChainTest Tests", + "driver": { + "type": "CppTest", + "native-test-timeout": "3600000", + "module-name": "ActsToolChainTest", + "runtime-hint": "100s", + "native-test-device-path": "/data/local/tmp" + }, "kits": [ { "push": [ - "ActToolChainTest->/data/local/tmp/ActToolChainTest", + "ActsToolChainTest->/data/local/tmp/ActsToolChainTest", "libc-test.tar->/data/local/tmp/libc-test.tar", "libc-test-lib.tar->/data/local/tmp/libc-test-lib.tar" ], @@ -15,16 +23,158 @@ "tar -xf /data/local/tmp/libc-test.tar -C /data/local/tmp/", "tar -xf /data/local/tmp/libc-test-lib.tar -C /data/local/tmp/", "chmod a+x -R /data/local/tmp/libc-test-lib", - "chmod a+x -R /data/local/tmp/libc-test" - ] + "chmod a+x -R /data/local/tmp/libc-test", + "rm -rf /data/local/tmp/libc-test/vsyslog", + "rm -rf /data/local/tmp/libc-test/mkstemps", + "rm -rf /data/local/tmp/libc-test/mkostemps", + "rm -rf /data/local/tmp/libc-test/syncfs", + "rm -rf /data/local/tmp/libc-test/sync_file_range", + "rm -rf /data/local/tmp/libc-test/tee", + "rm -rf /data/local/tmp/libc-test/sendfile", + "rm -rf /data/local/tmp/libc-test/removexattr", + "rm -rf /data/local/tmp/libc-test/copy_file_range", + "rm -rf /data/local/tmp/libc-test/setxattr", + "rm -rf /data/local/tmp/libc-test/splice", + "rm -rf /data/local/tmp/libc-test/mremap", + "rm -rf /data/local/tmp/libc-test/mincore", + "rm -rf /data/local/tmp/libc-test/msync", + "rm -rf /data/local/tmp/libc-test/rewinddir", + "rm -rf /data/local/tmp/libc-test/scandir", + "rm -rf /data/local/tmp/libc-test/readdir_r", + "rm -rf /data/local/tmp/libc-test/tcgetattr", + "rm -rf /data/local/tmp/libc-test/tcsendbreak", + "rm -rf /data/local/tmp/libc-test/tcgetsid", + "rm -rf /data/local/tmp/libc-test/tcsetattr", + "rm -rf /data/local/tmp/libc-test/a_stack_chk_fail", + "rm -rf /data/local/tmp/libc-test/tcsetpgrp", + "rm -rf /data/local/tmp/libc-test/ttyname", + "rm -rf /data/local/tmp/libc-test/tcgetpgrp", + "rm -rf /data/local/tmp/libc-test/isatty", + "rm -rf /data/local/tmp/libc-test/posix_fallocate", + "rm -rf /data/local/tmp/libc-test/posix_fadvise", + "rm -rf /data/local/tmp/libc-test/getgrnam_r", + "rm -rf /data/local/tmp/libc-test/ftok", + "rm -rf /data/local/tmp/libc-test/freopen", + "rm -rf /data/local/tmp/libc-test/__fwritable", + "rm -rf /data/local/tmp/libc-test/setbuffer", + "rm -rf /data/local/tmp/libc-test/vfscanf", + "rm -rf /data/local/tmp/libc-test/tmpfile", + "rm -rf /data/local/tmp/libc-test/__fwriting", + "rm -rf /data/local/tmp/libc-test/setbuf", + "rm -rf /data/local/tmp/libc-test/getwc", + "rm -rf /data/local/tmp/libc-test/ungetwc", + "rm -rf /data/local/tmp/libc-test/setlinebuf", + "rm -rf /data/local/tmp/libc-test/fputc", + "rm -rf /data/local/tmp/libc-test/fputs", + "rm -rf /data/local/tmp/libc-test/truncate", + "rm -rf /data/local/tmp/libc-test/fchownat", + "rm -rf /data/local/tmp/libc-test/fsync", + "rm -rf /data/local/tmp/libc-test/linkat", + "rm -rf /data/local/tmp/libc-test/lchown", + "rm -rf /data/local/tmp/libc-test/faccessat", + "rm -rf /data/local/tmp/libc-test/unlinkat", + "rm -rf /data/local/tmp/libc-test/acct", + "rm -rf /data/local/tmp/libc-test/exit", + "rm -rf /data/local/tmp/libc-test/readlinkat", + "rm -rf /data/local/tmp/libc-test/write", + "rm -rf /data/local/tmp/libc-test/getpid", + "rm -rf /data/local/tmp/libc-test/exittest02", + "rm -rf /data/local/tmp/libc-test/unlink", + "rm -rf /data/local/tmp/libc-test/readv", + "rm -rf /data/local/tmp/libc-test/pread", + "rm -rf /data/local/tmp/libc-test/syslog", + "rm -rf /data/local/tmp/libc-test/vsyslog", + "rm -rf /data/local/tmp/libc-test/res_query", + "rm -rf /data/local/tmp/libc-test/dlns_dlopen_test ", + "rm -rf /data/local/tmp/libc-test/dlns_set_fun_test", + "rm -rf /data/local/tmp/libc-test/dlns_inherit_test", + "rm -rf /data/local/tmp/libc-test/dlns_dlsym_test", + "rm -rf /data/local/tmp/libc-test/dlns_special_scene_test", + "rm -rf /data/local/tmp/libc-test/dlns_separated_test", + "rm -rf /data/local/tmp/libc-test/dlopen_ext_relro_test", + "rm -rf /data/local/tmp/libc-test/strptime_ext", + "rm -rf /data/local/tmp/libc-test/ctime", + "rm -rf /data/local/tmp/libc-test/asctime", + "rm -rf /data/local/tmp/libc-test/strftime_l", + "rm -rf /data/local/tmp/libc-test/strftime_ext", + "rm -rf /data/local/tmp/libc-test/localtime_r", + "rm -rf /data/local/tmp/libc-test/localtime", + "rm -rf /data/local/tmp/libc-test/ctime_r", + "rm -rf /data/local/tmp/libc-test/timegm", + "rm -rf /data/local/tmp/libc-test/asctime_r", + "rm -rf /data/local/tmp/libc-test/trace_stresstest", + "rm -rf /data/local/tmp/libc-test/ldso_randomization_test", + "rm -rf /data/local/tmp/libc-test/ldso_randomization_manual", + "rm -rf /data/local/tmp/libc-test/dlsym", + "rm -rf /data/local/tmp/libc-test/dynlink", + "rm -rf /data/local/tmp/libc-test/reloc_symver", + "rm -rf /data/local/tmp/libc-test/dynlink_default", + "rm -rf /data/local/tmp/libc-test/dlvsym", + "rm -rf /data/local/tmp/libc-test/sem_open", + "rm -rf /data/local/tmp/libc-test/ipc_shm", + "rm -rf /data/local/tmp/libc-test/tgkill", + "rm -rf /data/local/tmp/libc-test/fcntl", + "rm -rf /data/local/tmp/libc-test/tls_init_dlopen", + "rm -rf /data/local/tmp/libc-test/tls_align", + "rm -rf /data/local/tmp/libc-test/dlopen_ns", + "rm -rf /data/local/tmp/libc-test/tls_align_dlopen", + "rm -rf /data/local/tmp/libc-test/utim", + "rm -rf /data/local/tmp/libc-test/dlclose_reset", + "rm -rf /data/local/tmp/libc-test/ipc_sem", + "rm -rf /data/local/tmp/libc-test/ungetc", + "rm -rf /data/local/tmp/libc-test/fscanf", + "rm -rf /data/local/tmp/libc-test/pthread_cancel", + "rm -rf /data/local/tmp/libc-test/tls_init", + "rm -rf /data/local/tmp/libc-test/fdopen", + "rm -rf /data/local/tmp/libc-test/fwscanf", + "rm -rf /data/local/tmp/libc-test/dlopen", + "rm -rf /data/local/tmp/libc-test/ipc_msg", + "rm -rf /data/local/tmp/libc-test/ftello-unflushed-append", + "rm -rf /data/local/tmp/libc-test/malloc-brk-fail", + "rm -rf /data/local/tmp/libc-test/pthread_atfork-errno-clobber", + "rm -rf /data/local/tmp/libc-test/fflush-exit", + "rm -rf /data/local/tmp/libc-test/lseek-large", + "rm -rf /data/local/tmp/libc-test/tls_get_new-dtv", + "rm -rf /data/local/tmp/libc-test/flockfile-list", + "rm -rf /data/local/tmp/libc-test/rintf", + "rm -rf /data/local/tmp/libc-test/nearbyint", + "rm -rf /data/local/tmp/libc-test/fma", + "rm -rf /data/local/tmp/libc-test/fmal", + "rm -rf /data/local/tmp/libc-test/acoshl", + "rm -rf /data/local/tmp/libc-test/tgammal", + "rm -rf /data/local/tmp/libc-test/sqrtl", + "rm -rf /data/local/tmp/libc-test/erfcl", + "rm -rf /data/local/tmp/libc-test/rint", + "rm -rf /data/local/tmp/libc-test/lgammal", + "rm -rf /data/local/tmp/libc-test/nearbyintf", + "rm -rf /data/local/tmp/libc-test/fmaf", + "rm -rf /data/local/tmp/libc-test/sqrtf", + "rm -rf /data/local/tmp/libc-test/rintl", + "rm -rf /data/local/tmp/libc-test/sqrt", + "rm -rf /data/local/tmp/libc-test/nearbyintl", + "rm -rf /data/local/tmp/libc-test/fenv", + "rm -rf /data/local/tmp/libc-test/asinhl", + "rm -rf /data/local/tmp/libc-test/fatal_message", + "rm -rf /data/local/tmp/libc-test/utime", + "rm -rf /data/local/tmp/libc-test/network", + "rm -rf /data/local/tmp/libc-test/vfprintf", + "rm -rf /data/local/tmp/libc-test/gethostbyname2_r", + "rm -rf /data/local/tmp/libc-test/utimensat", + "rm -rf /data/local/tmp/libc-test/tgkill_ext", + "rm -rf /data/local/tmp/libc-test/getnetbyname", + "rm -rf /data/local/tmp/libc-test/getnetbyaddr", + "rm -rf /data/local/tmp/libc-test/getline", + "rm -rf /data/local/tmp/libc-test/setvbuf", + "rm -rf /data/local/tmp/libc-test/res_send", + "rm -rf /data/local/tmp/libc-test/fchmodat", + "rm -rf /data/local/tmp/libc-test/gethostbyaddr_r", + "rm -rf /data/local/tmp/libc-test/getnameinfo", + "rm -rf /data/local/tmp/libc-test/res_querydomain", + "rm -rf /data/local/tmp/libc-test/gethostbyname2", + "rm -rf /data/local/tmp/libc-test/gethostbyname_r", + "rm -rf /data/local/tmp/libc-test/gethostbyaddr" + ], + "cleanup-apps": true } - ], - "driver": { - "native-test-timeout": "120000", - "type": "CppTest", - "module-name": "ActToolChainTest", - "runtime-hint": "100s", - "native-test-device-path": "/data/local/tmp" - }, - "description": "Configuration for ActToolChainTest Tests" + ] } \ No newline at end of file diff --git a/commonlibrary/toolchain/libc-test/src/toolchaintest.cpp b/commonlibrary/toolchain/libc-test/src/toolchaintest.cpp index a88b6aa0b8ec8d866f954f6984e9d44cd311533b..cd82b3db719f37ec4aa90274a6ec298b144bc290 100644 --- a/commonlibrary/toolchain/libc-test/src/toolchaintest.cpp +++ b/commonlibrary/toolchain/libc-test/src/toolchaintest.cpp @@ -36,7 +36,7 @@ using namespace testing; namespace OHOS { class toolchaintest : public ::testing::TestWithParam {}; -static string filepath = "/data/local/tmp/libc-test/src"; +static string filepath = "/data/local/tmp/libc-test"; static vector temp = runtest::GetFileNames(filepath); volatile int t_status = 0;