public static void initialize ( String configFilePath ) { if ( manager != null ) { return ; } logger . info ( "initialize" ) ; final Config config ; try { config = JavaConfig . generateFromYamlConfig ( new File ( configFilePath ) ) ; } catch ( YamlConvertException e ) { throw new RuntimeException ( e ) ; } // load srcTree from already dumped srcTree YAML final File srcTreeFile = CommonPath . srcTreeFile ( config . getRootBaseRunOutputIntermediateDataDir ( ) ) ; SrcTree srcTree = new SrcTree ( ) ; try { srcTree . fromYamlObject ( YamlUtils . load ( srcTreeFile ) ) ; } catch ( YamlConvertException e ) { throw new RuntimeException ( e ) ; } try { srcTree . resolveKeyReference ( ) ; } catch ( IllegalDataStructureException e ) { throw new RuntimeException ( e ) ; } manager = new HookMethodManager ( srcTree , config ) ; if ( ! config . isRunTestOnly ( ) ) { // set up shutdown hook which generates HTML report Runtime . getRuntime ( ) . addShutdownHook ( new Thread ( ) { @ Override public void run ( ) { HtmlReport report = new HtmlReport ( ) ; try { report . generate ( config . getRootBaseReportInputIntermediateDataDirs ( ) , config . getRootBaseReportOutputDir ( ) ) ; } catch ( IllegalDataStructureException | IllegalTestScriptException e ) { throw new RuntimeException ( e ) ; } } } ) ; } }
if called multiple times just ignored