mirror of
https://gitee.com/openharmony/hiviewdfx_hiview
synced 2024-11-23 09:09:49 +00:00
commit
0eb1e55e0f
@ -86,12 +86,12 @@ ohos_source_set("faultlogger_service") {
|
||||
]
|
||||
|
||||
sources = [
|
||||
"dfx_bundle_util.cpp",
|
||||
"faultlog_database.cpp",
|
||||
"faultlog_formatter.cpp",
|
||||
"faultlog_manager.cpp",
|
||||
"faultlogger.cpp",
|
||||
"freeze_json_generator.cpp",
|
||||
"sanitizer_collector/zip_helper.cpp",
|
||||
]
|
||||
|
||||
deps = [
|
||||
@ -135,12 +135,12 @@ ohos_source_set("faultlogger_service_with_cfi") {
|
||||
]
|
||||
|
||||
sources = [
|
||||
"dfx_bundle_util.cpp",
|
||||
"faultlog_database.cpp",
|
||||
"faultlog_formatter.cpp",
|
||||
"faultlog_manager.cpp",
|
||||
"faultlogger.cpp",
|
||||
"freeze_json_generator.cpp",
|
||||
"sanitizer_collector/zip_helper.cpp",
|
||||
]
|
||||
|
||||
deps = [
|
||||
@ -180,12 +180,12 @@ ohos_source_set("faultlogger_service_fuzz_src") {
|
||||
defines = [ "UNIT_TEST" ]
|
||||
|
||||
sources = [
|
||||
"dfx_bundle_util.cpp",
|
||||
"faultlog_database.cpp",
|
||||
"faultlog_formatter.cpp",
|
||||
"faultlog_manager.cpp",
|
||||
"faultlogger.cpp",
|
||||
"freeze_json_generator.cpp",
|
||||
"sanitizer_collector/zip_helper.cpp",
|
||||
]
|
||||
|
||||
deps = [
|
||||
|
@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "zip_helper.h"
|
||||
#include "dfx_bundle_util.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cerrno>
|
||||
@ -42,10 +42,10 @@
|
||||
#include "parameter_ex.h"
|
||||
|
||||
#undef LOG_DOMAIN
|
||||
#define LOG_DOMAIN 0xD002D12
|
||||
#define LOG_DOMAIN 0xD002D11
|
||||
|
||||
#undef LOG_TAG
|
||||
#define LOG_TAG "Sanitizer"
|
||||
#define LOG_TAG "DfxBundleUtil"
|
||||
|
||||
namespace OHOS {
|
||||
namespace HiviewDFX {
|
@ -13,8 +13,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SANITIZERD_ZIPHELPER_H
|
||||
#define SANITIZERD_ZIPHELPER_H
|
||||
#ifndef DFX_BUNDLE_UTIL_H
|
||||
#define DFX_BUNDLE_UTIL_H
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -40,5 +40,5 @@ bool GetDfxBundleInfo(const std::string& bundleName, DfxBundleInfo& bundleInfo);
|
||||
} // namespace HiviewDFX
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // SANITIZERD_ZIPHELPER_H
|
||||
#endif // DFX_BUNDLE_UTIL_H
|
||||
|
@ -66,7 +66,7 @@
|
||||
#include "string_util.h"
|
||||
#include "sys_event_dao.h"
|
||||
#include "time_util.h"
|
||||
#include "zip_helper.h"
|
||||
#include "dfx_bundle_util.h"
|
||||
#include "freeze_json_generator.h"
|
||||
#include "freeze_json_util.h"
|
||||
|
||||
|
@ -40,16 +40,16 @@ ohos_unittest("FaultloggerUnittest") {
|
||||
|
||||
cflags = [ "-Dprivate=public" ]
|
||||
sources = [
|
||||
"$hiview_faultlogger/service/dfx_bundle_util.cpp",
|
||||
"$hiview_faultlogger/service/faultlog_database.cpp",
|
||||
"$hiview_faultlogger/service/faultlog_formatter.cpp",
|
||||
"$hiview_faultlogger/service/faultlog_manager.cpp",
|
||||
"$hiview_faultlogger/service/faultlogger.cpp",
|
||||
"$hiview_faultlogger/service/freeze_json_generator.cpp",
|
||||
"$hiview_faultlogger/service/sanitizer_collector/zip_helper.cpp",
|
||||
"common/faultevent_listener.cpp",
|
||||
"common/unittest/dfx_bundle_util_unittest.cpp",
|
||||
"common/unittest/faultlog_formatter_unittest.cpp",
|
||||
"common/unittest/faultlogger_unittest.cpp",
|
||||
"common/unittest/zip_helper_unittest.cpp",
|
||||
]
|
||||
cflags_cc = [
|
||||
"-Dprivate=public",
|
||||
|
@ -15,19 +15,19 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "zip_helper.h"
|
||||
#include "dfx_bundle_util.h"
|
||||
|
||||
using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace HiviewDFX {
|
||||
class ZipHeloerUnittest : public testing::Test {};
|
||||
class DfxBundleUtilUnittest : public testing::Test {};
|
||||
|
||||
/**
|
||||
* @tc.name: IsModuleNameValidTest001
|
||||
* @tc.desc: Test IsModuleNameValid error branch
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
HWTEST_F(ZipHeloerUnittest, IsModuleNameValidTest001, testing::ext::TestSize.Level1)
|
||||
HWTEST_F(DfxBundleUtilUnittest, IsModuleNameValidTest001, testing::ext::TestSize.Level1)
|
||||
{
|
||||
std::string name;
|
||||
auto result = IsModuleNameValid(name);
|
@ -46,7 +46,7 @@
|
||||
#include "log_analyzer.h"
|
||||
#include "sys_event.h"
|
||||
#include "sys_event_dao.h"
|
||||
#include "zip_helper.h"
|
||||
#include "dfx_bundle_util.h"
|
||||
|
||||
using namespace testing::ext;
|
||||
using namespace OHOS::HiviewDFX;
|
||||
|
Loading…
Reference in New Issue
Block a user