/// Runs a single test cases of a test program. /// /// \param test_program Path to the test program for which to list the test /// cases. Should be absolute. /// \param test_case Name of the test case to run. /// \param result_file Path to the file to which to write the result of the /// test. Should be absolute. /// \param user_variables Array of name=value pairs that describe the user /// configuration variables for the test case. /// \param run_params Execution parameters to configure the test process. /// \param [out] success Set to true if the test case reported a valid exit /// condition (like "passed" or "skipped"); false otherwise. This is /// only updated if the method returns OK. /// /// \return An error if the listing fails; OK otherwise. static kyua_error_t run_test_case(const char* test_program, const char* test_case, const char* result_file, const char* const user_variables[], const kyua_run_params_t* run_params, bool* success) { kyua_error_t error; char* work_directory; error = kyua_run_work_directory_enter(WORKDIR_TEMPLATE, run_params->unprivileged_user, run_params->unprivileged_group, &work_directory); if (kyua_error_is_set(error)) goto out; kyua_run_params_t real_run_params = *run_params; real_run_params.work_directory = work_directory; error = run_body(test_program, test_case, result_file, user_variables, &real_run_params, success); if (has_cleanup(user_variables)) { error = run_cleanup(test_program, test_case, result_file, user_variables, &real_run_params, *success, success); } error = kyua_error_subsume(error, kyua_run_work_directory_leave(&work_directory)); out: return error; }
// moved this to aftermove so xinertia on treads is already applied // when we calculate the main object position. void XBoss::RunAftermove() { Object *o = mainobject; int i; if (!mainobject || mainobject->state == 0 || !X.initilized) return; // main object pulled along as treads move int tread_center = (treads[UL]->x + treads[UR]->x + \ treads[LL]->x + treads[LR]->x) / 4; o->x += (tread_center - o->x) / 16; run_internals(); for(i=0;i<4;i++) { run_body(i); run_target(i); } for(i=0;i<2;i++) { run_door(i); } }