blob: fcda81c9f228477b061cd0f0c93b00990fb89838 [file] [log] [blame]
/*
* Copyright (C) 2022 The Android Open Source Project
*
* 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 "perfetto/ext/base/file_utils.h"
#include "src/traced/probes/ftrace/vendor_tracepoints.h"
#include "test/gtest_and_gmock.h"
namespace perfetto {
namespace {
TEST(PerfettoAtraceCategoriesVendorTest, Parse) {
if (base::FileExists(vendor_tracepoints::kCategoriesFile)) {
std::map<std::string, std::vector<GroupAndName>> categories;
base::Status status = vendor_tracepoints::DiscoverVendorTracepointsWithFile(
vendor_tracepoints::kCategoriesFile, &categories);
EXPECT_TRUE(status.ok()) << status.message();
}
}
} // namespace
} // namespace perfetto