. */ class analyze_batch implements pts_option_interface { public static function run($r) { pts_load_function_set("merge"); $BASE_FILE = pts_find_result_file($r[0]); $SAVE_TO = $r[1]; if($BASE_FILE == false) { echo "\n" . $r[0] . " couldn't be found.\n"; } else { if(!empty($SAVE_TO) && !is_dir(SAVE_RESULTS_DIR . $SAVE_TO)) { $SAVE_TO .= "/composite.xml"; } else { $SAVE_TO = null; } if(empty($SAVE_TO)) { do { $rand_file = rand(1000, 9999); $SAVE_TO = "analyze-" . $rand_file . '/'; } while(is_dir(SAVE_RESULTS_DIR . $SAVE_TO)); $SAVE_TO .= "composite.xml"; } // Analyze Results $SAVED_RESULTS = pts_merge_batch_tests_to_line_comparison(@file_get_contents($BASE_FILE)); pts_save_result($SAVE_TO, $SAVED_RESULTS); echo "Results Saved To: " . SAVE_RESULTS_DIR . $SAVE_TO . "\n\n"; pts_display_web_browser(SAVE_RESULTS_DIR . $SAVE_TO); } } } ?>