From 4815fa12f7722abd2608cdb90bf5a560f11d062a Mon Sep 17 00:00:00 2001 From: Eric Heien Date: Mon, 1 Jul 2002 19:29:40 +0000 Subject: [PATCH] Added and updated tests. svn path=/trunk/boinc/; revision=145 --- test/init.inc | 7 +++++++ test/sah_result | 14 ++++++++++++++ test/sah_test.php | 27 +++++++++++++++++++++++++++ test/sah_wu | 14 ++++++++++++++ test/test_uc_slow.php | 3 ++- 5 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 test/sah_result create mode 100755 test/sah_test.php create mode 100644 test/sah_wu diff --git a/test/init.inc b/test/init.inc index 9e0f580fe2..c6424f0cd3 100644 --- a/test/init.inc +++ b/test/init.inc @@ -179,6 +179,13 @@ function check_results_done() { } } +function num_wus_left() { + db_init(); + $numwus = mysql_query("select count(*) as nres from result where state<>4"); + $result = mysql_fetch_object($numwus); + return $result->nres; +} + function compare_files($out, $correct) { PassThru("diff $out $correct", $retval); if ($retval) { diff --git a/test/sah_result b/test/sah_result new file mode 100644 index 0000000000..bcd2a45a90 --- /dev/null +++ b/test/sah_result @@ -0,0 +1,14 @@ + + + + + + + + + + + + outfile.sah + + diff --git a/test/sah_test.php b/test/sah_test.php new file mode 100755 index 0000000000..474064bb6e --- /dev/null +++ b/test/sah_test.php @@ -0,0 +1,27 @@ +#! /usr/local/bin/php + diff --git a/test/sah_wu b/test/sah_wu new file mode 100644 index 0000000000..aec9cbd3d7 --- /dev/null +++ b/test/sah_wu @@ -0,0 +1,14 @@ + + + + + + + + setiathome-3.06 + + + work_unit.sah + + work_unit.sah + diff --git a/test/test_uc_slow.php b/test/test_uc_slow.php index dc390c9f78..3b9d9276f0 100644 --- a/test/test_uc_slow.php +++ b/test/test_uc_slow.php @@ -11,12 +11,13 @@ clear_data_dirs(); init_client_dirs("prefs1.xml"); copy_to_download_dir("small_input"); - add_platform(); + add_platform(null); add_core_client(); add_user(null); add_app("uc_slow"); create_work("-appname uc_slow -wu_name ucs_wu -wu_template ucs_wu -result_template ucs_result -nresults 1 small_input"); echo "Now run the client manually; start and stop it a few times.\n"; + start_feeder(); //run_client(); //compare_file("ucs_wu_0_0", "uc_small_correct_output"); ?>