TreeLogger compileLogger) throws UnableToCompleteException { try { String currentModuleName = module.getName(); String stub = LauncherDir.generateStubNocacheJs(module.getName(), options); File noCacheJs = new File(outputDir.getCanonicalPath(), module.getName() + ".nocache.js"); Files.write(stub, noCacheJs, Charsets.UTF_8);
File moduleDir = new File(launcherDir + "/" + module.getName()); if (!moduleDir.isDirectory()) { if (!moduleDir.mkdirs()) { String stub = generateStubNocacheJs(module.getName(), options); final File noCacheJs = new File(moduleDir, module.getName() + ".nocache.js"); Files.write(stub, noCacheJs, Charsets.UTF_8); for (PolicyFile policyFile : compileDir.readRpcPolicyManifest(module.getName())) { String filename = policyFile.getName(); File src = new File(compileDir.getWarDir(), module.getName() + "/" + filename); File dest = new File(moduleDir, filename); Files.copy(src, dest);
File moduleDir = new File(launcherDir + "/" + module.getName()); if (!moduleDir.isDirectory()) { if (!moduleDir.mkdirs()) { String stub = generateStubNocacheJs(module.getName(), options); final File noCacheJs = new File(moduleDir, module.getName() + ".nocache.js"); Files.write(stub, noCacheJs, Charsets.UTF_8); for (PolicyFile policyFile : compileDir.readRpcPolicyManifest(module.getName())) { String filename = policyFile.getName(); File src = new File(compileDir.getWarDir(), module.getName() + "/" + filename); File dest = new File(moduleDir, filename); Files.copy(src, dest);
TreeLogger compileLogger) throws UnableToCompleteException { try { String currentModuleName = module.getName(); String stub = LauncherDir.generateStubNocacheJs(module.getName(), options); File noCacheJs = new File(outputDir.getCanonicalPath(), module.getName() + ".nocache.js"); Files.write(stub, noCacheJs, Charsets.UTF_8);
/** * Generates the nocache.js file to use when precompile is not on. */ private static String generateModuleRecompileJs(ModuleDef module, TreeLogger compileLogger) throws UnableToCompleteException { String outputModuleName = module.getName(); try { String templateJs = Resources.toString( Resources.getResource(Recompiler.class, "recompile_template.js"), Charsets.UTF_8); String propertyProviders = PropertiesUtil.generatePropertiesSnippet(module, compileLogger); String libJs = Resources.toString( Resources.getResource(Recompiler.class, "recompile_lib.js"), Charsets.UTF_8); String recompileJs = Resources.toString( Resources.getResource(Recompiler.class, "recompile_main.js"), Charsets.UTF_8); templateJs = templateJs.replace("__MODULE_NAME__", "'" + outputModuleName + "'"); templateJs = templateJs.replace("__PROPERTY_PROVIDERS__", propertyProviders); templateJs = templateJs.replace("__LIB_JS__", libJs); templateJs = templateJs.replace("__MAIN__", recompileJs); return templateJs; } catch (IOException e) { compileLogger.log(Type.ERROR, "Can not generate + " + outputModuleName + " recompile js", e); throw new UnableToCompleteException(); } }
/** * Generates the nocache.js file to use when precompile is not on. */ private static String generateModuleRecompileJs(ModuleDef module, TreeLogger compileLogger) throws UnableToCompleteException { String outputModuleName = module.getName(); try { String templateJs = Resources.toString( Resources.getResource(Recompiler.class, "recompile_template.js"), Charsets.UTF_8); String propertyProviders = PropertiesUtil.generatePropertiesSnippet(module, compileLogger); String libJs = Resources.toString( Resources.getResource(Recompiler.class, "recompile_lib.js"), Charsets.UTF_8); String recompileJs = Resources.toString( Resources.getResource(Recompiler.class, "recompile_main.js"), Charsets.UTF_8); templateJs = templateJs.replace("__MODULE_NAME__", "'" + outputModuleName + "'"); templateJs = templateJs.replace("__PROPERTY_PROVIDERS__", propertyProviders); templateJs = templateJs.replace("__LIB_JS__", libJs); templateJs = templateJs.replace("__MAIN__", recompileJs); return templateJs; } catch (IOException e) { compileLogger.log(Type.ERROR, "Can not generate + " + outputModuleName + " recompile js", e); throw new UnableToCompleteException(); } }
Strategy strategy = testCase.getStrategy(); boolean sameTest = (currentModule != null) && syntheticModuleName.equals(currentModule.getName()); if (sameTest && lastLaunchFailed) { throw new UnableToCompleteException(); currentTestInfo = new TestInfo(currentModule.getName(), testCase.getClass().getName(), testCase.getName()); numTries++; runStyle.launchModule(currentModule.getName());
Strategy strategy = testCase.getStrategy(); boolean sameTest = (currentModule != null) && syntheticModuleName.equals(currentModule.getName()); if (sameTest && lastLaunchFailed) { throw new UnableToCompleteException(); currentTestInfo = new TestInfo(currentModule.getName(), testCase.getClass().getName(), testCase.getName()); numTries++; runStyle.launchModule(currentModule.getName());
String newModuleName = module.getName(); outputModuleName.set(newModuleName);
String newModuleName = module.getName(); outputModuleName.set(newModuleName);