Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
15e0464c
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,发现更多精彩内容 >>
提交
15e0464c
编写于
8月 25, 2022
作者:
F
FondMemoryVVV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Modify the format
Signed-off-by:
N
FondMemoryVVV
<
mashuai53@huawei.com
>
上级
9b4503c4
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
28 addition
and
33 deletion
+28
-33
toolchain/BUILD.gn
toolchain/BUILD.gn
+2
-4
toolchain/libc-test/include/getfiles.cpp
toolchain/libc-test/include/getfiles.cpp
+1
-1
toolchain/libc-test/include/gettestfiles.cpp
toolchain/libc-test/include/gettestfiles.cpp
+2
-9
toolchain/libc-test/include/setrlim.cpp
toolchain/libc-test/include/setrlim.cpp
+1
-2
toolchain/libc-test/src/toolchaintest.cpp
toolchain/libc-test/src/toolchaintest.cpp
+9
-6
toolchain/libc-test/tar_files.py
toolchain/libc-test/tar_files.py
+13
-11
未找到文件。
toolchain/BUILD.gn
浏览文件 @
15e0464c
...
...
@@ -15,11 +15,9 @@ import("//test/xts/tools/build/suite.gni")
group("toolchain") {
testonly = true
deps = [
"//third_party/musl:libctest",
]
deps = [ "//third_party/musl:libctest" ]
if (is_standard_system) {
deps = [
deps
+
= [
#":tar_testcases",
":tar_dllib",
]
...
...
toolchain/libc-test/include/getfiles.cpp
浏览文件 @
15e0464c
...
...
@@ -22,8 +22,8 @@
#include "runtest.h"
using
namespace
std
;
vector
<
string
>
filenames
;
vector
<
string
>
filenames
;
vector
<
std
::
string
>
GetFileNames
(
std
::
string
path
)
{
vector
<
string
>
tempName
;
...
...
toolchain/libc-test/include/gettestfiles.cpp
浏览文件 @
15e0464c
...
...
@@ -20,8 +20,7 @@
#include "runtest.h"
void
GetTestNames
(
std
::
string
path
,
std
::
vector
<
std
::
string
>&
tempName
)
static
void
GetTestNames
(
std
::
string
path
,
std
::
vector
<
std
::
string
>&
tempName
)
{
DIR
*
pDir
;
struct
dirent
*
ptr
;
...
...
@@ -42,10 +41,4 @@ void GetTestNames(std::string path, std::vector<std::string>& tempName)
}
}
closedir
(
pDir
);
}
}
\ No newline at end of file
toolchain/libc-test/include/setrlim.cpp
浏览文件 @
15e0464c
...
...
@@ -40,5 +40,4 @@ int t_setrlim(int r, long lim)
return
-
1
;
}
return
0
;
}
}
\ No newline at end of file
toolchain/libc-test/src/toolchaintest.cpp
浏览文件 @
15e0464c
...
...
@@ -27,12 +27,15 @@
#include <sys/time.h>
#include <sys/resource.h>
#include "gtest/gtest.h"
#include "runtest.h"
#include "gtest/gtest.h"
using
namespace
std
;
using
namespace
testing
::
ext
;
class
ToolChainTest
:
public
::
testing
::
TestWithParam
<
string
>
{};
using
namespace
testing
;
class
toolchaintest
:
public
::
testing
::
TestWithParam
<
string
>
{};
static
string
filepath
=
"/data/local/tmp/libc-test/src"
;
static
vector
<
std
::
string
>
temp
=
GetFileNames
(
filepath
);
...
...
@@ -68,7 +71,7 @@ static int runTests(const char *argvs)
sigaddset
(
&
set
,
SIGCHLD
);
sigprocmask
(
SIG_BLOCK
,
&
set
,
nullptr
);
retfunc
=
signal
(
SIGCHLD
,
handler
);
if
(
retfunc
==
int
(
SIG_ERR
)
)
{
if
(
retfunc
==
SIG_ERR
)
{
printf
(
"signal triggering failed:%s
\n
"
,
strerror
(
errno
));
}
pid
=
start
(
wrap
,
argvs
);
...
...
@@ -111,11 +114,11 @@ static int runTests(const char *argvs)
}
/**
* @tc.name :
ToolChainT
est.LibcTest
* @tc.name :
toolchaint
est.LibcTest
* @tc.desc : start test
* @tc.level : Level 2
*/
static
HWTEST_F
(
ToolChainT
est
,
LibcTest
,
Function
|
MediumTest
|
Level3
)
HWTEST_P
(
toolchaint
est
,
LibcTest
,
Function
|
MediumTest
|
Level3
)
{
int
ret
;
string
testName
=
GetParam
();
...
...
@@ -127,4 +130,4 @@ static HWTEST_F(ToolChainTest, LibcTest, Function | MediumTest | Level3)
EXPECT_EQ
(
-
1
,
ret
)
<<
"test "
<<
testName
<<
" failed"
<<
endl
;
}
}
INSTANTIATE_TEST_CASE_P
(
libcTest
,
ToolChainTest
,
testing
::
ValuesIn
(
temp
.
begin
(),
temp
.
end
()));
INSTANTIATE_TEST_CASE_P
(
libcTest
,
toolchaintest
,
testing
::
ValuesIn
(
temp
.
begin
(),
temp
.
end
()));
\ No newline at end of file
toolchain/libc-test/tar_files.py
浏览文件 @
15e0464c
...
...
@@ -24,17 +24,19 @@ import shutil
copyFileCounts
=
0
def
copy_files
(
source_d
,
target_d
):
for
f
in
os
.
listdir
(
source_d
):
source_files
=
os
.
path
.
join
(
source_d
,
f
)
target_files
=
os
.
path
.
join
(
target_d
,
f
)
if
os
.
path
.
isfile
(
source_files
):
if
not
os
.
path
.
exists
(
target_d
):
os
.
makedirs
(
target_d
)
def
copyFiles
(
sourceDir
,
targetDir
):
global
copyFileCounts
for
f
in
os
.
listdir
(
sourceDir
):
sourceF
=
os
.
path
.
join
(
sourceDir
,
f
)
targetF
=
os
.
path
.
join
(
targetDir
,
f
)
if
os
.
path
.
isfile
(
sourceF
):
if
not
os
.
path
.
exists
(
targetDir
):
os
.
makedirs
(
targetDir
)
copyFileCounts
+=
1
open
(
target_files
,
"wb"
).
write
(
open
(
source_files
,
"rb"
).
read
())
if
os
.
path
.
isdir
(
source_files
):
copy_files
(
source_files
,
target_files
)
if
not
os
.
path
.
exists
(
targetF
)
or
(
os
.
path
.
exists
(
targetF
)
and
(
os
.
path
.
getsize
(
targetF
)
!=
os
.
path
.
getsize
(
sourceF
))):
open
(
targetF
,
"wb"
).
write
(
open
(
sourceF
,
"rb"
).
read
())
if
os
.
path
.
isdir
(
sourceF
):
copyFiles
(
sourceF
,
targetF
)
def
make_targz_one_by_one
(
output_filename
,
source_dir
):
tar
=
tarfile
.
open
(
output_filename
,
"w"
)
...
...
@@ -57,4 +59,4 @@ if __name__ == "__main__":
copyFiles
(
args
.
input_path
,
args
.
temp_path
)
make_targz_one_by_one
(
args
.
output_path
,
args
.
temp_path
)
shutil
.
rmtree
(
args
.
temp_path
)
#delete middle files
shutil
.
rmtree
(
args
.
temp_path
)
#delete middle files
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录