def cfgJsCompile(shell): """Configures, compiles and copies a js shell according to required parameters.""" print("Compiling...") # Print *with* a trailing newline to avoid breaking other stuff os.mkdir(sps.normExpUserPath(os.path.join(shell.getShellCacheDir(), 'objdir-js'))) shell.setJsObjdir(sps.normExpUserPath(os.path.join(shell.getShellCacheDir(), 'objdir-js'))) autoconfRun(shell.getRepoDirJsSrc()) configureTryCount = 0 while True: try: cfgBin(shell) break except Exception as e: configureTryCount += 1 if configureTryCount > 3: print("Configuration of the js binary failed 3 times.") raise # This exception message is returned from sps.captureStdout via cfgBin. # No idea why this is sps.isLinux as well.. if sps.isLinux or (sps.isWin and 'Windows conftest.exe configuration permission' in repr(e)): print("Trying once more...") continue compileJs(shell) inspectShell.verifyBinary(shell) compileLog = sps.normExpUserPath(os.path.join(shell.getShellCacheDir(), shell.getShellNameWithoutExt() + '.fuzzmanagerconf')) if not os.path.isfile(compileLog): envDump(shell, compileLog)
def cfgJsCompile(shell): '''Configures, compiles and copies a js shell according to required parameters.''' print "Compiling..." # Print *with* a trailing newline to avoid breaking other stuff os.mkdir(sps.normExpUserPath(os.path.join(shell.getShellCacheDir(), 'objdir-js'))) shell.setJsObjdir(sps.normExpUserPath(os.path.join(shell.getShellCacheDir(), 'objdir-js'))) autoconfRun(shell.getRepoDirJsSrc()) configureTryCount = 0 while True: try: cfgBin(shell) break except Exception as e: configureTryCount += 1 if configureTryCount > 3: print 'Configuration of the js binary failed 3 times.' raise # This exception message is returned from sps.captureStdout via cfgBin. # No idea why this is sps.isLinux as well.. if sps.isLinux or (sps.isWin and 'Windows conftest.exe configuration permission' in repr(e)): print 'Trying once more...' continue compileJs(shell) inspectShell.verifyBinary(shell) compileLog = sps.normExpUserPath(os.path.join(shell.getShellCacheDir(), shell.getShellNameWithoutExt() + '.fuzzmanagerconf')) if not os.path.isfile(compileLog): envDump(shell, compileLog)