Changes between Version 26 and Version 27 of ValidationSimple


Ignore:
Timestamp:
Oct 24, 2014, 2:12:15 PM (9 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ValidationSimple

    v26 v27  
    119119
    120120The validator '''script_validator''' allows you to write your validation logic
    121 in your language of choice (Python, Perl, Java, bash).
     121in your language of choice (Python, PHP, Perl, Java, bash).
    122122'''script_validator''' takes two additional command-line arguments:
    123123
    124  '''--init_script filename''' :: name of "init script" to check a result.
    125  '''--compare_script filename''' :: name of script to compare two results.
     124 '''--init_script "filename arg1 ... argn"''' :: script to check the validity of a result.  Exit zero if valid.
     125 '''--compare_script "filename arg1 ... argn"''' :: script to compare two results.  Exit zero if outputs are equivalent.
    126126
    127 The init script is called as
    128 {{{
    129 filename f1 ... fn
    130 }}}
    131 where f1 ... fn are the output files of a job (there may be just one).
    132 It exits with zero if the files are valid.
     127'''arg1 ... argn''' represent cmdline args to be passed to the scripts.
     128The options for init_script are:
     129 '''files''' :: list of paths of output files of the result
     130 '''result_id''' :: result ID
     131 '''runtime''' ::  task runtime in seconds
    133132
    134 The compare script is called as
    135 {{{
    136 filename f1 ... fn g1 ... gn
    137 }}}
    138 where f1 ... fn are the output files of one job,
    139 and g1 ... gn are the output files are another job.
    140 It exits zero if the files are equivalent.
     133Additional options for compare_script, for the second result:
     134 '''files2''' :: list of paths of output files
     135 '''result_id2''' ::  result ID
     136 '''runtime2''' ::  task runtime
     137
     138'''arg1 ... argn''' can be omitted,
     139in which case only the output file paths are passed to the scripts.
    141140
    142141The scripts must be put in your project's bin/ directory.
    143142
    144143For applications that don't use replication, the compare script need not be given.
     144For applications that don't need output file syntax checking, the init script need not be given.
    145145
    146146As an example, the following PHP script, used as a compare script,
     
    158158
    159159?>
     160}}}
     161
     162The corresponding entry in config.xml would look like
     163{{{
     164<daemon>
     165    <cmd>script_validator --app uppercase -d 3 --compare_script compare.php</cmd>
     166</daemon>
    160167}}}
    161168