mirror of https://github.com/BOINC/boinc.git
tweak
parent
6f5144e3ed
commit
969543ec19
|
@ -4,10 +4,12 @@ in your language of choice (Python, PHP, Perl, Java, bash).
|
||||||
|
|
||||||
```
|
```
|
||||||
--init_script "scriptname arg1 ... argn"
|
--init_script "scriptname arg1 ... argn"
|
||||||
|
--compare_script "scriptname arg1 ... argn"
|
||||||
```
|
```
|
||||||
This specifies a script to check the validity of a result.
|
|
||||||
The script is passed parameters (see below) that identify the result.
|
|
||||||
|
|
||||||
|
```--init_script```
|
||||||
|
specifies a script to check the validity of a result.
|
||||||
|
The script is passed parameters (see below) that identify the result.
|
||||||
The script's exit code is:
|
The script's exit code is:
|
||||||
|
|
||||||
* zero if the result is valid
|
* zero if the result is valid
|
||||||
|
@ -18,10 +20,7 @@ In this case the validation will tried again in a few hours.
|
||||||
* Any other nonzero value indicates an error,
|
* Any other nonzero value indicates an error,
|
||||||
and the result is marked as invalid.
|
and the result is marked as invalid.
|
||||||
|
|
||||||
```
|
```--compare_script``` specifies a script to compare two results.
|
||||||
--compare_script "filename arg1 ... argn"
|
|
||||||
```
|
|
||||||
This specifies a script to compare two results.
|
|
||||||
The script's exit code is
|
The script's exit code is
|
||||||
|
|
||||||
* zero if the results match
|
* zero if the results match
|
||||||
|
@ -29,10 +28,17 @@ The script's exit code is
|
||||||
if a transient error occurred.
|
if a transient error occurred.
|
||||||
* Any other nonzero value if the results don't match.
|
* Any other nonzero value if the results don't match.
|
||||||
|
|
||||||
|
The scripts must be put in your project's bin/ directory.
|
||||||
|
|
||||||
|
For applications that don't use replication,
|
||||||
|
the compare script need not be given.
|
||||||
|
For applications that don't need output file syntax checking,
|
||||||
|
the init script need not be given.
|
||||||
|
|
||||||
## Arguments passed to the scripts
|
## Arguments passed to the scripts
|
||||||
|
|
||||||
```arg1 ... argn``` represent cmdline args to be passed to the scripts.
|
```arg1 ... argn``` represent cmdline args to be passed to the scripts.
|
||||||
The options for init_script are:
|
The options for the init script are:
|
||||||
|
|
||||||
```files```:
|
```files```:
|
||||||
list of paths of output files of the result
|
list of paths of output files of the result
|
||||||
|
@ -50,18 +56,14 @@ list of paths of output files of the 2nd result.
|
||||||
|
|
||||||
```runtime2```: runtime of the 2nd result, in seconds.
|
```runtime2```: runtime of the 2nd result, in seconds.
|
||||||
|
|
||||||
|
For both scripts,
|
||||||
```arg1 ... argn``` can be omitted,
|
```arg1 ... argn``` can be omitted,
|
||||||
in which case only the output file paths are passed to the scripts.
|
in which case only the output file paths are passed to the script.
|
||||||
|
|
||||||
The scripts must be put in your project's bin/ directory.
|
## Example
|
||||||
|
|
||||||
For applications that don't use replication,
|
|
||||||
the compare script need not be given.
|
|
||||||
For applications that don't need output file syntax checking,
|
|
||||||
the init script need not be given.
|
|
||||||
|
|
||||||
As an example, the following PHP script, used as a compare script,
|
As an example, the following PHP script, used as a compare script,
|
||||||
would require that results match exactly:
|
requires that results match exactly:
|
||||||
```php
|
```php
|
||||||
#/usr/bin/env
|
#/usr/bin/env
|
||||||
<?php
|
<?php
|
||||||
|
@ -79,6 +81,7 @@ if (md5_file($f1) != md5_file($f2)) {
|
||||||
The corresponding entry in config.xml would look like
|
The corresponding entry in config.xml would look like
|
||||||
```xml
|
```xml
|
||||||
<daemon>
|
<daemon>
|
||||||
<cmd>script_validator --app uppercase -d 3 --compare_script compare.php</cmd>
|
<cmd>script_validator --app uppercase --compare_script compare.php</cmd>
|
||||||
|
...
|
||||||
</daemon>
|
</daemon>
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue