MCPcopy Create free account
hub / github.com/Simple-XX/SimpleKernel / print_test_summary

Function print_test_summary

tests/system_test/main.cpp:80–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void print_test_summary() {
81 int passed = 0;
82 int failed = 0;
83 int timed_out = 0;
84
85 klog::Info("========================================");
86 klog::Info(" System Test Results");
87 klog::Info("========================================");
88
89 for (size_t i = 0; i < kTestCount; ++i) {
90 auto& r = test_results[i];
91 const char* tag = "???";
92
93 switch (r.status) {
94 case TestThreadStatus::kPassed:
95 tag = "PASS";
96 passed++;
97 break;
98 case TestThreadStatus::kFailed:
99 tag = "FAIL";
100 failed++;
101 break;
102 case TestThreadStatus::kTimeout:
103 tag = "TIMEOUT";
104 timed_out++;
105 break;
106 case TestThreadStatus::kRunning:
107 tag = "TIMEOUT";
108 timed_out++;
109 break;
110 default:
111 tag = "SKIP";
112 break;
113 }
114
115 if (test_cases[i].is_smp_test) {
116 klog::Info(" [{}] {} (SMP, exit_code={})", tag, r.name, r.exit_code);
117 } else {
118 klog::Info(" [{}] {} (pid={}, exit_code={})", tag, r.name, r.pid,
119 r.exit_code);
120 }
121 }
122
123 int total = static_cast<int>(kTestCount);
124
125 klog::Info("========================================");
126 klog::Info(" Total: {} | Passed: {} | Failed: {} | Timeout: {}", total,
127 passed, failed, timed_out);
128 klog::Info("========================================");
129}
130
131void test_runner_entry(void* /*arg*/) {
132 auto& task_mgr = TaskManagerSingleton::instance();

Callers 1

test_runner_entryFunction · 0.85

Calls 1

InfoFunction · 0.85

Tested by 1

test_runner_entryFunction · 0.68