Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
2d2cd0f4
T
Third Party Musl
项目概览
OpenHarmony
/
Third Party Musl
1 年多 前同步成功
通知
37
Star
125
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Musl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
2d2cd0f4
编写于
8月 23, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 23, 2022
浏览文件
操作
浏览文件
下载
差异文件
!478 fix runtest scripts
Merge pull request !478 from maweiye/fix-runtest
上级
c2ab2a72
e2b065a2
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
122 addition
and
48 deletion
+122
-48
scripts/runtest.sh
scripts/runtest.sh
+45
-24
scripts/runtest_Windows.bat
scripts/runtest_Windows.bat
+77
-24
未找到文件。
scripts/runtest.sh
浏览文件 @
2d2cd0f4
...
...
@@ -3,27 +3,48 @@ cd /data/tests/libc-test
rm
src/REPORT
touch
src/REPORT
for
filelist
in
src/
*
function
FileSuffix
()
{
local
filename
=
"
$1
"
if
[
-n
"
$filename
"
]
;
then
echo
"
${
filename
##*.
}
"
fi
}
for
dir
in
src/
*
do
if
[
-d
$filelist
]
;
then
for
file
in
`
ls
$filelist
`
if
[
-d
$dir
]
;
then
if
[
"
$dir
"
=
"src/functionalext"
]
then
# continue
for
subdir
in
$dir
/
*
do
if
[
"
$file
"
=
"runtest"
]
\
||
[
"
$file
"
=
"libdlopen_dso.so"
]
\
||
[
"
$file
"
=
"libtls_init_dso.
so"
]
\
||
[
"
$file
"
=
"libtls_align_dso.so
"
]
\
||
[
"
$file
"
=
"libtls_get_new-dtv_dso.so"
]
for
file
in
`
ls
$subdir
`
do
if
[
"
$(
FileSuffix
${
file
}
)
"
=
"
so"
]
\
||
[
"
$file
"
=
"trace_stresstest
"
]
\
||
[
-d
./
$subdir
/
$file
]
then
continue
else
if
[
"
$file
"
=
"tls_get_new-dtv"
]
;
then
cd
src/regression
/data/tests/libc-test/src/common/runtest
-w
''
$file
>>
/data/tests/libc-test/src/REPORT
cd
/data/tests/libc-test
else
src/common/runtest
-w
''
$filelist
/
$file
>>
src/REPORT
# echo file=$subdir/$file
src/common/runtest
-w
''
./
$subdir
/
$file
>>
src/REPORT
fi
done
done
else
# continue
for
file
in
`
ls
$dir
`
do
if
[
"
$file
"
=
"runtest"
]
\
||
[
"
$(
FileSuffix
${
file
}
)
"
=
"so"
]
\
||
[
-d
$file
]
then
continue
else
# echo file=$dir/$file
src/common/runtest
-w
''
$dir
/
$file
>>
src/REPORT
fi
done
fi
fi
done
\ No newline at end of file
scripts/runtest_Windows.bat
浏览文件 @
2d2cd0f4
@echo
off
@REM 本地OpenHarmony源码目录,
请根据实际环境修改!!
set
LOCAL
=
\\wsl$\ubuntu
-
20
.04\home\
OHOS\
@REM 本地编译out目录
set
OUTDIR
=
out
\
hi3516dv300
@REM 本地OpenHarmony源码目录,
需根据实际环境修改
set
LOCAL
=
\\wsl$\ubuntu
-
20
.04\home\
code\OHOS
@REM 本地编译
环境的
out目录
set
OUTDIR
=
out
\
rk3568
@REM 本地用例生成目录
set
TESTDIR
=
%LOCAL%
\
%OUTDIR%
\tests\unittest\libc
-test
\src
set
TESTDIRFEXT
=
%LOCAL%
\
%OUTDIR%
\tests\unittest\libc
-test
\src\functionalext
@REM 动态链接库生成目录
set
DYNLIB
=
%LOCAL%
\
%OUTDIR%
\musl\libc
-test-lib
@REM 远程传输目标目录
set
REMOTE
=
/data/tests/libc-test/src
set
REMOTEFEXT
=
/data/tests/libc-test/src/functionalext
set
REMOTESYSTEM
=
/system/lib
@REM runtest脚本所在目录
set
SHDIR
=
%LOCAL%
\third_party\musl\scripts
@REM 非必要情况下不要修改以下代码
@REM 开始时间
set
/a
startS
=
%time
:
~
6
,
2
%
set
/a
startM
=
%time
:
~
3
,
2
%
...
...
@@ -26,19 +28,13 @@ for /F "usebackq delims==" %%c in (`hdc list targets`) DO (
echo
%%c
|
findstr
"[Empty]"
&&
goto
noDevice
||
echo
%%c
&&
goto
hdcStart
)
@REM 在单板创建目录,
原先并不存在相应目录,也无法在传输时创建,因此
需要预先创建好才能传输到相应位置。
@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%
/api
hdc
shell
mkdir
%REMOTE%
/common
hdc
shell
mkdir
%REMOTE%
/functional
hdc
shell
mkdir
%REMOTE%
/math
hdc
shell
mkdir
%REMOTE%
/musl
hdc
shell
mkdir
%REMOTE%
/regression
@REM 创建临时文件夹,用于存放用例生成的临时文件
hdc
shell
mkdir
/tmp
...
...
@@ -48,17 +44,29 @@ goto hdcSend
@REM 传输文件,单板上执行runtest.sh,将结果REPORT返回到.bat所在目录
:hdcSend
for
/F
%%i
in
(
'dir
%TESTDIR%
/S /B'
)
do
(
for
%%b
in
(
"
%%i
\.."
)
do
(
echo
Sending
%%~nb
/
%%~nxi
if
"
%%~nb
"
==
"src"
(
hdc
shell
chmod
a
+x
%REMOTE%
/
%%~nxi
)
else
(
hdc
file
send
-sync
%%i
%REMOTE%
/
%%~nb
/
%%~nxi
hdc
shell
chmod
a
+x
%REMOTE%
/
%%~nb
/
%%~nxi
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 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
/
*
)
@REM 动态库传输
hdc
shell
mount
-o
rw
,
remount
/
hdc
shell
chmod
777
/etc
...
...
@@ -69,6 +77,37 @@ hdc file send %DYNLIB%\libdlclose_reset_dso.so %REMOTE%/functional/libdlclose_re
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/B
hdc
shell
mkdir
%REMOTE%
/functionalext/dlns/C
hdc
shell
mkdir
%REMOTE%
/functionalext/dlns/D
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
mv
/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
...
...
@@ -95,8 +134,22 @@ echo.
echo
================================
echo
The
test
cases
have
been
executed
.
@REM 删除临时文件夹
hdc
shell
rm
/tmp -rf
@REM 恢复现场
echo
Start
restore
the
scene
echo
hdc
shell
mv
/etc/ld-musl-namespace-arm
.ini
/etc/ld-musl-namespace-arm-test
.inherit_0300
echo
...
hdc
shell
mv
/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
%~dp0
REPORT
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录