Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
44242a56
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
大约 1 年 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
44242a56
编写于
9月 05, 2022
作者:
F
FondMemoryVVV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move Toolchain to CommonLibrary
Signed-off-by:
N
FondMemoryVVV
<
mashuai53@huawei.com
>
上级
e5aa9825
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
19 addition
and
17 deletion
+19
-17
commonlibrary/BUILD.gn
commonlibrary/BUILD.gn
+4
-1
commonlibrary/toolchain/BUILD.gn
commonlibrary/toolchain/BUILD.gn
+2
-3
commonlibrary/toolchain/libc-test/BUILD.gn
commonlibrary/toolchain/libc-test/BUILD.gn
+0
-0
commonlibrary/toolchain/libc-test/Test.json
commonlibrary/toolchain/libc-test/Test.json
+0
-0
commonlibrary/toolchain/libc-test/include/getfiles.cpp
commonlibrary/toolchain/libc-test/include/getfiles.cpp
+0
-0
commonlibrary/toolchain/libc-test/include/gettestfiles.cpp
commonlibrary/toolchain/libc-test/include/gettestfiles.cpp
+0
-0
commonlibrary/toolchain/libc-test/include/runtest.h
commonlibrary/toolchain/libc-test/include/runtest.h
+0
-0
commonlibrary/toolchain/libc-test/include/setrlim.cpp
commonlibrary/toolchain/libc-test/include/setrlim.cpp
+1
-1
commonlibrary/toolchain/libc-test/src/toolchaintest.cpp
commonlibrary/toolchain/libc-test/src/toolchaintest.cpp
+12
-9
commonlibrary/toolchain/libc-test/tar_files.py
commonlibrary/toolchain/libc-test/tar_files.py
+0
-2
test_packages.gni
test_packages.gni
+0
-1
未找到文件。
commonlibrary/BUILD.gn
浏览文件 @
44242a56
...
...
@@ -15,6 +15,9 @@ import("//test/xts/tools/build/suite.gni")
group("commonlibrary") {
testonly = true
if (is_standard_system) {
deps = [ "ets_utils:ets_utils" ]
deps = [
"ets_utils:ets_utils",
"toolchain:toolchain",
]
}
}
toolchain/BUILD.gn
→
commonlibrary/
toolchain/BUILD.gn
浏览文件 @
44242a56
...
...
@@ -18,7 +18,6 @@ group("toolchain") {
deps = [ "//third_party/musl:libctest" ]
if (is_standard_system) {
deps += [
#":tar_testcases",
":tar_dllib",
]
}
...
...
@@ -39,7 +38,7 @@ action("tar_testcases") {
print("project_dirf-64:", project_dirf)
test_path = string_replace(project_dirf, "/tar_files.py", "")
script = rebase_path("//test/xts/acts/toolchain/libc-test/tar_files.py")
script = rebase_path("//test/xts/acts/
commonlibrary/
toolchain/libc-test/tar_files.py")
_outputs = [ "$target_out_dir/libc-test.tar" ]
outputs = _outputs
...
...
@@ -70,7 +69,7 @@ action("tar_dllib") {
print("project_dirf-64:", project_dirf)
dllib_path = string_replace(project_dirf, "/tar_files.py", "")
script = rebase_path("//test/xts/acts/toolchain/libc-test/tar_files.py")
script = rebase_path("//test/xts/acts/
commonlibrary/
toolchain/libc-test/tar_files.py")
_outputs = [ "$target_out_dir/libc-test-lib.tar" ]
outputs = _outputs
...
...
toolchain/libc-test/BUILD.gn
→
commonlibrary/
toolchain/libc-test/BUILD.gn
浏览文件 @
44242a56
文件已移动
toolchain/libc-test/Test.json
→
commonlibrary/
toolchain/libc-test/Test.json
浏览文件 @
44242a56
文件已移动
toolchain/libc-test/include/getfiles.cpp
→
commonlibrary/
toolchain/libc-test/include/getfiles.cpp
浏览文件 @
44242a56
文件已移动
toolchain/libc-test/include/gettestfiles.cpp
→
commonlibrary/
toolchain/libc-test/include/gettestfiles.cpp
浏览文件 @
44242a56
文件已移动
toolchain/libc-test/include/runtest.h
→
commonlibrary/
toolchain/libc-test/include/runtest.h
浏览文件 @
44242a56
文件已移动
toolchain/libc-test/include/setrlim.cpp
→
commonlibrary/
toolchain/libc-test/include/setrlim.cpp
浏览文件 @
44242a56
...
...
@@ -22,7 +22,7 @@ namespace OHOS {
int
runtest
::
t_setrlim
(
int
r
,
long
lim
)
{
struct
rlimit
rl
;
//Gets the current stack size
if
(
getrlimit
(
r
,
&
rl
))
{
printf
(
"getrlimit %d: %s
\n
"
,
r
,
strerror
(
errno
));
return
-
1
;
...
...
toolchain/libc-test/src/toolchaintest.cpp
→
commonlibrary/
toolchain/libc-test/src/toolchaintest.cpp
浏览文件 @
44242a56
...
...
@@ -41,20 +41,19 @@ static vector<std::string> temp = runtest::GetFileNames(filepath);
volatile
int
t_status
=
0
;
static
int
h_sigCount
=
0
;
static
void
handler
(
int
sig
)
{
(
void
)
sig
;
h_sigCount
++
;
}
static
int
start
(
c
har
*
wrap
,
c
onst
char
*
argvs
)
static
int
start
(
const
char
*
argvs
)
{
int
pid
,
space_size
=
100
*
1024
;
//Create a child process
//Set the process stack space
pid
=
fork
();
if
(
pid
==
0
)
{
runtest
::
t_setrlim
(
RLIMIT_STACK
,
space_size
);
//Overloading the subprocess space
int
exe
=
execl
(
argvs
,
"strptime"
,
nullptr
);
printf
(
"exe:%d %s exec failed: %s
\n
"
,
exe
,
argvs
,
strerror
(
errno
));
exit
(
1
);
...
...
@@ -64,12 +63,11 @@ static int start(char *wrap, const char *argvs)
static
int
runTests
(
const
char
*
argvs
)
{
char
wrap
[]
=
""
;
int
timeoutsec
=
5
,
timeout
=
0
;
int
status
,
pid
;
sigset_t
set
;
void
(
*
retfunc
)(
int
);
//signal set
sigemptyset
(
&
set
);
sigaddset
(
&
set
,
SIGCHLD
);
sigprocmask
(
SIG_BLOCK
,
&
set
,
nullptr
);
...
...
@@ -77,16 +75,19 @@ static int runTests(const char *argvs)
if
(
retfunc
==
SIG_ERR
)
{
printf
(
"signal triggering failed:%s
\n
"
,
strerror
(
errno
));
}
pid
=
start
(
wrap
,
argvs
);
pid
=
start
(
argvs
);
//The function system call failed
if
(
pid
==
-
1
)
{
printf
(
"%s fork failed: %s
\n
"
,
argvs
,
strerror
(
errno
));
printf
(
"FAIL %s [internal]
\n
"
,
argvs
);
return
-
1
;
}
struct
timespec
tp
;
//Maximum blocking time
tp
.
tv_sec
=
timeoutsec
;
tp
.
tv_nsec
=
0
;
if
(
sigtimedwait
(
&
set
,
nullptr
,
&
tp
)
==
-
1
)
{
//Call it again
if
(
errno
==
EAGAIN
)
{
timeout
=
1
;
}
else
{
...
...
@@ -96,11 +97,13 @@ static int runTests(const char *argvs)
printf
(
"%s kill failed: %s
\n
"
,
argvs
,
strerror
(
errno
));
}
}
//Waiting for the process to stop
if
(
waitpid
(
pid
,
&
status
,
0
)
!=
pid
)
{
printf
(
"%s waitpid failed: %s
\n
"
,
argvs
,
strerror
(
errno
));
printf
(
"FAIL %s [internal]
\n
"
,
argvs
);
return
-
1
;
}
//Process state
if
(
WIFEXITED
(
status
))
{
if
(
WEXITSTATUS
(
status
)
==
0
)
{
return
t_status
;
...
...
@@ -120,7 +123,7 @@ static int runTests(const char *argvs)
/**
* @tc.name : toolchaintest.LibcTest
* @tc.desc : start test
* @tc.level : Level
2
* @tc.level : Level
3
*/
HWTEST_P
(
toolchaintest
,
LibcTest
,
Function
|
MediumTest
|
Level3
)
{
...
...
toolchain/libc-test/tar_files.py
→
commonlibrary/
toolchain/libc-test/tar_files.py
浏览文件 @
44242a56
...
...
@@ -15,8 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License.
"""
import
os
import
argparse
import
tarfile
...
...
test_packages.gni
浏览文件 @
44242a56
...
...
@@ -47,7 +47,6 @@ _all_test_packages = [
"${ACTS_ROOT}/barrierfree:barrierfree",
"${ACTS_ROOT}/customization:customization",
"${ACTS_ROOT}/distributedschedule:systemabilitymgr",
"${ACTS_ROOT}/toolchain:toolchain",
]
_all_test_packages_ivi = [
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录