Files
yaze/test/yaze_test_ci.cc
scawful bb5e2002c2 fix: apply clang-format and exclude third-party libraries from formatting checks
- Applied clang-format to fix formatting violations in TUI and other source files
- Updated CMakeLists.txt to exclude src/lib/* from format targets to prevent third-party library violations
- Fixes clang-format violations in chat_tui.cc, tui.cc, and unified_layout.cc
- All source files now pass format-check target

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 03:30:56 -05:00

48 lines
1.6 KiB
C++

// Simplified test executable for CI/CD builds
// This version removes complex argument parsing and SDL initialization
// to ensure reliable test discovery and execution in automated environments
#include <gtest/gtest.h>
#include <iostream>
#include "absl/debugging/failure_signal_handler.h"
#include "absl/debugging/symbolize.h"
int main(int argc, char* argv[]) {
// Initialize symbolizer for better error reporting
absl::InitializeSymbolizer(argv[0]);
// Configure failure signal handler to be less aggressive for CI
absl::FailureSignalHandlerOptions options;
options.symbolize_stacktrace = true;
options.use_alternate_stack = false;
options.alarm_on_failure_secs = false;
options.call_previous_handler = true;
options.writerfn = nullptr;
absl::InstallFailureSignalHandler(options);
// Initialize Google Test with minimal configuration
::testing::InitGoogleTest(&argc, argv);
// Set up basic test environment
::testing::FLAGS_gtest_color = "yes";
::testing::FLAGS_gtest_print_time = true;
// For CI builds, skip ROM-dependent tests by default
// These tests require actual ROM files which aren't available in CI
std::string filter = ::testing::GTEST_FLAG(filter);
if (filter.empty()) {
// Default filter for CI: exclude ROM-dependent and E2E tests
::testing::GTEST_FLAG(filter) = "-*RomTest*:-*E2E*:-*ZSCustomOverworld*";
}
std::cout << "Running YAZE tests in CI mode..." << std::endl;
std::cout << "Test filter: " << ::testing::GTEST_FLAG(filter) << std::endl;
// Run tests
int result = RUN_ALL_TESTS();
return result;
}