$project->install(); // must install projects before adding to hosts $project->install_make_work($work, 499, 5); $host->log_flags = "log_flags.xml"; $host->add_user($user, $project); $host->install(); $work->install($project); $project->start_servers(); // Start by generating a batch of 500 results $n = 0; while ($n < 500) { $n = $project->num_wus_left(); verbose_echo(1, "Generating results [{$n}/500]"); sleep(1); } verbose_echo(1, "Generating results... 500 done"); // Stop the project, deinstall make_work, and install the normal backend components $project->stop(); $project->deinstall_make_work(); $project->install_assimilator($app); $project->install_file_delete(); $project->install_validate($app, 5); $project->install_feeder(); $project->install_timeout_check($app, 5, 5, 0); while (($pid = exec("pgrep -n make_work")) != null) { sleep(1); } // Restart the server $project->restart(); $project->start_servers(); // Run the client until there's no more work
#!/usr/local/bin/php -q <?php // $Id$ include_once "test.inc"; test_msg("client checkpoint/restart mechanism"); $project = new Project(); $user = new User(); $host = new Host(); $project->add_user($user); $project->add_app_and_version("upper_case"); $project->install(); // must install projects before adding to hosts $host->add_user($user, $project); $host->install(); $work = new Work(); $work->wu_template = "ucs_wu"; $work->result_template = "uc_result"; array_push($work->input_files, "small_input"); $work->install($project); $project->install_feeder(); $project->start_servers(); verbose_echo(0, "Now run the client manually; start and stop it a few times"); //compare_file("ucs_wu_0_0", "uc_small_correct_output");