3636#include " sched_util.h"
3737#include " sched_msgs.h"
3838#include " validate_util.h"
39+ #include " validator.h"
3940#include " md5_file.h"
4041
4142using std::string;
@@ -56,6 +57,9 @@ using std::vector;
5657#define SIXCREDIT 2.0E-6
5758// #define SIXCREDIT 2.5E-6
5859
60+ bool is_gzip = false ;
61+ // if true, files are gzipped; skip header when comparing
62+
5963struct FILE_CKSUM {
6064 FILE *fp;
6165};
@@ -65,7 +69,25 @@ struct FILE_CKSUM_LIST {
6569 ~FILE_CKSUM_LIST (){}
6670};
6771
68- bool files_match (RESULT &r1, FILE_CKSUM_LIST& f1, const RESULT &r2, FILE_CKSUM_LIST& f2) {
72+ int validate_handler_init (int argc, char ** argv) {
73+ // handle project specific arguments here
74+ for (int i=1 ; i<argc; i++) {
75+ if (is_arg (argv[i], " is_gzip" )) {
76+ is_gzip = true ;
77+ }
78+ }
79+ return 0 ;
80+ }
81+
82+ void validate_handler_usage () {
83+ // describe the project specific arguments here
84+ fprintf (stderr,
85+ " Custom options:\n "
86+ " [--is_gzip] files are gzipped; skip header when comparing\n "
87+ );
88+ }
89+
90+ bool files_match (RESULT &r1, FILE_CKSUM_LIST& f1, RESULT &r2, FILE_CKSUM_LIST& f2) {
6991
7092 int c1, c2;
7193 int ipos, jpos;
@@ -189,8 +211,8 @@ bool files_match(RESULT &r1, FILE_CKSUM_LIST& f1, const RESULT &r2, FILE_CKSUM_L
189211 outlier = 0 ;
190212 if (fracturn < 1.0 ) {
191213 r1.runtime_outlier = true ;
192- // r2.runtime_outlier = 1; // const
193- outlier = 1 ;
214+ r2.runtime_outlier = true ;
215+ outlier = 1 ;
194216 }
195217 runtime1 = r1.elapsed_time ;
196218 runtime2 = r2.elapsed_time ;
@@ -271,7 +293,7 @@ int init_result(RESULT& result, void*& data) {
271293
272294int compare_results (
273295 RESULT & r1, void * data1,
274- RESULT const & r2, void * data2,
296+ RESULT & r2, void * data2,
275297 bool & match
276298) {
277299 FILE_CKSUM_LIST* f1 = (FILE_CKSUM_LIST*) data1;
0 commit comments