未验证 提交 5b65d32e 编写于 作者: O openharmony_ci 提交者: Gitee

!542 cherry-pick修改libc-test编译生成目录

Merge pull request !542 from maweiye/cherry-pick-1663756351
import("//build/test.gni")
ohos_unittest("main") {
module_out_path = "libc-test/src/api"
ohos_executable("main") {
subsystem_name = "musl"
part_name = "libc-test"
sources = [ "main.c" ]
......
......@@ -40,14 +40,13 @@ ohos_static_library("libtest") {
output_name = "libtest"
}
ohos_unittest("runtest") {
module_out_path = "libc-test/src/common"
ohos_executable("runtest") {
sources = [ "runtest.c" ]
configs = [ ":config_runtest" ]
deps = [ ":libtest" ]
subsystem_name = "musl"
part_name = "libc-test"
}
config("config_runtest") {
......
......@@ -9,7 +9,7 @@
# 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.
# limitations under the License.
import("../../../test_template.gni")
......@@ -26,8 +26,9 @@ group("dlns_test") {
]
}
ohos_unittest("dlns_dlopen_test") {
module_out_path = "libc-test/src/functionalext/dlns"
ohos_executable("dlns_dlopen_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = [
"../common",
"//third_party/musl/porting/linux/user/include",
......@@ -38,8 +39,9 @@ ohos_unittest("dlns_dlopen_test") {
configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ]
}
ohos_unittest("dlns_set_fun_test") {
module_out_path = "libc-test/src/functionalext/dlns"
ohos_executable("dlns_set_fun_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = [
"../common",
"//third_party/musl/porting/linux/user/include",
......@@ -50,8 +52,9 @@ ohos_unittest("dlns_set_fun_test") {
configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ]
}
ohos_unittest("dlns_inherit_test") {
module_out_path = "libc-test/src/functionalext/dlns"
ohos_executable("dlns_inherit_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = [
"../common",
"//third_party/musl/porting/linux/user/include",
......@@ -62,8 +65,9 @@ ohos_unittest("dlns_inherit_test") {
configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ]
}
ohos_unittest("dlns_separated_test") {
module_out_path = "libc-test/src/functionalext/dlns"
ohos_executable("dlns_separated_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = [
"../common",
"//third_party/musl/porting/linux/user/include",
......@@ -74,8 +78,9 @@ ohos_unittest("dlns_separated_test") {
configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ]
}
ohos_unittest("dlns_special_scene_test") {
module_out_path = "libc-test/src/functionalext/dlns"
ohos_executable("dlns_special_scene_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = [
"../common",
"//third_party/musl/porting/linux/user/include",
......@@ -86,8 +91,9 @@ ohos_unittest("dlns_special_scene_test") {
configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ]
}
ohos_unittest("dlns_dlsym_test") {
module_out_path = "libc-test/src/functionalext/dlns"
ohos_executable("dlns_dlsym_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = [
"../common",
"//third_party/musl/porting/linux/user/include",
......
......@@ -12,11 +12,11 @@
# limitations under the License.
functionalext_fortify_list = [
"fcntl",
"fcntl_ext",
"poll",
"socket",
"stat",
"socket_ext",
"stat_ext",
"unistd",
"stdio",
"string",
"string_ext",
]
......@@ -12,12 +12,12 @@
# limitations under the License.
functionalext_supplement_locale_test = [
"duplocale",
"langinfo",
"localeconv",
"newlocale",
"setlocale",
"uselocale",
"duplocale_sup",
"langinfo_sup",
"localeconv_sup",
"newlocale_sup",
"setlocale_sup",
"uselocale_sup",
"strxfrm",
"wcscoll",
"wcsxfrm",
......
......@@ -17,7 +17,7 @@ functionalext_supplement_math_test = [
"__signbitf",
"finite",
"nanl",
"rint",
"rint_ext",
"__fpclassifyl",
"finitef",
"significand",
......
......@@ -51,7 +51,7 @@ functionalext_supplement_network_test = [
"recvmsg",
"getpeername",
"freeifaddrs",
"getsockopt",
"getsockopt_network",
"gai_strerror",
"recv",
]
......@@ -12,7 +12,7 @@
# limitations under the License.
functionalext_supplement_select_test = [
"poll",
"poll_sup",
"pselect",
"select",
]
......@@ -12,8 +12,8 @@
# limitations under the License.
functionalext_supplement_stat_test = [
"statvfs",
"stat",
"statvfs_sup",
"stat_sup",
"statfs",
"mkfifo",
"mkfifoat",
......
......@@ -20,136 +20,153 @@ default_include_dirs =
default_configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ]
default_module_out_path = "libc-test/src/functionalext/supplement/thread"
ohos_unittest("pthread_attr_getstack_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_attr_getstack_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_attr_getstack.c" ]
}
ohos_unittest("pthread_attr_setdetachstate_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_attr_setdetachstate_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_attr_setdetachstate.c" ]
}
ohos_unittest("pthread_attr_setstacksize_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_attr_setstacksize_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_attr_setstacksize.c" ]
}
ohos_unittest("pthread_condattr_destroy_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_condattr_destroy_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_condattr_destroy.c" ]
}
ohos_unittest("pthread_condattr_init_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_condattr_init_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_condattr_init.c" ]
}
ohos_unittest("pthread_create_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_create_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_create.c" ]
}
ohos_unittest("pthread_exit_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_exit_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_exit.c" ]
}
ohos_unittest("pthread_getattr_np_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_getattr_np_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_getattr_np.c" ]
}
ohos_unittest("pthread_getschedparam_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_getschedparam_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_getschedparam.c" ]
}
ohos_unittest("pthread_getspecific_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_getspecific_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_getspecific.c" ]
}
ohos_unittest("pthread_key_create_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_key_create_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_key_create.c" ]
}
ohos_unittest("pthread_mutex_init_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_mutex_init_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_mutex_init.c" ]
}
ohos_unittest("pthread_mutex_lock_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_mutex_lock_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_mutex_lock.c" ]
}
ohos_unittest("pthread_mutex_unlock_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_mutex_unlock_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_mutex_unlock.c" ]
}
ohos_unittest("pthread_once_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_once_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_once.c" ]
}
ohos_unittest("pthread_rwlock_destroy_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_rwlock_destroy_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_rwlock_destroy.c" ]
}
ohos_unittest("pthread_setschedparam_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_setschedparam_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_setschedparam.c" ]
}
ohos_unittest("pthread_setspecific_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_setspecific_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_setspecific.c" ]
}
ohos_unittest("pthread_sigmask_test") {
module_out_path = default_module_out_path
ohos_executable("pthread_sigmask_test") {
subsystem_name = "musl"
part_name = "libc-test"
include_dirs = default_include_dirs
configs = default_configs
sources = [ "pthread_sigmask.c" ]
......
......@@ -32,7 +32,7 @@ functionalext_supplement_thread_test = [
"pthread_cond_init",
"pthread_cond_signal",
"pthread_cond_wait",
"pthread_cond_timedwait",
"pthread_cond_timedwait_sup",
"pthread_condattr_setpshared",
"pthread_mutexattr_settype",
"pthread_getcpuclockid",
......@@ -65,7 +65,7 @@ functionalext_supplement_thread_test = [
"pthread_attr_setschedparam",
"pthread_attr_setschedpolicy",
"pthread_attr_setscope",
"pthread_condattr_setclock",
"pthread_condattr_setclock_sup",
"pthread_mutexattr_setpshared",
"pthread_detach",
"pthread_rwlock_tryrdlock",
......@@ -77,5 +77,5 @@ functionalext_supplement_thread_test = [
"pthread_spin_unlock",
"pthread_key_delete",
"pthread_equal",
"pthread_rwlock_rdlock",
"pthread_rwlock_rdlock_sup",
]
......@@ -12,11 +12,11 @@
# limitations under the License.
functionalext_supplement_time_test = [
"difftime",
"gmtime_r",
"gmtime",
"mktime",
"time",
"difftime_sup",
"gmtime_r_sup",
"gmtime_sup",
"mktime_sup",
"time_sup",
"timer_create",
"timer_delete",
"timer_settime",
......@@ -24,7 +24,7 @@ functionalext_supplement_time_test = [
"timer_getoverrun",
"times",
"timespec_get",
"utime",
"utime_sup",
"wcsftime",
"wcsftime_l",
"nanosleep",
......
......@@ -10,4 +10,4 @@
# 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.
functionalext_tgkill_list = [ "tgkill" ]
functionalext_tgkill_list = [ "tgkill_ext" ]
......@@ -12,7 +12,7 @@
# limitations under the License.
functionalext_thread_list = [
"pthread_cond_timedwait",
"pthread_mutex",
"pthread_mutex_ext",
"pthread_rwlock_rdlock",
"pthread_rwlock_wrlock",
"pthread_guard_size",
......
......@@ -23,8 +23,8 @@ functionalext_time_test = [
"localtime",
"mktime",
"strftime_l",
"strftime",
"strptime",
"time",
"strftime_ext",
"strptime_ext",
"time_ext",
"timegm",
]
import("//build/test.gni")
ohos_unittest("nativehook_test") {
module_out_path = "libc-test/src/nativehook"
ohos_executable("nativehook_test") {
subsystem_name = "musl"
part_name = "libc-test"
sources = [
"print.c",
......
......@@ -27,8 +27,9 @@ template("test_unittest") {
target_name = invoker.target_name
target_dir = invoker.target_dir
target("ohos_unittest", "${target_name}") {
module_out_path = "libc-test/src/${target_dir}"
target("ohos_executable", "${target_name}") {
subsystem_name = "musl"
part_name = "libc-test"
if (target_cpu == "arm64") {
defines = [ "_ARM64_" ]
......
cd /data/tests/libc-test
rm src/REPORT
touch src/REPORT
cd /data/tests/libc-test/src
rm /data/tests/libc-test/REPORT
touch /data/tests/libc-test/REPORT
function FileSuffix() {
local filename="$1"
......@@ -12,7 +12,8 @@ function FileSuffix() {
#Test cases that need to be shielded
ShieldedList=("trace_stresstest" "fatal_message" "tgkill" "exittest01" "exittest02"
"syslog" "vsyslog" "ldso_randomization_manual" "ldso_randomization_test" "dlopen_ext_relro_test")
"syslog" "vsyslog" "ldso_randomization_manual" "ldso_randomization_test" "dlopen_ext_relro_test"
"runtest")
function ShieldedCases() {
for filename in ${ShieldedList[*]}
......@@ -24,62 +25,18 @@ function ShieldedCases() {
done
}
for dir in src/*
for file in `ls *`
do
if [ -d $dir ]; then
if [ "$dir" = "src/functionalext" ]
then
# continue
for subdir in $dir/*
do
if [ "$subdir" = "src/functionalext/supplement" ]
then
for supplementsubdir in $subdir/*
do
for subfile in `ls $supplementsubdir`
do
if [ "$(FileSuffix ${subfile})" = "so" ] \
|| [ "$(ShieldedCases ${subfile})" = "ShieldedCases" ] \
|| [ -d ./$supplementsubdir/$subfile ]
then
continue
else
src/common/runtest -w '' ./$supplementsubdir/$subfile >> src/REPORT
fi
done
done
else
for file in `ls $subdir`
do
if [ "$(FileSuffix ${file})" = "so" ] \
|| [ "$(ShieldedCases ${file})" = "ShieldedCases" ] \
|| [ -d ./$subdir/$file ]
then
continue
else
# echo file=$subdir/$file
src/common/runtest -w '' ./$subdir/$file >> src/REPORT
fi
done
fi
done
else
# continue
for file in `ls $dir`
do
if [ "$file" = "runtest" ] \
|| [ "$(FileSuffix ${file})" = "so" ] \
|| [ -d $file ]
then
continue
elif [ "$file" = "tgkill" ]
then
src/common/runtest -w '' $dir/$file 12345 34567 >> src/REPORT
else
# echo file=$dir/$file
src/common/runtest -w '' $dir/$file >> src/REPORT
fi
done
fi
if [ "$(FileSuffix ${file})" = "so" ] \
|| [ "$(ShieldedCases ${file})" = "ShieldedCases" ] \
|| [ -d $file ]
then
continue
elif [ "$file" = "tgkill" ]
then
./runtest -w '' $file 12345 34567 >> /data/tests/libc-test/REPORT
else
echo $subdir/$file >> FileList
./runtest -w '' $file >> /data/tests/libc-test/REPORT
fi
done
\ No newline at end of file
......@@ -6,12 +6,11 @@ set LOCAL=\\wsl$\ubuntu-20.04\home\code\OHOS
set OUTDIR=out\rk3568
@REM 本地用例生成目录
set TESTDIR=%LOCAL%\%OUTDIR%\tests\unittest\libc-test\src
set TESTDIRFEXT=%LOCAL%\%OUTDIR%\tests\unittest\libc-test\src\functionalext
set TESTDIR=%LOCAL%\%OUTDIR%\musl\libc-test
@REM 动态链接库生成目录
set DYNLIB=%LOCAL%\%OUTDIR%\musl\libc-test-lib
@REM 远程传输目标目录
set REMOTE=/data/tests/libc-test/src
set REMOTE=/data/tests/libc-test
set REMOTEFEXT=/data/tests/libc-test/src/functionalext
set REMOTESYSTEM=/system/lib
@REM runtest脚本所在目录
......@@ -22,19 +21,29 @@ set /a startS=%time:~6,2%
set /a startM=%time:~3,2%
@REM 检查设备是否连接
echo HDC device checking...
echo checking HDC device
for /F "usebackq delims==" %%c in (`hdc list targets`) DO (
echo Device list:
echo %%c | findstr "[Empty]" && goto noDevice || echo %%c && goto hdcStart
echo %%c | findstr "[Empty]" && goto noDevice || echo %%c && goto CheckDirectory
)
:CheckDirectory
echo checking TESTDIR
if exist %TESTDIR% (
echo TESTDIR: %TESTDIR%
) else (
echo Error: path "%TESTDIR%" was not found.
goto end
)
@REM 在单板创建目录, 需要预先创建好才能传输到相应位置。
:hdcStart
echo.
echo now mkdir...
hdc shell mkdir /data/tests
hdc shell mkdir /data/tests/libc-test
hdc shell mkdir %REMOTE%
hdc shell mkdir %REMOTE%/src
@REM 创建临时文件夹,用于存放用例生成的临时文件
hdc shell mkdir /tmp
......@@ -44,149 +53,26 @@ goto hdcSend
@REM 传输文件,单板上执行runtest.sh,将结果REPORT返回到.bat所在目录
:hdcSend
for /D %%i in (%TESTDIR%\*) do (
echo [MKdir] %REMOTE%/%%~ni
hdc shell mkdir %REMOTE%/%%~ni
@REM Check local subdirectory
for /D %%j in (%%i\*) do (
echo [MKdir] %REMOTE%/%%~ni/%%~nj
hdc shell mkdir %REMOTE%/%%~ni/%%~nj
@REM Check local subdirectory
for /D %%m in (%%j\*) do (
echo [MKdir] %REMOTE%/%%~ni/%%~nj/%%~nm
hdc shell mkdir %REMOTE%/%%~ni/%%~nj/%%~nm
@REM Check local subdirectory
for /D %%p in (%%m\*) do (
echo [MKdir] %REMOTE%/%%~ni/%%~nj/%%~nm/%%~np
hdc shell mkdir %REMOTE%/%%~ni/%%~nj/%%~nm/%%~np
@REM Send test cases to remote subdirectory
for %%q in (%%~p\*) do (
echo Sending %%q %REMOTE%/%%~ni/%%~nj/%%~nm/%%~np
hdc file send %%q %REMOTE%/%%~ni/%%~nj/%%~nm/%%~np
)
)
@REM Send test cases to remote subdirectory
for %%o in (%%~m\*) do (
echo Sending %%o %REMOTE%/%%~ni/%%~nj/%%~nm
hdc file send %%o %REMOTE%/%%~ni/%%~nj/%%~nm
)
hdc shell chmod +x %REMOTE%/%%~ni/%%~nj/%%~nm/*
)
@REM Send test cases to remote subdirectory
for %%k in (%%~j\*) do (
echo Sending %%k %REMOTE%/%%~ni/%%~nj
hdc file send %%k %REMOTE%/%%~ni/%%~nj
)
hdc shell chmod +x %REMOTE%/%%~ni/%%~nj/*
)
@REM Send test cases to remote directory
for %%l in (%%~i\*) do (
echo hdc file send %%l %REMOTE%/%%~ni
hdc file send %%l %REMOTE%/%%~ni
)
hdc shell chmod +x %REMOTE%/%%~ni/*
for %%i in (%TESTDIR%\*) do (
echo %%i
hdc file send %%i %REMOTE%/src
)
for %%j in (%DYNLIB%\*) do (
echo %%j
hdc file send %%j %REMOTE%/src
)
hdc shell chmod +x %REMOTE%/src/*
@REM 动态库传输
hdc shell mount -o rw,remount /
hdc shell chmod 777 /etc
hdc file send %LOCAL%\third_party\musl\porting\linux\user\ldso\ld-musl-namespace.ini /etc/ld-musl-namespace.ini
hdc file send %DYNLIB%\libdlopen_dso.so %REMOTE%/functional/libdlopen_dso.so
hdc file send %DYNLIB%\libdlopen_ns_dso.so %REMOTE%/functional/libdlopen_ns_dso.so
hdc file send %DYNLIB%\libdlclose_reset_dso.so %REMOTE%/functional/libdlclose_reset_dso.so
hdc file send %DYNLIB%\libtls_align_dso.so %REMOTE%/functional/libtls_align_dso.so
hdc file send %DYNLIB%\libtls_init_dso.so %REMOTE%/functional/libtls_init_dso.so
hdc file send %DYNLIB%\libtls_get_new-dtv_dso.so %REMOTE%/regression/libtls_get_new-dtv_dso.so
hdc file send %DYNLIB%\libdlopen_ns_dso.so %REMOTEFEXT%/dlns/libdlopen_ns_dso.so
hdc file send %DYNLIB%\libdlopen_ns_dso.so %REMOTESYSTEM%/libdlopen_ns_dso.so
hdc file send %DYNLIB%\libdso_easy_symver.so %REMOTESYSTEM%/libdso_easy_symver.so
hdc file send %DYNLIB%\libdso_hard_symver.so %REMOTESYSTEM%/libdso_hard_symver.so
hdc file send %DYNLIB%\libdso_no_symver.so %REMOTESYSTEM%/libdso_no_symver.so
hdc file send %DYNLIB%\libdso_symver.so %REMOTESYSTEM%/libdso_symver.so
hdc file send %DYNLIB%\libldso_randomization_dep.so %REMOTEFEXT%/ldso_randomization/libldso_randomization_dep.so
hdc file send %DYNLIB%\libldso_randomization_dep_a.so %REMOTEFEXT%/ldso_randomization/libldso_randomization_dep_a.so
hdc file send %DYNLIB%\libldso_randomization_dep_b.so %REMOTEFEXT%/ldso_randomization/libldso_randomization_dep_b.so
hdc file send %DYNLIB%\libldso_randomization_dep_c.so %REMOTEFEXT%/ldso_randomization/libldso_randomization_dep_c.so
hdc file send %DYNLIB%\libldso_randomization_dep_d.so %REMOTEFEXT%/ldso_randomization/libldso_randomization_dep_d.so
hdc file send %DYNLIB%\libldso_randomization_dep_e.so %REMOTEFEXT%/ldso_randomization/libldso_randomization_dep_e.so
hdc file send %DYNLIB%\libdlopen_ext_relro_dso.so %REMOTEFEXT%/relro/libdlopen_ext_relro_dso.so
@REM 构造测试所需环境
hdc shell mkdir %REMOTE%/functionalext/dlns/A
hdc shell mkdir %REMOTE%/functionalext/dlns/B
hdc shell mkdir %REMOTE%/functionalext/dlns/C
hdc shell mkdir %REMOTE%/functionalext/dlns/D
hdc file send %DYNLIB%\libdlns_dlsym_dep_a.so %REMOTEFEXT%/dlns/A/libdlns_dlsym_dep_a.so
hdc file send %DYNLIB%\libdlns_dlsym_dep_b.so %REMOTEFEXT%/dlns/B/libdlns_dlsym_dep_b.so
hdc file send %DYNLIB%\libdlns_dlsym_dep_c.so %REMOTEFEXT%/dlns/C/libdlns_dlsym_dep_c.so
hdc shell cp %REMOTEFEXT%/dlns/libdlopen_ns_dso.so %REMOTEFEXT%/dlns/sharedlibtest.so
hdc shell cp %REMOTEFEXT%/dlns/libdlopen_ns_dso.so %REMOTEFEXT%/dlns/B/libB.so
hdc shell cp %REMOTEFEXT%/dlns/libdlopen_ns_dso.so %REMOTEFEXT%/dlns/C/libC.so
hdc shell cp %REMOTEFEXT%/dlns/libdlopen_ns_dso.so %REMOTEFEXT%/dlns/D/libD.so
hdc shell cp %REMOTEFEXT%/dlns/libdlopen_ns_dso.so %REMOTEFEXT%/dlns/separated_0900.so
hdc shell cp %REMOTEFEXT%/dlns/libdlopen_ns_dso.so %REMOTEFEXT%/dlns/set_lib_path_0200.so
hdc shell cp %REMOTEFEXT%/dlns/libdlopen_ns_dso.so %REMOTEFEXT%/dlns/inherit_0300.so
hdc shell cp %REMOTEFEXT%/dlns/libdlopen_ns_dso.so %REMOTEFEXT%/dlns/inherit_0700.so
hdc shell cp %REMOTEFEXT%/dlns/libdlopen_ns_dso.so %REMOTEFEXT%/dlns/inherit_0800.so
hdc shell cp %REMOTEFEXT%/dlns/libdlopen_ns_dso.so %REMOTEFEXT%/dlns/inherit_1100.so
hdc shell cp /etc/ld-musl-namespace-arm.ini /etc/ld-musl-namespace-arm-temp.ini
hdc shell mv /etc/ld-musl-namespace-arm-test.ini /etc/ld-musl-namespace-arm.ini
@REM 修改动态库权限
hdc shell chmod a+x %REMOTE%/functional/libdlopen_dso.so
hdc shell chmod a+x %REMOTE%/functional/libdlopen_ns_dso.so
hdc shell chmod a+x %REMOTE%/functional/libdlclose_reset_dso.so
hdc shell chmod a+x %REMOTE%/functional/libtls_align_dso.so
hdc shell chmod a+x %REMOTE%/functional/libtls_init_dso.so
hdc shell chmod a+x %REMOTE%/regression/libtls_get_new-dtv_dso.so
echo Test cases sending finished.
echo.
goto sendSH
@REM 发送脚本并执行用例
:sendSH
echo Sending runtest.sh
hdc file send %SHDIR%\runtest.sh %REMOTE%/runtest.sh
hdc shell chmod a+x %REMOTE%/runtest.sh
echo runtest.sh has been transported.
echo.
echo hdc shell .%REMOTE%/runtest.sh
hdc shell .%REMOTE%/runtest.sh
echo.
echo ================================
echo The test cases have been executed.
hdc shell chmod +x %REMOTE%/runtest.sh
hdc shell %REMOTE%/runtest.sh
@REM 恢复现场
echo Start restore the scene
echo hdc shell mv /etc/ld-musl-namespace-arm.ini /etc/ld-musl-namespace-arm-test.ini
echo ...
hdc shell cp /etc/ld-musl-namespace-arm.ini /etc/ld-musl-namespace-arm-test.ini
hdc shell mv /etc/ld-musl-namespace-arm-temp.ini /etc/ld-musl-namespace-arm.ini
hdc shell rm %REMOTEFEXT%/dlns/sharedlibtest.so -rf
hdc shell rm %REMOTEFEXT%/dlns/B/libB.so -rf
hdc shell rm %REMOTEFEXT%/dlns/C/libC.so -rf
hdc shell rm %REMOTEFEXT%/dlns/D/libD.so -rf
hdc shell rm %REMOTEFEXT%/dlns/separated_0900.so -rf
hdc shell rm %REMOTEFEXT%/dlns/set_lib_path_0200.so -rf
hdc shell rm %REMOTEFEXT%/dlns/inherit_0300.so -rf
hdc shell rm %REMOTEFEXT%/dlns/inherit_0700.so -rf
hdc shell rm %REMOTEFEXT%/dlns/inherit_0800.so -rf
hdc shell rm %REMOTEFEXT%/dlns/inherit_1100.so -rf
hdc shell rm /dev/shm -rf
echo.
echo hdc file recv %REMOTE%/REPORT %~dp0REPORT
hdc file recv %REMOTE%/REPORT %~dp0REPORT
goto end
@REM 提示检查设备连接。
:noDevice
echo Device not found,please check your device.
goto end
@REM 完成所用时间
:end
echo.
set /a endS=%time:~6,2%
......@@ -194,17 +80,5 @@ set /a endM=%time:~3,2%
set /a diffS_=%endS%-%startS%
set /a diffM_=%endM%-%startM%
@REM REPORT文件比较
start python %LOCAL%\third_party\musl\scripts\compare.py
if exist "%LOCAL%\third_party\musl\scripts\\result.html" (
echo Test failed,please checking result.html!
) else (
echo Test successful!
)
echo file compareing finished
echo All items finished.
echo Time cost:%diffM_%m%diffS_%s .
echo.
pause
exit
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册