From 90f5fa2073d2f42005d5add2bb0da8ba0cc53535 Mon Sep 17 00:00:00 2001 From: Eric Heien Date: Mon, 16 Jun 2003 18:23:39 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=1497 --- test/abort_result | 13 +++++++++++++ test/laptop_prefs.xml | 16 ---------------- test/test.inc | 10 ++++++++++ test/test_abort.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 16 deletions(-) create mode 100644 test/abort_result delete mode 100644 test/laptop_prefs.xml create mode 100644 test/test_abort.php diff --git a/test/abort_result b/test/abort_result new file mode 100644 index 0000000000..ccbe669daa --- /dev/null +++ b/test/abort_result @@ -0,0 +1,13 @@ + + + + + 10000 + + + + + + out + + diff --git a/test/laptop_prefs.xml b/test/laptop_prefs.xml deleted file mode 100644 index 2869d7be65..0000000000 --- a/test/laptop_prefs.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - 10 - 1 - 0.4 - 50 - 0.4 - - BOINC_MASTER_URL - 3f7b90793a0175ad0bda68684e8bd136 - 10 - - Tahiti Sunset - - - diff --git a/test/test.inc b/test/test.inc index c75320dec2..77f6abf60c 100644 --- a/test/test.inc +++ b/test/test.inc @@ -204,6 +204,12 @@ function create_keys() { XPassThru("$lib_dir/crypt_prog -genkey 1024 $key_dir/code_sign_private $key_dir/code_sign_public"); } +function check_exists($file) { + if (file_exists($file)) { + error("file doesn't exist: $file\n"); + } +} + function check_deleted($file) { if (file_exists($file)) { error("file wasn't deleted: $file\n"); @@ -828,6 +834,10 @@ $matchresult->stderr_out check_deleted("$this->project_dir/" . $file); } + function check_server_exists($file) { + check_exists("$this->project_dir/" . $file); + } + } // represents an account on a particular project diff --git a/test/test_abort.php b/test/test_abort.php new file mode 100644 index 0000000000..7b12d8e779 --- /dev/null +++ b/test/test_abort.php @@ -0,0 +1,42 @@ +#!/usr/local/bin/php -q +add_app_and_version("upper_case"); + + $user = new User(); + + $project->add_user($user); + $project->install(); // must install projects before adding to hosts + $project->install_feeder(); + + $host = new Host(); + $host->add_user($user, $project); + $host->install(); + + $work = new Work(); + $work->wu_template = "uc_wu"; + $work->result_template = "abort_result"; + $work->redundancy = 2; + array_push($work->input_files, "input"); + $work->install($project); + + $project->start_servers(); + $host->run("-exit_when_idle -skip_cpu_benchmarks -sched_retry_delay_min 1 >& /dev/null"); + + $project->validate(2); + $result->server_state = RESULT_SERVER_STATE_OVER; + $project->check_results(2, $result); + + $project->assimilate(); + $project->file_delete(); + + $project->stop(); + + test_done(); +} ?>