2003-06-11 22:11:32 +00:00
|
|
|
#!/usr/local/bin/php -q
|
|
|
|
<?php {
|
|
|
|
// $Id$
|
2002-10-04 05:30:44 +00:00
|
|
|
// tests whether command-line arg passing works
|
|
|
|
|
2002-10-04 00:16:41 +00:00
|
|
|
include_once("test.inc");
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2003-06-11 23:09:11 +00:00
|
|
|
test_msg("standard concat application");
|
2003-06-11 22:11:32 +00:00
|
|
|
|
2002-10-04 00:16:41 +00:00
|
|
|
$project = new Project;
|
2003-06-11 22:11:32 +00:00
|
|
|
$project->add_core_and_version();
|
|
|
|
$project->add_app_and_version("concat");
|
|
|
|
|
2002-10-04 00:16:41 +00:00
|
|
|
$user = new User();
|
|
|
|
$host = new Host($user);
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2002-10-04 00:16:41 +00:00
|
|
|
$project->add_user($user);
|
|
|
|
$project->install(); // must install projects before adding to hosts
|
2003-03-29 07:25:12 +00:00
|
|
|
$project->install_feeder();
|
2002-10-04 00:16:41 +00:00
|
|
|
|
2003-02-26 18:55:18 +00:00
|
|
|
$host->add_user($user,$project);
|
2002-10-04 00:16:41 +00:00
|
|
|
$host->install();
|
|
|
|
|
|
|
|
$work = new Work($app);
|
|
|
|
$work->wu_template = "concat_wu";
|
|
|
|
$work->result_template = "concat_result";
|
2002-12-05 19:13:06 +00:00
|
|
|
$work->redundancy = 2;
|
2002-10-04 00:16:41 +00:00
|
|
|
array_push($work->input_files, "input");
|
2002-11-11 08:51:51 +00:00
|
|
|
array_push($work->input_files, "input");
|
2002-10-04 00:16:41 +00:00
|
|
|
$work->install($project);
|
|
|
|
|
2003-03-29 07:25:12 +00:00
|
|
|
$project->start_servers();
|
2003-04-01 07:34:08 +00:00
|
|
|
$host->run("-exit_when_idle -skip_cpu_benchmarks");
|
2002-10-04 00:16:41 +00:00
|
|
|
$project->stop();
|
|
|
|
|
2003-06-11 23:09:11 +00:00
|
|
|
$result->server_state = RESULT_SERVER_STATE_OVER;
|
2002-10-06 00:43:55 +00:00
|
|
|
$project->check_results(2, $result);
|
2002-10-04 00:16:41 +00:00
|
|
|
$project->compare_file("concat_wu_0_0", "concat_correct_output");
|
|
|
|
$project->compare_file("concat_wu_1_0", "concat_correct_output");
|
2003-06-11 22:11:32 +00:00
|
|
|
|
|
|
|
test_done();
|
|
|
|
} ?>
|