yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze_test_ci.cc
Go to the documentation of this file.
1// Simplified test executable for CI/CD builds
2// This version removes complex argument parsing and SDL initialization
3// to ensure reliable test discovery and execution in automated environments
4
5#include <gtest/gtest.h>
6#include <iostream>
7
8#include "absl/debugging/failure_signal_handler.h"
9#include "absl/debugging/symbolize.h"
10
11int main(int argc, char* argv[]) {
12 // Initialize symbolizer for better error reporting
13 absl::InitializeSymbolizer(argv[0]);
14
15 // Configure failure signal handler to be less aggressive for CI
16 absl::FailureSignalHandlerOptions options;
17 options.symbolize_stacktrace = true;
18 options.use_alternate_stack = false;
19 options.alarm_on_failure_secs = false;
20 options.call_previous_handler = true;
21 options.writerfn = nullptr;
22 absl::InstallFailureSignalHandler(options);
23
24 // Initialize Google Test with minimal configuration
25 ::testing::InitGoogleTest(&argc, argv);
26
27 // Set up basic test environment
28 ::testing::FLAGS_gtest_color = "yes";
29 ::testing::FLAGS_gtest_print_time = true;
30
31 // For CI builds, skip ROM-dependent tests by default
32 // These tests require actual ROM files which aren't available in CI
33 std::string filter = ::testing::GTEST_FLAG(filter);
34 if (filter.empty()) {
35 // Default filter for CI: exclude ROM-dependent and E2E tests
36 ::testing::GTEST_FLAG(filter) = "-*RomTest*:-*E2E*:-*ZSCustomOverworld*";
37 }
38
39 std::cout << "Running YAZE tests in CI mode..." << std::endl;
40 std::cout << "Test filter: " << ::testing::GTEST_FLAG(filter) << std::endl;
41
42 // Run tests
43 int result = RUN_ALL_TESTS();
44
45 return result;
46}