Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1715ee28 authored by James Hawkins's avatar James Hawkins Committed by android-build-merger
Browse files

Merge "libmetricslogger: Use libBionicGtestMain instead of a custom test runner."

am: 07e57b4b

Change-Id: I381e97ba2555df545fb63e7fe062da6783ef8687
parents 8a5f594b 07e57b4b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,8 +57,8 @@ cc_test {
        "libbase",
        "libmetricslogger_debug",
    ],
    static_libs: ["libBionicGtestMain"],
    srcs: [
        "metrics_logger_test.cpp",
        "testrunner.cpp",
    ],
}
+1 −8
Original line number Diff line number Diff line
@@ -20,12 +20,5 @@

TEST(MetricsLoggerTest, AddSingleBootEvent) {
  android::metricslogger::LogHistogram("test_event", 42);
  /*pid_t pid = getpid();
  struct logger_list *logger_list = android_logger_list_open(
      LOG_ID_EVENTS, ANDROID_LOG_RDONLY | ANDROID_LOG_NONBLOCK, 0, pid);

  logger_list = NULL;
  log_msg log_msg;
  android_logger_list_read(logger_list, &log_msg);
  std::cout << log_msg.len() << std::endl;*/
  // TODO(jhawkins): Verify the EventLog is updated.
}

libmetricslogger/testrunner.cpp

deleted100644 → 0
+0 −24
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 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 <android-base/logging.h>
#include <gtest/gtest.h>

int main(int argc, char** argv) {
  ::testing::InitGoogleTest(&argc, argv);
  android::base::InitLogging(argv, android::base::StderrLogger);
  return RUN_ALL_TESTS();
}