Add a few tests to get started on debugging. The goal of this CL is to get the Fuchsia bots running the tests without infra specific issues. After landing this, failures will be in test framework files (e.g. test/testsupport folder) and WebRTC code. Bug: b/232740856 Change-Id: I332607fe875334769e7dadf6696d878a23a7e69f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280440 Reviewed-by: Andrey Logvin <landrey@webrtc.org> Reviewed-by: Andrey Logvin <landrey@google.com> Reviewed-by: Jeremy Leconte <jleconte@google.com> Commit-Queue: Jeremy Leconte <jleconte@google.com> Cr-Commit-Position: refs/heads/main@{#38596}
38 lines
1.2 KiB
C++
38 lines
1.2 KiB
C++
/*
|
|
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#include <memory>
|
|
|
|
#include "absl/debugging/failure_signal_handler.h"
|
|
#include "absl/debugging/symbolize.h"
|
|
#include "absl/flags/parse.h"
|
|
#include "test/gmock.h"
|
|
#include "test/test_main_lib.h"
|
|
|
|
int main(int argc, char* argv[]) {
|
|
// Initialize the symbolizer to get a human-readable stack trace
|
|
absl::InitializeSymbolizer(argv[0]);
|
|
testing::InitGoogleMock(&argc, argv);
|
|
absl::ParseCommandLine(argc, argv);
|
|
|
|
// This absl handler use unsupported features/instructions on Fuchsia
|
|
#if !defined(WEBRTC_FUCHSIA)
|
|
absl::FailureSignalHandlerOptions options;
|
|
absl::InstallFailureSignalHandler(options);
|
|
#endif
|
|
|
|
std::unique_ptr<webrtc::TestMain> main = webrtc::TestMain::Create();
|
|
int err_code = main->Init();
|
|
if (err_code != 0) {
|
|
return err_code;
|
|
}
|
|
return main->Run(argc, argv);
|
|
}
|