mirror of https://github.com/BOINC/boinc.git
server: add script_validator: a validator framework for Python, Perl, bash etc.
Added script_validator, a validator that invokes scripts of your choice to check and compare results. These can be in any language you want.
This commit is contained in:
parent
ae1b16914f
commit
302aa8c7aa
|
@ -117,6 +117,7 @@ schedshare_PROGRAMS = \
|
||||||
sample_substr_validator \
|
sample_substr_validator \
|
||||||
sample_trivial_validator \
|
sample_trivial_validator \
|
||||||
sample_work_generator \
|
sample_work_generator \
|
||||||
|
script_validator \
|
||||||
single_job_assimilator \
|
single_job_assimilator \
|
||||||
size_regulator \
|
size_regulator \
|
||||||
transitioner \
|
transitioner \
|
||||||
|
@ -249,6 +250,10 @@ single_job_assimilator_LDADD = $(SERVERLIBS)
|
||||||
sample_work_generator_SOURCES = sample_work_generator.cpp
|
sample_work_generator_SOURCES = sample_work_generator.cpp
|
||||||
sample_work_generator_LDADD = $(SERVERLIBS)
|
sample_work_generator_LDADD = $(SERVERLIBS)
|
||||||
|
|
||||||
|
script_validator_SOURCES = $(VALIDATOR_SOURCES) \
|
||||||
|
script_validator.cpp
|
||||||
|
script_validator_LDADD = $(SERVERLIBS)
|
||||||
|
|
||||||
db_dump_SOURCES = db_dump.cpp
|
db_dump_SOURCES = db_dump.cpp
|
||||||
db_dump_LDADD = $(SERVERLIBS)
|
db_dump_LDADD = $(SERVERLIBS)
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,9 @@
|
||||||
// You should have received a copy of the GNU Lesser General Public License
|
// You should have received a copy of the GNU Lesser General Public License
|
||||||
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
// A validator that runs scripts to check and compare results
|
// A validator that runs scripts to check and compare results,
|
||||||
|
// so that you can do your validation on Python, Perl, bash, etc.
|
||||||
|
//
|
||||||
// cmdline args:
|
// cmdline args:
|
||||||
// --init_script scriptname
|
// --init_script scriptname
|
||||||
// --compare_script scriptname
|
// --compare_script scriptname
|
||||||
|
|
|
@ -61,7 +61,7 @@ int OUTPUT_FILE_INFO::parse(XML_PARSER& xp) {
|
||||||
return ERR_XML_PARSE;
|
return ERR_XML_PARSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_output_file_info(RESULT& result, OUTPUT_FILE_INFO& fi) {
|
int get_output_file_info(RESULT const& result, OUTPUT_FILE_INFO& fi) {
|
||||||
char path[MAXPATHLEN];
|
char path[MAXPATHLEN];
|
||||||
string name;
|
string name;
|
||||||
MIOFILE mf;
|
MIOFILE mf;
|
||||||
|
@ -87,7 +87,7 @@ int get_output_file_info(RESULT& result, OUTPUT_FILE_INFO& fi) {
|
||||||
return ERR_XML_PARSE;
|
return ERR_XML_PARSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_output_file_infos(RESULT& result, vector<OUTPUT_FILE_INFO>& fis) {
|
int get_output_file_infos(RESULT const& result, vector<OUTPUT_FILE_INFO>& fis) {
|
||||||
char path[MAXPATHLEN];
|
char path[MAXPATHLEN];
|
||||||
MIOFILE mf;
|
MIOFILE mf;
|
||||||
string name;
|
string name;
|
||||||
|
@ -115,7 +115,7 @@ int get_output_file_infos(RESULT& result, vector<OUTPUT_FILE_INFO>& fis) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_output_file_path(RESULT& result, string& path) {
|
int get_output_file_path(RESULT const& result, string& path) {
|
||||||
OUTPUT_FILE_INFO fi;
|
OUTPUT_FILE_INFO fi;
|
||||||
int retval = get_output_file_info(result, fi);
|
int retval = get_output_file_info(result, fi);
|
||||||
if (retval) return retval;
|
if (retval) return retval;
|
||||||
|
@ -123,7 +123,7 @@ int get_output_file_path(RESULT& result, string& path) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_output_file_paths(RESULT& result, vector<string>& paths) {
|
int get_output_file_paths(RESULT const& result, vector<string>& paths) {
|
||||||
vector<OUTPUT_FILE_INFO> fis;
|
vector<OUTPUT_FILE_INFO> fis;
|
||||||
int retval = get_output_file_infos(result, fis);
|
int retval = get_output_file_infos(result, fis);
|
||||||
if (retval) return retval;
|
if (retval) return retval;
|
||||||
|
|
|
@ -37,10 +37,10 @@ struct OUTPUT_FILE_INFO {
|
||||||
int parse(XML_PARSER&);
|
int parse(XML_PARSER&);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern int get_output_file_info(RESULT& result, OUTPUT_FILE_INFO&);
|
extern int get_output_file_info(RESULT const& result, OUTPUT_FILE_INFO&);
|
||||||
extern int get_output_file_infos(RESULT& result, std::vector<OUTPUT_FILE_INFO>&);
|
extern int get_output_file_infos(RESULT const& result, std::vector<OUTPUT_FILE_INFO>&);
|
||||||
extern int get_output_file_path(RESULT& result, std::string&);
|
extern int get_output_file_path(RESULT const& result, std::string&);
|
||||||
extern int get_output_file_paths(RESULT& result, std::vector<std::string>&);
|
extern int get_output_file_paths(RESULT const& result, std::vector<std::string>&);
|
||||||
extern int get_logical_name(
|
extern int get_logical_name(
|
||||||
RESULT& result, std::string& path, std::string& name
|
RESULT& result, std::string& path, std::string& name
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue