mirror of https://github.com/BOINC/boinc.git
Added a test script for the api.
svn path=/trunk/boinc/; revision=130
This commit is contained in:
parent
157187bfbd
commit
fdc26384bd
|
@ -0,0 +1,6 @@
|
|||
<graphics_xsize>0</graphics_xsize>
|
||||
<graphics_ysize>0</graphics_ysize>
|
||||
<graphics_refresh_period>0</graphics_refresh_period>
|
||||
<poll_period>0</poll_period>
|
||||
<checkpoint_period>1</checkpoint_period>
|
||||
<cpu_time>0</cpu_time>
|
|
@ -179,5 +179,21 @@ function check_results_done() {
|
|||
}
|
||||
}
|
||||
|
||||
function compare_files($out, $correct) {
|
||||
PassThru("diff $out $correct", $retval);
|
||||
if ($retval) {
|
||||
echo "File mismatch: $out $correct\n";
|
||||
} else {
|
||||
echo "Files match: $out $correct\n";
|
||||
}
|
||||
}
|
||||
|
||||
function initialize_api() {
|
||||
PassThru("cp core_to_app.xml.in core_to_app.xml");
|
||||
}
|
||||
|
||||
function run_api_test() {
|
||||
PassThru("../api/api_test");
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<low_water_days>1</low_water_days>
|
||||
<resource_share>1</resource_share>
|
||||
<project>
|
||||
<master_url>http://localhost/</master_url>
|
||||
<master_url>http://localhost/boinc-cgi/index.html</master_url>
|
||||
<authenticator>3f7b90793a0175ad0bda68684e8bd136</authenticator>
|
||||
</project>
|
||||
</preferences>
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
<percent_done>0.000000</percent_done>
|
||||
<cpu_time_at_checkpoint>5.000000</cpu_time_at_checkpoint>
|
|
@ -0,0 +1,7 @@
|
|||
blah 17 34.500000
|
||||
foo
|
||||
checkpoint
|
||||
checkpoint
|
||||
checkpoint
|
||||
checkpoint
|
||||
checkpoint
|
|
@ -0,0 +1,10 @@
|
|||
#! /usr/local/bin/php
|
||||
<?php
|
||||
include_once("init.inc");
|
||||
|
||||
initialize_api();
|
||||
run_api_test();
|
||||
compare_files("app_to_core.xml", "ta_correct_atc");
|
||||
compare_files("foobar", "ta_correct_f");
|
||||
?>
|
||||
|
Loading…
Reference in New Issue