#include "perfetto/base/build_config.h"
#include "test/gtest_and_gmock.h"
#if PERFETTO_BUILDFLAG(PERFETTO_LOCAL_SYMBOLIZER)
#include <cstddef>
#include "src/base/test/tmp_dir_tree.h"
#include "src/base/test/utils.h"
#include "src/profiling/symbolizer/elf.h"
#include "src/profiling/symbolizer/local_symbolizer.h"
#include "src/profiling/symbolizer/subprocess.h"
#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
#include <unistd.h>
#endif
namespace perfetto {
namespace profiling {
namespace {
TEST(LocalSymbolizerTest, ParseJsonLine) { … }
std::string CreateElfWithBuildId(const std::string& build_id) { … }
#if defined(MEMORY_SANITIZER)
#define NOMSAN_SimpleTree …
#else
#define NOMSAN_SimpleTree …
#endif
TEST(LocalBinaryIndexerTest, NOMSAN_SimpleTree) { … }
#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \
PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE)
#if defined(MEMORY_SANITIZER)
#define NOMSAN_Symlinks …
#else
#define NOMSAN_Symlinks …
#endif
TEST(LocalBinaryIndexerTest, NOMSAN_Symlinks) { … }
#if defined(MEMORY_SANITIZER)
#define NOMSAN_RecursiveSymlinks …
#else
#define NOMSAN_RecursiveSymlinks …
#endif
TEST(LocalBinaryIndexerTest, NOMSAN_RecursiveSymlinks) { … }
#endif
TEST(LocalBinaryFinderTest, AbsolutePath) { … }
TEST(LocalBinaryFinderTest, AbsolutePathWithoutBaseApk) { … }
TEST(LocalBinaryFinderTest, OnlyFilename) { … }
TEST(LocalBinaryFinderTest, OnlyFilenameWithoutBaseApk) { … }
TEST(LocalBinaryFinderTest, BuildIdSubdir) { … }
}
}
}
#endif