提交 54987294 编写于 作者: O openharmony_ci 提交者: Gitee

!1457 L2_LTS dfx cpp delete

Merge pull request !1457 from quxianfei/OpenHarmony-3.0-LTS
......@@ -14,14 +14,6 @@ import("//build/ohos_var.gni")
group("hiviewdfxtestacts") {
testonly = true
if (is_standard_system) {
deps = [
"faultloggertest/faultloggercpptest:ActsFaultLoggerTest",
"hiappeventtest/hiappeventjstest:ActsHiAppEventJsTest",
"hicollietest/hicolliecpptest:ActsHiCollieCppTest",
"hilogtest/libhilogtest:libhilogtestacts",
"hisyseventtest/hisyseventcpptest:ActsHiSysEventCPPTest",
"hitracetest/hitracecpptest:ActsHitraceCPPTest",
"hitracetest/hitracectest:ActsHitraceCTest",
]
deps = [ "hiappeventtest/hiappeventjstest:ActsHiAppEventJsTest" ]
}
}
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
module_output_path = "hits/faultloggertest"
###############################################################################
config("faultloggertest_config") {
visibility = [ ":*" ]
include_dirs = [
"../../utils/native",
"//utils/native/base/include/",
"//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
"genfault.h",
]
}
ohos_moduletest_suite("ActsFaultLoggerTest") {
module_out_path = module_output_path
sources = [
"faultloggertest.cpp",
"genfault.cpp",
]
deps = [
"../../utils/native:utilskit",
"//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
"//third_party/googletest:gtest_main",
"//utils/native/base:utils",
]
configs = [ ":faultloggertest_config" ]
}
{
"kits": [
{
"push": [
"ActsFaultLoggerTest->/data/local/tmp/ActsFaultLoggerTest"
],
"type": "PushKit"
}
],
"driver": {
"native-test-timeout": "120000",
"type": "CppTest",
"module-name": "ActsFaultLoggerTest",
"runtime-hint": "1s",
"native-test-device-path": "/data/local/tmp"
},
"description": "Configuration for ActsFaultLoggerTest Tests"
}
\ No newline at end of file
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <cstdarg>
#include <ctime>
#include <gtest/gtest.h>
#include <pthread.h>
#include "genfault.h"
#include "file_utils.h"
#include "hilog/log_c.h"
#include "hilog/log_cpp.h"
#undef LOG_DOMAIN
#undef LOG_TAG
#define LOG_DOMAIN 0xD003200
#define LOG_TAG "FAULTLOGGERTEST"
using namespace OHOS;
using namespace HiviewDFX;
using namespace testing::ext;
using namespace std;
class faultloggertest : public testing::Test {
public:
static void SetUpTestCase();
static void TearDownTestCase();
void SetUp();
void TearDown();
pid_t DoTestProcess(int faulttype);
int status;
private:
};
void faultloggertest::SetUp()
{
}
void faultloggertest::TearDown()
{
}
void faultloggertest::SetUpTestCase()
{
}
void faultloggertest::TearDownTestCase()
{
}
pid_t faultloggertest::DoTestProcess(int faulttype)
{
printf("DoTestProcess, param is %d\r\n", faulttype);
pid_t pid;
pid = fork();
printf("pid is %d\r\n", pid);
switch (pid) {
case -1:
std::cout<<"for pid failed"<<std::endl;
break;
case 0:
GenFault(faulttype);
break;
default:
break;
}
wait(&status);
printf("sub process end with status %d\r\n", status);
return pid;
}
/*
* @tc.name faultlogger Detect a cpp crash happen
* @tc.number DFX_DFR_FaultLogger_0100
* @tc.desc inject a cppcrash fault and check faultlogger can detect the fault
*/
HWTEST_F(faultloggertest, Faultlogger_Faultdetect, Function|MediumTest|Level1)
{
pid_t pid = DoTestProcess(3);
printf("pid is %d\r\n", pid);
printf("sub process end with status %d\r\n", faultloggertest::status);
ASSERT_FALSE(status == 0);
sleep(1);
std::vector<std::string> faultfilelist;
faultfilelist = getfileinpath("/data/log/faultlog/temp/");
printf("sizeof faultfilelist is %d\r\n", faultfilelist.size());
bool result = false;
for (std::string filename : faultfilelist) {
printf("file list is %s\r\n", filename.c_str());
if (filename.find("cppcrash-" + to_string(pid)) != string::npos) {
result = true;
break;
}
}
ASSERT_TRUE(true == result);
}
/*
* @tc.name faultlogger log file check
* @tc.number DFX_DFR_FaultLogger_0100
* @tc.desc inject a cppcrash fault and check faultlogger file
*/
HWTEST_F(faultloggertest, Faultlogger_Faultdetect1, Function|MediumTest|Level1)
{
pid_t pid = DoTestProcess(3);
printf("pid is %d\r\n", pid);
printf("sub process end with status %d\r\n", faultloggertest::status);
sleep(1);
std::vector<std::string> faultfilelist;
faultfilelist = getfileinpath("/data/log/faultlog/temp/");
printf("sizeof faultfilelist is %d\r\n", faultfilelist.size());
bool result = false;
std::string faultloggerfile = "";
for (std::string filename : faultfilelist) {
if (filename.find("cppcrash-" + to_string(pid)) != std::string::npos) {
printf("file list is %s\r\n", filename.c_str());
faultloggerfile = filename;
break;
}
}
string fileinfo;
fileinfo = ReadFile("/data/log/faultlog/temp/" + faultloggerfile);
std::vector<std::string> para = {"Pid:" + to_string(pid), "Uid:0",
"Process name:", "/data/local/tmp/faultloggertest",
"Reason:Signal:SIGILL", "Fault thread Info:",
"Tid:" + to_string(pid), "Name:faultloggertest"};
if (!fileinfo.empty()) {
result = CheckInfo(para, fileinfo);
} else {
std::cout << "Faultlogger_Faultdetect1 file error" << std::endl;
}
ASSERT_TRUE(result);
GTEST_LOG_(INFO) << "Faultlogger_Faultdetect1 end" << endl;
}
\ No newline at end of file
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef TEST_COMMON_H
#define TEST_COMMON_H
#include <stdlib.h>
#include <string.h>
#include <thread>
#include <unistd.h>
typedef enum {
FAULT_HEAP = 1,
FAULT_STACK = 2,
FAULT_NULLPTR = 3,
}FaultType;
void FaultHeap(int value)
{
int* arraytest = new int[123];
delete []arraytest;
printf("%d", arraytest[value]);
}
void FaultStack(int value)
{
int arraytest[123];
printf("value of i is %d", arraytest[value]);
}
void FaultNullPointer()
{
const int num = 80;
int *i = nullptr;
*i = num;
}
void GenFault(int faulttype)
{
printf("genFault, param is %d\r\n", faulttype);
switch (faulttype) {
case FAULT_HEAP:
FaultHeap(125);
case FAULT_STACK:
FaultStack(125);
case FAULT_NULLPTR:
FaultNullPointer();
break;
}
}
#endif
\ No newline at end of file
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "file_utils.h"
void GenFault(int faulttype);
\ No newline at end of file
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
module_output_path = "hits/HiCollieCppTest"
###############################################################################
config("xcollie_config") {
visibility = [ ":*" ]
include_dirs = [
"../../utils/native",
"//utils/native/base/include/",
"//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
"//base/hiviewdfx/hicollie/interfaces/native/innerkits/include",
]
}
ohos_moduletest_suite("ActsHiCollieCppTest") {
module_out_path = module_output_path
sources = [ "HiCollieCppTest.cpp" ]
deps = [
"../../utils/native:utilskit",
"//base/hiviewdfx/hicollie/interfaces/native/innerkits:libhicollie",
"//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
"//third_party/googletest:gtest_main",
"//utils/native/base:utils",
]
configs = [ ":xcollie_config" ]
}
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <string>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <regex>
#include <gtest/gtest.h>
#include <unistd.h>
#include <sys/wait.h>
#include "xcollie/xcollie.h"
#include "xcollie/xcollie_checker.h"
#include "xcollie/xcollie_define.h"
#include "ctime"
#include "file_utils.h"
using namespace testing;
using namespace testing::ext;
using namespace std;
using namespace OHOS::HiviewDFX;
namespace {
int g_type = 1;
int g_blockTime;
int g_waitTime;
int g_setTimeout;
int g_updateTime = -1;
int g_cancelTimeout = -1;
}
class HiCollieCppTest : public testing::Test {
public:
int callbackCnt_;
static void SetUpTestCase();
static void TearDownTestCase();
void SetUp();
void TearDown();
string ReadFileList(string basePath, string param);
bool ReadHilogcatredirectFile(string path, string context);
void XcollieTestInstance(string testItem);
void DoXCollieTest();
void TimeCallback(void *data);
void SetCallbackCnt(int cnt);
HiCollieCppTest();
~HiCollieCppTest();
private:
};
HiCollieCppTest::HiCollieCppTest():callbackCnt_(0)
{
}
HiCollieCppTest::~HiCollieCppTest()
{
}
void HiCollieCppTest::SetUp()
{
std::cout << "SetUp" << std::endl;
}
void HiCollieCppTest::TearDown()
{
std::cout << "TearDown" << std::endl;
g_updateTime = -1;
g_cancelTimeout = -1;
}
void HiCollieCppTest::SetUpTestCase()
{
std::cout << "SetUpTestCase" << std::endl;
}
void HiCollieCppTest::TearDownTestCase()
{
std::cout << "TearDownTestCase" << std::endl;
}
void HiCollieCppTest::TimeCallback(void *data)
{
callbackCnt_++;
}
void HiCollieCppTest::SetCallbackCnt(int cnt)
{
callbackCnt_ = cnt;
}
class XCollieCheckerAssist : public XCollieChecker {
using XCollieChecker::XCollieChecker;
virtual void CheckLock()
{
// sleep 35 seconds
sleep(35);
}
};
void HiCollieCppTest::DoXCollieTest()
{
pid_t pid;
int status;
// Fork a child process for leak injection
pid = fork();
if (pid == -1) {
cout<<"fail to fork!"<<endl;
exit(1);
} else if (pid == 0) {
XcollieTestInstance("WATCHDOG");
sleep(g_blockTime);
exit(0);
} else {
wait(&status);
}
}
void HiCollieCppTest::XcollieTestInstance(string testItem)
{
cout<<"XcollieTestInstance start"<<endl;
if (testItem == "TIMEOUT") {
int id = XCollie::GetInstance().SetTimer("TimeoutTimer", g_setTimeout, nullptr, nullptr, g_type);
if (g_updateTime != -1) {
bool ret = XCollie::GetInstance().UpdateTimer(id, g_updateTime);
if (ret) {
cout<<"Update timer succeed,reset as "<<g_updateTime<<endl;
} else {
cout<<"Update timer failed!"<<endl;
}
}
if (g_cancelTimeout != -1) {
XCollie::GetInstance().CancelTimer(id);
}
sleep(g_blockTime);
XCollie::GetInstance().CancelTimer(id);
} else if (testItem == "WATCHDOG") {
const OHOS::sptr<XCollieChecker> checker = new XCollieCheckerAssist("checker");
XCollie::GetInstance().RegisterXCollieChecker(checker, g_type);
sleep(g_waitTime);
}
}
/**
* @tc.name Verify that when the native layer is blocked by the main thread of
* the monitored service, the service restarts after 60 seconds
* @tc.number DFX_DFR_Xcollie_Watchdog_0001
* @tc.desc Verify that the native layer is blocked by the main thread of the monitored service
*/
HWTEST_F(HiCollieCppTest, Xcollie_watchdog_test, Function|MediumTest|Level1) {
GTEST_LOG_(INFO) << "Xcollie_watchdog_test start" << endl;
g_type = XCOLLIE_THREAD;
g_blockTime = 61;
g_waitTime = 20;
DoXCollieTest();
string cmd = "";
bool result = false;
sleep(90);
std::vector<std::string> cmdret;
cmd = "ps -A |grep HiCollieCppTest";
unsigned long cmdretlen;
cmdretlen = ExecCmdWithRet(cmd, cmdret);
if (cmdretlen == 1) {
result = true;
} else {
GTEST_LOG_(INFO) << "failed to get xcollie log." << endl;
}
ASSERT_TRUE(result);
GTEST_LOG_(INFO) << "Xcollie_watchdog_test end" << endl;
}
/**
* @tc.name Verify that the native layer service deadlock and
* main thread blocking are monitored at the same time
* @tc.number DFX_DFR_Xcollie_Watchdog_0002
* @tc.desc Verify that the native layer service deadlock and main thread blocking
*/
HWTEST_F(HiCollieCppTest, Xcollie_watchdog_test1, Function|MediumTest|Level1) {
GTEST_LOG_(INFO) << "Xcollie_watchdog_test1 start" << endl;
string cmd = "";
bool result = false;
g_type = XCOLLIE_LOCK|XCOLLIE_THREAD;
g_blockTime = 61;
g_waitTime = 20;
DoXCollieTest();
sleep(90);
std::vector<std::string> cmdret;
cmd = "ps -A |grep HiCollieCppTest";
unsigned long cmdretlen;
cmdretlen = ExecCmdWithRet(cmd, cmdret);
if (cmdretlen == 1) {
result = true;
} else {
GTEST_LOG_(INFO) << "failed to get xcollie log." << endl;
}
ASSERT_TRUE(result);
GTEST_LOG_(INFO) << "Xcollie_watchdog_test1 end" << endl;
}
/**
* @tc.name When a deadlock occurs in the monitored service of the native layer,
* the service restarts after 60 seconds
* @tc.number DFX_DFR_Xcollie_Watchdog_0003
* @tc.desc Verify that deadlock occurs in the monitored service of the native layer
*/
HWTEST_F(HiCollieCppTest, Xcollie_watchdog_test2, Function|MediumTest|Level1) {
GTEST_LOG_(INFO) << "Xcollie_watchdog_test2 start" << endl;
g_type = XCOLLIE_LOCK;
g_blockTime = 30;
g_waitTime = 75;
DoXCollieTest();
string cmd = "";
bool result = false;
sleep(110);
std::vector<std::string> cmdret;
cmd = "ps -A |grep HiCollieCppTest";
unsigned long cmdretlen;
cmdretlen = ExecCmdWithRet(cmd, cmdret);
if (cmdretlen == 1) {
result = true;
} else {
GTEST_LOG_(INFO) << "failed to get xcollie log." << endl;
}
ASSERT_TRUE(result);
GTEST_LOG_(INFO) << "Xcollie_watchdog_test2 end" << endl;
}
/**
* @tc.name verification of callback funcitons
* @tc.number DFX_DFR_Xcollie_Timeout_0001
* @tc.desc callback funcitons
*/
HWTEST_F(HiCollieCppTest, Xcollie_Timeout_test, Function|MediumTest|Level1) {
GTEST_LOG_(INFO) << "Xcollie_Timeout_test start" << endl;
g_type = XCOLLIE_FLAG_NOOP;
SetCallbackCnt(0);
auto func = [this](void *data) {
this->TimeCallback(data);
};
int last = XCollie::GetInstance().SetTimer("TimeoutTimer", 61, func, nullptr, g_type);
ASSERT_TRUE(last != INVALID_ID);
GTEST_LOG_(INFO) << "Xcollie_Timeout_test end" << endl;
}
/**
* @tc.name UpdateTimer interface test
* @tc.number DFX_DFR_Xcollie_interface_0001
* @tc.desc interface test
*/
HWTEST_F(HiCollieCppTest, Xcollie_interface_test, Function|MediumTest|Level1)
{
int id = XCollie::GetInstance().SetTimer("TimeoutTimerTest", 1, nullptr, nullptr, XCOLLIE_FLAG_NOOP);
ASSERT_NE(id, INVALID_ID);
bool result = XCollie::GetInstance().UpdateTimer(id, 1);
ASSERT_TRUE(result);
}
/**
* @tc.name UpdateTimer interface test, id is invalid
* @tc.number DFX_DFR_Xcollie_interface_0002
* @tc.desc interface test
*/
HWTEST_F(HiCollieCppTest, Xcollie_interface_test1, Function|MediumTest|Level1)
{
int id = -1;
int timeout = 100;
bool result = XCollie::GetInstance().UpdateTimer(id, timeout);
ASSERT_FALSE(result);
}
/**
* @tc.name UpdateTimer interface test, timeout is 0
* @tc.number DFX_DFR_Xcollie_interface_0003
* @tc.desc interface test
*/
HWTEST_F(HiCollieCppTest, Xcollie_interface_test2, Function|MediumTest|Level1)
{
bool result = XCollie::GetInstance().UpdateTimer(10, 0);
ASSERT_FALSE(result);
}
/**
* @tc.name SetTimer interface test, timeout is 0
* @tc.number DFX_DFR_Xcollie_interface_0004
* @tc.desc interface test
*/
HWTEST_F(HiCollieCppTest, Xcollie_interface_test3, Function|MediumTest|Level1)
{
int id = XCollie::GetInstance().SetTimer("Timer", 0, nullptr, nullptr, XCOLLIE_FLAG_NOOP);
ASSERT_EQ(id, INVALID_ID);
}
/**
* @tc.name SetTimer interface test, timeout is negative.
* @tc.number DFX_DFR_Xcollie_interface_0005
* @tc.desc interface test
*/
HWTEST_F(HiCollieCppTest, Xcollie_interface_test4, Function|MediumTest|Level1)
{
int id = XCollie::GetInstance().SetTimer("Timer", -2, nullptr, nullptr, XCOLLIE_FLAG_NOOP);
ASSERT_TRUE(id != INVALID_ID);
}
/**
* @tc.name SetTimer interface test, service name is very long.
* @tc.number DFX_DFR_Xcollie_interface_0006
* @tc.desc interface test
*/
HWTEST_F(HiCollieCppTest, Xcollie_interface_test5, Function|MediumTest|Level1)
{
std::string name = "abcd";
for (int i = 0; i < 1000; i++) {
name += "abcd";
}
int id = XCollie::GetInstance().SetTimer(name, 5, nullptr, nullptr, XCOLLIE_FLAG_NOOP);
ASSERT_TRUE(id != INVALID_ID);
}
/**
* @tc.name SetTimer interface test, when type is invalid.
* @tc.number DFX_DFR_Xcollie_interface_0007
* @tc.desc interface test
*/
HWTEST_F(HiCollieCppTest, Xcollie_interface_test6, Function|MediumTest|Level1)
{
int id = XCollie::GetInstance().SetTimer("Timer", 5, nullptr, nullptr, XCOLLIE_FLAG_NOOP + 100);
ASSERT_TRUE(id != INVALID_ID);
}
\ No newline at end of file
{
"kits": [
{
"push": [
"ActsHiCollieCppTest->/data/local/tmp/ActsHiCollieCppTest"
],
"type": "PushKit",
"post-push": [
"chmod -R 777 /data/local/tmp/*"
]
}
],
"driver": {
"native-test-timeout": "120000",
"type": "CppTest",
"module-name": "ActsHiCollieCppTest",
"runtime-hint": "1s",
"native-test-device-path": "/data/local/tmp"
},
"description": "Configuration for ActsHiCollieCppTest Tests"
}
\ No newline at end of file
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
group("libhilogtestacts") {
testonly = true
deps = [
"hilogtest:ActsHilogTest",
"libhilogCPPtest:ActsLibhilogCPPTest",
"libhilogCtest:ActsLibhilogCTest",
]
}
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
module_output_path = "hits/hilogtest"
###############################################################################
config("hilogtest_config") {
visibility = [ ":*" ]
include_dirs = [
"../../../utils/native",
"//utils/native/base/include/",
"//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
]
}
ohos_moduletest_suite("ActsHilogTest") {
module_out_path = module_output_path
sources = [ "hilogtest.cpp" ]
deps = [
"../../../utils/native:utilskit",
"//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
"//third_party/googletest:gtest_main",
"//utils/native/base:utils",
]
#external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
configs = [ ":hilogtest_config" ]
}
{
"kits": [
{
"push": [
"ActsHilogTest->/data/local/tmp/ActsHilogTest"
],
"type": "PushKit"
}
],
"driver": {
"native-test-timeout": "120000",
"type": "CppTest",
"module-name": "ActsHilogTest",
"runtime-hint": "1s",
"native-test-device-path": "/data/local/tmp"
},
"description": "Configuration for ActsHilogTest Tests"
}
\ No newline at end of file
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
module_output_path = "hits/LibhilogCPPtest"
###############################################################################
config("hilogtest_config") {
visibility = [ ":*" ]
include_dirs = [
"../../../utils/native",
"//utils/native/base/include/",
"//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
]
}
ohos_moduletest_suite("ActsLibhilogCPPTest") {
module_out_path = module_output_path
sources = [ "LibhilogCPPtest.cpp" ]
deps = [
"../../../utils/native:utilskit",
"//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
"//third_party/googletest:gtest_main",
"//utils/native/base:utils",
]
#external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
configs = [ ":hilogtest_config" ]
}
{
"kits": [
{
"push": [
"ActsLibhilogCPPTest->/data/local/tmp/ActsLibhilogCPPTest"
],
"type": "PushKit"
}
],
"driver": {
"native-test-timeout": "120000",
"type": "CppTest",
"module-name": "ActsLibhilogCPPTest",
"runtime-hint": "1s",
"native-test-device-path": "/data/local/tmp"
},
"description": "Configuration for ActsLibhilogCPPTest Tests"
}
\ No newline at end of file
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
module_output_path = "hits/libhilogCtest"
###############################################################################
config("hilogtest_config") {
visibility = [ ":*" ]
include_dirs = [
"../../../utils/native",
"//utils/native/base/include/",
"//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
]
}
ohos_moduletest_suite("ActsLibhilogCTest") {
module_out_path = module_output_path
sources = [ "libhilogCtest.cpp" ]
deps = [
"../../../utils/native:utilskit",
"//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
"//third_party/googletest:gtest_main",
"//utils/native/base:utils",
]
#external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
configs = [ ":hilogtest_config" ]
}
{
"kits": [
{
"push": [
"ActsLibhilogCTest->/data/local/tmp/ActsLibhilogCTest"
],
"type": "PushKit"
}
],
"driver": {
"native-test-timeout": "120000",
"type": "CppTest",
"module-name": "ActsLibhilogCTest",
"runtime-hint": "1s",
"native-test-device-path": "/data/local/tmp"
},
"description": "Configuration for ActsLibhilogCTest Tests"
}
\ No newline at end of file
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
module_output_path = "hit/HiSysEventCPPTest"
###############################################################################
config("hilogtest_config") {
visibility = [ ":*" ]
include_dirs = [
"../../utils/native",
"//utils/native/base/include/",
"//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
"//base/hiviewdfx/hisysevent/interfaces/native/innerkits/include",
]
}
ohos_moduletest_suite("ActsHiSysEventCPPTest") {
module_out_path = module_output_path
sources = [ "HiSysEventCPPTest.cpp" ]
deps = [
"../../utils/native:utilskit",
"//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
"//base/hiviewdfx/hisysevent/interfaces/native/innerkits:libhisysevent",
"//third_party/googletest:gtest_main",
"//utils/native/base:utils",
]
configs = [ ":hilogtest_config" ]
}
{
"kits": [
{
"push": [
"ActsHiSysEventCPPTest->/data/local/tmp/ActsHiSysEventCPPTest"
],
"type": "PushKit"
}
],
"driver": {
"native-test-timeout": "120000",
"type": "CppTest",
"module-name": "ActsHiSysEventCPPTest",
"runtime-hint": "1s",
"native-test-device-path": "/data/local/tmp"
},
"description": "Configuration for ActsHiSysEventCPPTest Tests"
}
\ No newline at end of file
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
module_output_path = "hits/HitraceCPPtest"
###############################################################################
config("hitrace_config") {
visibility = [ ":*" ]
include_dirs = [
"../../utils/native",
"//utils/native/base/include/",
"//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
"//base/hiviewdfx/hitrace/interfaces/native/innerkits/include",
"//base/hiviewdfx/hisysevent/interfaces/native/innerkits/include",
]
}
ohos_moduletest_suite("ActsHitraceCPPTest") {
module_out_path = module_output_path
sources = [ "HitraceCPPtest.cpp" ]
deps = [
"../../utils/native:utilskit",
"//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
"//base/hiviewdfx/hisysevent/interfaces/native/innerkits:libhisysevent",
"//base/hiviewdfx/hitrace/interfaces/native/innerkits:libhitrace",
"//third_party/googletest:gtest_main",
"//utils/native/base:utils",
]
configs = [ ":hitrace_config" ]
}
{
"kits": [
{
"push": [
"ActsHitraceCPPTest->/data/local/tmp/ActsHitraceCPPTest"
],
"type": "PushKit",
"post-push": [
"chmod -R 777 /data/local/tmp/*"
]
}
],
"driver": {
"native-test-timeout": "120000",
"type": "CppTest",
"module-name": "ActsHitraceCPPTest",
"runtime-hint": "1s",
"native-test-device-path": "/data/local/tmp"
},
"description": "Configuration for ActsHitraceCPPTest Tests"
}
\ No newline at end of file
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
module_output_path = "hits/HitraceCtest"
###############################################################################
config("hitrace_config") {
visibility = [ ":*" ]
include_dirs = [
"../../utils/native",
"//utils/native/base/include/",
"//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
"//base/hiviewdfx/hitrace/interfaces/native/innerkits/include",
]
}
ohos_moduletest_suite("ActsHitraceCTest") {
module_out_path = module_output_path
sources = [ "HitraceCtest.cpp" ]
deps = [
"../../utils/native:utilskit",
"//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
"//base/hiviewdfx/hitrace/interfaces/native/innerkits:libhitrace",
"//third_party/googletest:gtest_main",
"//utils/native/base:utils",
]
configs = [ ":hitrace_config" ]
}
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册