mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=670
This commit is contained in:
parent
8b32bbc536
commit
9e147559a6
|
@ -1,11 +1,11 @@
|
|||
<file_info>
|
||||
<name><INFILE_0/></name>
|
||||
<url><DOWNLOAD_URL/><INFILE_0/></url>
|
||||
<url><DOWNLOAD_URL/>0/<INFILE_0/></url>
|
||||
<md5_cksum><MD5_0/></md5_cksum>
|
||||
</file_info>
|
||||
<file_info>
|
||||
<name><INFILE_1/></name>
|
||||
<url><DOWNLOAD_URL/><INFILE_1/></url>
|
||||
<url><DOWNLOAD_URL/>/<INFILE_1/></url>
|
||||
<md5_cksum><MD5_1/></md5_cksum>
|
||||
</file_info>
|
||||
<workunit>
|
||||
|
|
|
@ -388,12 +388,11 @@ class Project {
|
|||
echo "\nsleeping for $time seconds";
|
||||
PassThru("sleep $time");
|
||||
}
|
||||
PassThru("cp $source_dir/sched/cgi $
|
||||
this->project_dir/cgi/file_upload_handler$handler_num");
|
||||
PassThru("cp $source_dir/sched/file_upload_handler $this->project_dir/cgi/file_upload_handler$handler_num");
|
||||
}
|
||||
|
||||
//blocks until a file_upload_handler is running in the system, kills it and returns
|
||||
function kill_file_upload_hanlder()
|
||||
function kill_file_upload_handler()
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
|
|
|
@ -52,6 +52,6 @@
|
|||
$result->stderr_out = "APP: upper_case: starting, argc 1";
|
||||
$result->exit_status = 0;
|
||||
$project->check_results(2, $result);
|
||||
$project->compare_file("uc_multiple_download_wu_0_0", "uc_correct_output");
|
||||
$project->compare_file("uc_multiple_download_wu_1_0", "uc_correct_output");
|
||||
$project->compare_file("uc_wu_0_0", "uc_correct_output");
|
||||
$project->compare_file("uc_wu_1_0", "uc_correct_output");
|
||||
?>
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
#! /usr/local/bin/php
|
||||
<?php
|
||||
//This tests the exponential backoff mechanism on the client in case of downloadURLs going down. in this case multiple URLS stay up while one goes down.
|
||||
//This test is not automated. It has to be run, and then client.out (in the host directory) must be looked at to examine wether everything is working correctly.
|
||||
include_once("test.inc");
|
||||
|
||||
$project = new Project;
|
||||
$user = new User();
|
||||
$host = new Host($user);
|
||||
|
||||
$app = new App("upper_case");
|
||||
$app_version = new App_Version($app);
|
||||
|
||||
// the following is optional (makes client web download possible)
|
||||
$core_app = new App("core client");
|
||||
$core_app_version = new App_Version($core_app);
|
||||
$project->add_app($core_app);
|
||||
$project->add_app_version($core_app_version);
|
||||
|
||||
$project->add_user($user);
|
||||
$project->add_app($app);
|
||||
$project->add_app_version($app_version);
|
||||
|
||||
$project->install(); // must install projects before adding to hosts
|
||||
|
||||
$host->log_flags = "log_flags.xml";
|
||||
$host->add_project($project);
|
||||
$host->install();
|
||||
|
||||
echo "adding work\n";
|
||||
|
||||
$work = new Work($app);
|
||||
$work->wu_template = "uc_multiple_download_wu";
|
||||
$work->result_template = "uc_result";
|
||||
$work->nresults = 2;
|
||||
$work->delay_bound = 10;
|
||||
array_push($work->input_files, "input");
|
||||
$work->install($project);
|
||||
|
||||
$project->start_feeder();
|
||||
//delete the download_dir0 immediately
|
||||
$project->delete_downloaddir(null, 0);
|
||||
$project->delete_downloaddir(null, 1);
|
||||
$project->delete_downloaddir(null, 2);
|
||||
|
||||
$pid = $host->run_asynch("-exit_when_idle");
|
||||
$status = 0;
|
||||
//wait until the host has stopped running
|
||||
pcntl_waitpid($pid,$status,0);
|
||||
$project->stop();
|
||||
|
||||
$result->state = RESULT_STATE_DONE;
|
||||
$result->stderr_out = "APP: upper_case: starting, argc 1";
|
||||
$result->exit_status = 0;
|
||||
$project->check_results(2, $result);
|
||||
$project->compare_file("uc_multiple_download_wu_0_0", "uc_correct_output");
|
||||
$project->compare_file("uc_multiple_download_wu_1_0", "uc_correct_output");
|
||||
?>
|
|
@ -0,0 +1,58 @@
|
|||
#! /usr/local/bin/php
|
||||
<?php
|
||||
//This tests the exponential backoff mechanism on the client in case of downloadURLs going down
|
||||
//This test is not automated. It has to be run, and then client.out (in the host directory) must be looked at to examine wether everything is working correctly.
|
||||
include_once("test.inc");
|
||||
|
||||
$project = new Project;
|
||||
$user = new User();
|
||||
$host = new Host($user);
|
||||
|
||||
$app = new App("upper_case");
|
||||
$app_version = new App_Version($app);
|
||||
|
||||
// the following is optional (makes client web download possible)
|
||||
$core_app = new App("core client");
|
||||
$core_app_version = new App_Version($core_app);
|
||||
$project->add_app($core_app);
|
||||
$project->add_app_version($core_app_version);
|
||||
|
||||
$project->add_user($user);
|
||||
$project->add_app($app);
|
||||
$project->add_app_version($app_version);
|
||||
|
||||
$project->install(); // must install projects before adding to hosts
|
||||
|
||||
$host->log_flags = "log_flags.xml";
|
||||
$host->add_project($project);
|
||||
$host->install();
|
||||
|
||||
echo "adding work\n";
|
||||
|
||||
$work = new Work($app);
|
||||
$work->wu_template = "uc_wu";
|
||||
$work->result_template = "uc_result";
|
||||
$work->nresults = 2;
|
||||
$work->delay_bound = 10;
|
||||
array_push($work->input_files, "input");
|
||||
$work->install($project);
|
||||
|
||||
$project->start_feeder();
|
||||
//delete the download_dir immediately
|
||||
$project->remove_file_upload_handler()
|
||||
$pid = $host->run_asynch("-exit_when_idle");
|
||||
|
||||
//reinstall download_dir after 100 seconds
|
||||
$project->reinstall_file_upload_handler(20,null);
|
||||
$status = 0;
|
||||
//wait until the host has stopped running
|
||||
pcntl_waitpid($pid,$status,0);
|
||||
$project->stop();
|
||||
|
||||
$result->state = RESULT_STATE_DONE;
|
||||
$result->stderr_out = "APP: upper_case: starting, argc 1";
|
||||
$result->exit_status = 0;
|
||||
$project->check_results(2, $result);
|
||||
$project->compare_file("uc_wu_0_0", "uc_correct_output");
|
||||
$project->compare_file("uc_wu_1_0", "uc_correct_output");
|
||||
?>
|
Loading…
Reference in New Issue