提交 8cb5b452 编写于 作者: O openharmony_ci 提交者: Gitee

!159 libc-test测试用例

Merge pull request !159 from caifuzhou/master
...@@ -97,11 +97,13 @@ template("test_unittest") { ...@@ -97,11 +97,13 @@ template("test_unittest") {
#libs += [ "//${root_out_dir}/${test_lib_dir}/libdlopen_dso.so" ] #libs += [ "//${root_out_dir}/${test_lib_dir}/libdlopen_dso.so" ]
} }
if (target_name == "tls_align" || target_name == "tls_align_dlopen") { if (target_name == "tls_align") {
ldflags += [ "-Wl,-rpath=src/functional" ]
libs += [ "//${root_out_dir}/${test_lib_dir}/libtls_align_dso.so" ] libs += [ "//${root_out_dir}/${test_lib_dir}/libtls_align_dso.so" ]
} }
if (target_name == "tls_init" || target_name == "tls_init_dlopen") { if (target_name == "tls_init") {
ldflags += [ "-Wl,-rpath=src/functional" ]
libs += [ "//${root_out_dir}/${test_lib_dir}/libtls_init_dso.so" ] libs += [ "//${root_out_dir}/${test_lib_dir}/libtls_init_dso.so" ]
} }
} }
...@@ -134,7 +136,7 @@ template("test_unittest") { ...@@ -134,7 +136,7 @@ template("test_unittest") {
] ]
if (target_name == "tls_get_new-dtv") { if (target_name == "tls_get_new-dtv") {
ldflags += [ "-Wl,-rpath='\$ORIGIN'" ] ldflags += [ "-Wl,-rpath=./" ]
libs += libs +=
[ "//${root_out_dir}/${test_lib_dir}/libtls_get_new-dtv_dso.so" ] [ "//${root_out_dir}/${test_lib_dir}/libtls_get_new-dtv_dso.so" ]
} }
......
...@@ -10,6 +10,8 @@ set LOCAL=\\wsl$\ubuntu-20.04\home\OHOS\out\ohos-arm-release\tests\unittest\libc ...@@ -10,6 +10,8 @@ set LOCAL=\\wsl$\ubuntu-20.04\home\OHOS\out\ohos-arm-release\tests\unittest\libc
set REMOTE=/data/tests/libc-test/src set REMOTE=/data/tests/libc-test/src
@REM runtest脚本所在目录 @REM runtest脚本所在目录
set SHDIR=\\wsl$\Ubuntu-20.04\home\OHOS\third_party\musl\scripts set SHDIR=\\wsl$\Ubuntu-20.04\home\OHOS\third_party\musl\scripts
@REM 动态链接库所在目录
set DYNLIB=\\wsl$\Ubuntu-18.04\root\openhramony2\out\ohos-arm-release\musl\libc-test\lib
@REM 检查设备是否连接 @REM 检查设备是否连接
echo HDC device checking... echo HDC device checking...
...@@ -31,6 +33,14 @@ hdc shell mkdir %REMOTE%/functional ...@@ -31,6 +33,14 @@ hdc shell mkdir %REMOTE%/functional
hdc shell mkdir %REMOTE%/math hdc shell mkdir %REMOTE%/math
hdc shell mkdir %REMOTE%/musl hdc shell mkdir %REMOTE%/musl
hdc shell mkdir %REMOTE%/regression hdc shell mkdir %REMOTE%/regression
@REM 创建临时文件夹
hdc shell mkdir /tmp
hdc shell mkdir /dev/shm
@REM 创建存放动态库文件夹
hdc shell mkdir %REMOTE%/functional/src
hdc shell mkdir %REMOTE%/functional/src/functional
echo Done. echo Done.
goto hdcSend goto hdcSend
...@@ -40,14 +50,26 @@ for /F %%i in ('dir %LOCAL% /S /B') do ( ...@@ -40,14 +50,26 @@ for /F %%i in ('dir %LOCAL% /S /B') do (
for %%b in ("%%i\..") do ( for %%b in ("%%i\..") do (
echo Sending %%~nb/%%~nxi echo Sending %%~nb/%%~nxi
hdc file send -sync %%i %REMOTE%/%%~nb/%%~nxi hdc file send -sync %%i %REMOTE%/%%~nb/%%~nxi
hdc shell chmod 777 %REMOTE%/%%~nb/%%~nxi hdc shell chmod a+x %REMOTE%/%%~nb/%%~nxi
) )
) )
@REM 动态库传输
hdc file send %DYNLIB%\libdlopen_dso.so %REMOTE%/functional
hdc file send %DYNLIB%\libtls_get_new-dtv_dso.so %REMOTE%/regression
hdc file send %DYNLIB%\libtls_align_dso.so %REMOTE%/functional/src/functional
hdc file send %DYNLIB%\libtls_init_dso.so %REMOTE%/functional/src/functional
@REM 修改动态库权限
hdc shell chmod a+x %REMOTE%/functional/libdlopen_dso.so
hdc shell chmod a+x %REMOTE%/regression/libtls_get_new-dtv_dso.so
hdc shell chmod a+x %REMOTE%/functional/src/functional/libtls_align_dso.so
hdc shell chmod a+x %REMOTE%/functional/src/functional/libtls_init_dso.so
echo Done. echo Done.
echo. echo.
echo Sending run.sh echo Sending run.sh
hdc file send %SHDIR%\run.sh %REMOTE%/runtest.sh hdc file send %SHDIR%\run.sh %REMOTE%/runtest.sh
hdc shell chmod 777 %REMOTE%/runtest.sh hdc shell chmod a+x %REMOTE%/runtest.sh
echo. echo.
echo ============================ echo ============================
echo ALL files send finished. echo ALL files send finished.
...@@ -71,6 +93,11 @@ set /a endM=%time:~3,2% ...@@ -71,6 +93,11 @@ set /a endM=%time:~3,2%
set /a diffS_=%endS%-%startS% set /a diffS_=%endS%-%startS%
set /a diffM_=%endM%-%startM% set /a diffM_=%endM%-%startM%
echo All Done. Time cost:%diffM_%m%diffS_%s echo All Done. Time cost:%diffM_%m%diffS_%s
@REM 删除临时文件夹
hdc shell rm /tmp -rf
hdc shell rm /dev/shm -rf
@REM 完成所用时间 @REM 完成所用时间
echo. echo.
pause pause
......
...@@ -6,8 +6,12 @@ do ...@@ -6,8 +6,12 @@ do
cd /data/tests/libc-test/src/$filelist cd /data/tests/libc-test/src/$filelist
for file in $(ls) for file in $(ls)
do do
/data/tests/libc-test/src/common/runtest -w '' $file >>../REPORT if [ "$file" = "runtest" ] || [ "$file" = "libdlopen_dso.so" ] || [ "$file" = "libtls_get_new-dtv_dso.so" ] || [ "$file" = "src" ]; then
echo $filelist/$file continue
else
/data/tests/libc-test/src/common/runtest -w '' $file >>../REPORT
echo $filelist/$file
fi
done done
cd .. cd ..
done done
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册