Changes between Version 26 and Version 27 of ValidationSimple
- Timestamp:
- Oct 24, 2014, 2:12:15 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ValidationSimple
v26 v27 119 119 120 120 The validator '''script_validator''' allows you to write your validation logic 121 in your language of choice (Python, P erl, Java, bash).121 in your language of choice (Python, PHP, Perl, Java, bash). 122 122 '''script_validator''' takes two additional command-line arguments: 123 123 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. 126 126 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. 128 The 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 133 132 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.133 Additional 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, 139 in which case only the output file paths are passed to the scripts. 141 140 142 141 The scripts must be put in your project's bin/ directory. 143 142 144 143 For applications that don't use replication, the compare script need not be given. 144 For applications that don't need output file syntax checking, the init script need not be given. 145 145 146 146 As an example, the following PHP script, used as a compare script, … … 158 158 159 159 ?> 160 }}} 161 162 The 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> 160 167 }}} 161 168