提交 c9de585b 编写于 作者: L lushi1202

fix libuv xts

Signed-off-by: Nlushi1202 <lushi@huawei.com>
Change-Id: Ic530ea93fb539edd3a1cfb5979b3612e62626831
上级 1cd62d76
......@@ -34,7 +34,6 @@ group("arkui") {
"ace_napi_test:ActsAceNapiEtsTest",
"ace_standard:ActsAceStandardTest",
"ace_standard_video:ActsAceStandardVideoTest",
"libuv:ActsLibuvTestSuite",
"libuv:libuvTest",
]
}
......@@ -61,7 +61,6 @@ ohos_static_library("libuvTestStatic") {
"//third_party/libuv/test/test-get-passwd.c",
"//third_party/libuv/test/test-getaddrinfo.c",
"//third_party/libuv/test/test-gethostname.c",
"//third_party/libuv/test/test-getnameinfo.c",
"//third_party/libuv/test/test-getsockname.c",
"//third_party/libuv/test/test-getters-setters.c",
"//third_party/libuv/test/test-gettimeofday.c",
......@@ -209,8 +208,8 @@ ohos_executable("libuvruntest") {
deps = [ ":libuvTestStatic" ]
}
ohos_moduletest_suite("ActsLibuvTestSuite") {
sources = [ "src/ActsLibuvTestSuite.cpp" ]
ohos_moduletest_suite("ActsLibuvTest") {
sources = [ "src/ActsLibuvTest.cpp" ]
include_dirs = [
"//test/xts/acts/arkui/libuv/src",
......@@ -228,7 +227,7 @@ action("cpLibuv") {
script = "cplibuv.sh"
outputs = [ "${target_out_dir}/cplibuv.log" ]
deps = [
":ActsLibuvTestSuite",
":ActsLibuvTest",
":libuvruntest",
]
}
......@@ -237,7 +236,7 @@ group("libuvTest") {
testonly = true
if (is_standard_system) {
deps = [
":ActsLibuvTestSuite",
":ActsLibuvTest",
":cpLibuv",
":libuvruntest",
]
......
......@@ -14,8 +14,8 @@ Libuv测试套件使用Libuv三方库内原有的unittest,通过acts测试套
├── cplibuv.sh
├── genlocal.py
├── src
│ ├── ActsLibuvTestSuite.cpp
│ └── ActsLibuvTestSuite.h
│ ├── ActsLibuvTest.cpp
│ └── ActsLibuvTest.h
└── Test.json
```
......@@ -40,7 +40,7 @@ Libuv测试套件使用Libuv三方库内原有的unittest,通过acts测试套
* 测试运行:进入suites/acts目录,执行python -m xdevice,然后在命令框里输入一下命令
```bash
run -l ActsLibuvTestSuite
run -l ActsLibuvTest
```
{
"description": "Config for ActsLibuvTestSuite test cases",
"description": "Config for ActsLibuvTest test cases",
"driver": {
"module-name": "ActsLibuvTestSuite",
"module-name": "ActsLibuvTest",
"native-test-timeout": "120000",
"native-test-device-path": "/data/local/tmp",
"runtime-hint": "100s",
......@@ -10,13 +10,17 @@
"kits": [
{
"pre-push" : [
"mkdir -p /data/local/tmp/test/fixtures"
],
"post-push" : [
"chmod -R 777 /data/local/tmp/*"
],
"push": [
"ActsLibuvTestSuite->/data/local/tmp/ActsLibuvTestSuite",
"libuvdata/libuvruntest->/data/local/tmp/libuvruntest "
"ActsLibuvTest->/data/local/tmp/ActsLibuvTest",
"libuvdata/libuvruntest->/data/local/tmp/libuvruntest",
"libuvdata/test/fixtures/empty_file->/data/local/tmp/test/fixtures/empty_file",
"libuvdata/test/fixtures/load_error.node->/data/local/tmp/test/fixtures/load_error.node",
"libuvdata/test/fixtures/lorem_ipsum.txt->/data/local/tmp/test/fixtures/lorem_ipsum.txt"
],
"type": "PushKit"
},
......
......@@ -15,6 +15,7 @@
set -e
mkdir -p "suites/acts/testcases/libuvdata"
mkdir -p "suites/acts/testcases/libuvdata/test"
cp -rf "../../test/xts/acts/arkui/libuv/genlocal.py" "suites/acts/testcases/libuvdata"
cp -rf "common/common/libuvruntest" "suites/acts/testcases/libuvdata"
cp -rf "../../third_party/libuv/test/fixtures" "suites/acts/testcases/libuvdata/test"
......@@ -201,7 +201,7 @@ def new_report(bakdir, str):
if __name__ == '__main__':
latestpath = new_report("reports", "")
tmpfile = "tmptestsuite.xml"
putfile = "/result/ActsLibuvTestSuite.xml"
putfile = "/result/ActsLibuvTest.xml"
tasklogfile = "/log/task_log.log"
putdir = latestpath+putfile
tasklogpath = latestpath+tasklogfile
......
......@@ -15,7 +15,7 @@
#include <gtest/gtest.h>
#include <stdlib.h>
#include "ActsLibuvTestSuite.h"
#include "ActsLibuvTest.h"
extern "C"{
#include "runner.h"
}
......@@ -25,27 +25,27 @@ namespace OHOS {
using namespace testing::ext;
// Preset action of the test suite, which is executed before the first test case
void ActsLibuvTestSuite::SetUpTestCase(void)
void ActsLibuvTest::SetUpTestCase(void)
{
}
// Test suite cleanup action, which is executed after the last test case
void ActsLibuvTestSuite::TearDownTestCase(void)
void ActsLibuvTest::TearDownTestCase(void)
{
}
// Preset action of the test case
void ActsLibuvTestSuite::SetUp()
void ActsLibuvTest::SetUp()
{
}
// Cleanup action of the test case
void ActsLibuvTestSuite::TearDown()
void ActsLibuvTest::TearDown()
{
}
HWTEST_F(ActsLibuvTestSuite, TestLibuvTestCase001, Function | MediumTest | Level2)
HWTEST_F(ActsLibuvTest, TestLibuvTestCase001, Function | MediumTest | Level2)
{
printf("------start ActsLibuvTestSuite------\n");
printf("------start ActsLibuvTest------\n");
system("/data/local/tmp/libuvruntest");
EXPECT_TRUE(true);
printf("------end ActsLibuvTestSuite------\n");
printf("------end ActsLibuvTest------\n");
}
}
......@@ -18,7 +18,7 @@
#include <gtest/gtest.h>
namespace OHOS {
class ActsLibuvTestSuite : public testing::Test {
class ActsLibuvTest : public testing::Test {
public:
protected:
// Preset action of the test suite, which is executed before the first test case
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册