Lines Matching refs:test
181 int Isolate::ChildProcessFn(const std::tuple<std::string, std::string>& test) { in ChildProcessFn() argument
187 std::string filter("--gtest_filter=" + GetTestName(test)); in ChildProcessFn()
251 Test* test = new Test(tests_[cur_test_index_], cur_test_index_, run_index, read_fd); in LaunchTests() local
252 running_by_pid_.emplace(pid, test); in LaunchTests()
253 running_[run_index] = test; in LaunchTests()
254 running_by_test_index_[cur_test_index_] = test; in LaunchTests()
257 pollfd->fd = test->fd(); in LaunchTests()
273 Test* test = running_[i]; in ReadTestsOutput() local
274 if (!test->Read()) { in ReadTestsOutput()
275 test->CloseFd(); in ReadTestsOutput()
298 Test* test = test_ptr.get(); in CheckTestsFinished() local
299 test->Stop(); in CheckTestsFinished()
302 test->ReadUntilClosed(); in CheckTestsFinished()
303 if (test->result() == TEST_NONE) { in CheckTestsFinished()
305 std::string output(test->name() + " terminated by signal: " + strsignal(WTERMSIG(status)) + in CheckTestsFinished()
307 test->AppendOutput(output); in CheckTestsFinished()
308 test->set_result(TEST_FAIL); in CheckTestsFinished()
312 std::string output(test->name() + " exited with exitcode " + std::to_string(exit_code) + in CheckTestsFinished()
314 test->AppendOutput(output); in CheckTestsFinished()
315 test->set_result(TEST_FAIL); in CheckTestsFinished()
319 test->SetResultFromOutput(); in CheckTestsFinished()
322 } else if (test->result() == TEST_TIMEOUT) { in CheckTestsFinished()
324 std::string timeout_str(test->name() + " killed because of timeout at " + in CheckTestsFinished()
326 test->AppendOutput(timeout_str); in CheckTestsFinished()
329 if (test->ExpectFail()) { in CheckTestsFinished()
330 if (test->result() == TEST_FAIL) { in CheckTestsFinished()
332 test->set_result(TEST_XFAIL); in CheckTestsFinished()
333 } else if (test->result() == TEST_PASS) { in CheckTestsFinished()
335 test->set_result(TEST_XPASS); in CheckTestsFinished()
339 test->Print(); in CheckTestsFinished()
341 switch (test->result()) { in CheckTestsFinished()
344 if (test->slow()) { in CheckTestsFinished()
367 size_t test_index = test->test_index(); in CheckTestsFinished()
369 running_indices_.push_back(test->run_index()); in CheckTestsFinished()
372 size_t run_index = test->run_index(); in CheckTestsFinished()
393 Test* test = entry.second.get(); in CheckTestsTimeout() local
394 if (test->result() == TEST_TIMEOUT) { in CheckTestsTimeout()
398 if (NanoTime() > test->start_ns() + deadline_threshold_ns_) { in CheckTestsTimeout()
399 test->set_result(TEST_TIMEOUT); in CheckTestsTimeout()
401 test->set_slow(false); in CheckTestsTimeout()
404 } else if (!test->slow() && NanoTime() > test->start_ns() + slow_threshold_ns_) { in CheckTestsTimeout()
406 test->set_slow(true); in CheckTestsTimeout()
422 const Test* test = entry.second; in HandleSignals() local
423 uint64_t run_time_ms = (NanoTime() - test->start_ns()) / kNsPerMs; in HandleSignals()
424 printf(" %s (elapsed time %" PRId64 " ms)\n", test->name().c_str(), run_time_ms); in HandleSignals()
477 const Test* test = entry.second.get(); in PrintResults() local
478 if (results.match_func(*test)) { in PrintResults()
480 printf(" %s", test->name().c_str()); in PrintResults()
482 results.print_func(options_, *test); in PrintResults()
504 .match_func = [](const Test& test) { return test.slow(); }, in __anonc4aebcd50102()
506 [](const Options& options, const Test& test) { in __anonc4aebcd50202()
507 printf(" (%" PRIu64 " ms, exceeded %" PRIu64 " ms)", test.RunTimeNs() / kNsPerMs, in __anonc4aebcd50202()
517 .match_func = [](const Test& test) { return test.result() == TEST_XPASS; }, in __anonc4aebcd50302()
526 .match_func = [](const Test& test) { return test.result() == TEST_FAIL; }, in __anonc4aebcd50402()
535 .match_func = [](const Test& test) { return test.result() == TEST_TIMEOUT; }, in __anonc4aebcd50502()
537 [](const Options&, const Test& test) { in __anonc4aebcd50602()
538 printf(" (stopped at %" PRIu64 " ms)", test.RunTimeNs() / kNsPerMs); in __anonc4aebcd50602()
547 .match_func = [](const Test& test) { return test.result() == TEST_SKIPPED; }, in __anonc4aebcd50702()
705 const Test* test = entry.second.get(); in WriteXmlResults() local
706 const std::string& suite_name = test->suite_name(); in WriteXmlResults()
707 if (test->result() == TEST_XFAIL) { in WriteXmlResults()
717 info->tests.push_back(test); in WriteXmlResults()
718 info->elapsed_ms += double(test->RunTimeNs()) / kNsPerMs; in WriteXmlResults()
719 if (test->result() != TEST_PASS) { in WriteXmlResults()
730 for (auto test : suite_entry.tests) { in WriteXmlResults() local
732 test->test_name().c_str(), double(test->RunTimeNs()) / kNsPerMs, in WriteXmlResults()
734 if (test->result() == TEST_PASS) { in WriteXmlResults()
738 const std::string escaped_output = XmlEscape(test->output()); in WriteXmlResults()