Lines Matching +full:pre +full:- +full:charge +full:- +full:time

153             if (iter->name != "." && iter->name != "..")  in append_files_listing()
154 names.insert(iter->name); in append_files_listing()
202 /// Test program-specific execution interface.
239 /// \param interface_ Test program-specific execution interface.
249 const model::test_case& test_case = test_program->find(test_case_name); in test_exec_data()
344 /// its "current_path" view at program startup time; or maybe by grabbing the
345 /// current path at test_program creation time; or maybe something else.
357 0, absolute.length() - relative.length()); in force_absolute_paths()
375 /// User-provided configuration variables.
383 /// \param user_config User-provided configuration variables.
400 _interface->exec_list(_test_program, vars); in operator ()()
416 /// User-provided configuration variables.
467 /// \param user_config User-provided configuration variables.
496 _interface->exec_test(_test_program, _test_case_name, vars, in operator ()()
513 /// User-provided configuration variables.
522 /// \param user_config User-provided configuration variables.
544 _interface->exec_cleanup(_test_program, _test_case_name, vars, in operator ()()
579 e->cleanup(); in operator ()()
593 PRE(interfaces.find(name) != interfaces.end()); in find_interface()
671 _pimpl->_scheduler_handle.check_interrupt(); in test_cases()
673 if (!_pimpl->_loaded) { in test_cases()
674 const model::test_cases_map tcs = _pimpl->_scheduler_handle.list_tests( in test_cases()
675 this, _pimpl->_user_config); in test_cases()
680 const_cast< scheduler::lazy_test_program* >(this)->set_test_cases(tcs); in test_cases()
682 _pimpl->_loaded = true; in test_cases()
684 _pimpl->_scheduler_handle.check_interrupt(); in test_cases()
687 INV(_pimpl->_loaded); in test_cases()
750 _pbimpl->generic.cleanup(); in cleanup()
760 return _pbimpl->generic.original_pid(); in original_pid()
770 return _pbimpl->generic.start_time(); in start_time()
780 return _pbimpl->generic.end_time(); in end_time()
784 /// Returns the path to the test-specific work directory.
792 return _pbimpl->generic.work_directory(); in work_directory()
802 return _pbimpl->generic.stdout_file(); in stdout_file()
812 return _pbimpl->generic.stderr_file(); in stderr_file()
866 return _pimpl->test_program; in test_program()
876 return _pimpl->test_case_name; in test_case_name()
886 return _pimpl->test_result; in test_result()
895 /// Mapping of exec handles to the data required at run time.
923 % test_data->test_program->relative_path() in ~impl()
924 % test_data->test_case_name); in ~impl()
939 % test_data->test_program->relative_path() in ~impl()
940 % test_data->test_case_name); in ~impl()
961 if (test_data->needs_cleanup) { in tests_needing_cleanup()
963 test_data->needs_cleanup = false; in tests_needing_cleanup()
964 if (!test_data->exit_handle) in tests_needing_cleanup()
965 test_data->exit_handle = generic.reap(test_data->pid); in tests_needing_cleanup()
992 if (test_data->needs_execenv_cleanup) { in tests_needing_execenv_cleanup()
994 test_data->needs_execenv_cleanup = false; in tests_needing_execenv_cleanup()
995 if (!test_data->exit_handle) in tests_needing_execenv_cleanup()
996 test_data->exit_handle = generic.reap(test_data->pid); in tests_needing_execenv_cleanup()
1020 test_data->test_program, test_data->test_case_name, in sync_cleanup()
1021 test_data->user_config, test_data->exit_handle.get(), in sync_cleanup()
1030 /// \param user_config User-provided configuration variables.
1047 find_interface(test_program->interface_name()); in spawn_cleanup()
1049 LI(F("Spawning %s:%s (cleanup)") % test_program->absolute_path() % in spawn_cleanup()
1082 test_data->test_program, test_data->test_case_name, in sync_execenv_cleanup()
1083 test_data->exit_handle.get(), result); in sync_execenv_cleanup()
1106 % test_program->absolute_path() % test_case_name); in spawn_execenv_cleanup()
1143 return _pimpl->generic.root_work_directory(); in root_work_directory()
1157 _pimpl->generic.cleanup(); in cleanup()
1182 PRE(interfaces.find(name) == interfaces.end()); in register_interface()
1204 /// \pre This function can only be called if there is no other scheduler_handle
1225 /// \param user_config User-provided configuration variables.
1233 _pimpl->generic.check_interrupt(); in list_tests()
1236 test_program->interface_name()); in list_tests()
1239 const executor::exec_handle exec_handle = _pimpl->generic.spawn( in list_tests()
1242 executor::exit_handle exit_handle = _pimpl->generic.wait(exec_handle); in list_tests()
1244 const model::test_cases_map test_cases = interface->parse_list( in list_tests()
1257 // cannot report failures at the test-program level. in list_tests()
1274 /// If there indeed is a cleanup routine, we trigger it at wait_any() time.
1278 /// \param user_config User-provided configuration variables.
1288 _pimpl->generic.check_interrupt(); in spawn_test()
1291 test_program->interface_name()); in spawn_test()
1293 LI(F("Spawning %s:%s") % test_program->absolute_path() % test_case_name); in spawn_test()
1295 const model::test_case& test_case = test_program->find(test_case_name); in spawn_test()
1304 const executor::exec_handle handle = _pimpl->generic.spawn( in spawn_test()
1314 _pimpl->all_exec_data.find(handle.pid()) == _pimpl->all_exec_data.end(), in spawn_test()
1317 _pimpl->all_exec_data.insert(exec_data_map::value_type(handle.pid(), data)); in spawn_test()
1326 /// is the one in charge of spawning the cleanup routine asynchronously.
1330 /// types and, at wait time, we don't know upfront what we are going to get.
1334 _pimpl->generic.check_interrupt(); in wait_any()
1336 executor::exit_handle handle = _pimpl->generic.wait_any(); in wait_any()
1338 const exec_data_map::iterator iter = _pimpl->all_exec_data.find( in wait_any()
1342 utils::dump_stacktrace_if_available(data->test_program->absolute_path(), in wait_any()
1343 _pimpl->generic, handle); in wait_any()
1353 test_data->exit_handle = handle; in wait_any()
1355 const model::test_case& test_case = test_data->test_program->find( in wait_any()
1356 test_data->test_case_name); in wait_any()
1382 test_data->needs_cleanup = false; in wait_any()
1383 test_data->needs_execenv_cleanup = false; in wait_any()
1387 result = test_data->interface->compute_result( in wait_any()
1402 debugger->before_cleanup(test_data->test_program, test_case, in wait_any()
1406 if (test_data->needs_cleanup) { in wait_any()
1412 _pimpl->spawn_cleanup(test_data->test_program, in wait_any()
1413 test_data->test_case_name, in wait_any()
1414 test_data->user_config, handle, result.get()); in wait_any()
1418 // for user consumption. For the time being this is good enough and in wait_any()
1424 if (test_data->needs_execenv_cleanup) { in wait_any()
1426 _pimpl->spawn_execenv_cleanup(test_data->test_program, in wait_any()
1427 test_data->test_case_name, in wait_any()
1429 test_data->needs_execenv_cleanup = false; in wait_any()
1448 const model::test_result& body_result = cleanup_data->body_result; in wait_any()
1469 // one in charge of doing so in the regular (non-cleanup) case. in wait_any()
1472 % cleanup_data->body_exit_handle.original_pid()); in wait_any()
1473 _pimpl->all_exec_data.erase(handle.original_pid()); in wait_any()
1475 handle = cleanup_data->body_exit_handle; in wait_any()
1477 const exec_data_map::iterator it = _pimpl->all_exec_data.find( in wait_any()
1479 if (it != _pimpl->all_exec_data.end()) { in wait_any()
1484 cleanup_data->test_program->find(cleanup_data->test_case_name); in wait_any()
1485 test_data->needs_cleanup = false; in wait_any()
1487 if (test_data->needs_execenv_cleanup) { in wait_any()
1489 _pimpl->spawn_execenv_cleanup(cleanup_data->test_program, in wait_any()
1490 cleanup_data->test_case_name, in wait_any()
1492 test_data->needs_execenv_cleanup = false; in wait_any()
1506 const model::test_result& body_result = execenv_data->body_result; in wait_any()
1527 % execenv_data->body_exit_handle.original_pid()); in wait_any()
1528 _pimpl->all_exec_data.erase(handle.original_pid()); in wait_any()
1530 handle = execenv_data->body_exit_handle; in wait_any()
1538 new result_handle::bimpl(handle, _pimpl->all_exec_data)); in wait_any()
1541 data->test_program, data->test_case_name, result.get())); in wait_any()
1549 /// \pre No other processes should be in execution by the scheduler.
1553 /// \param user_config User-provided configuration variables.
1580 *output << utils::read_file(result_handle->stdout_file()); in debug_test()
1585 *output << utils::read_file(result_handle->stderr_file()); in debug_test()
1588 INV(result_handle->original_pid() == exec_handle); in debug_test()
1605 _pimpl->generic.check_interrupt(); in check_interrupt()
1645 props["unprivileged-user"] = user.name; in generate_config()