Exemplo n.º 1
0
 def _applyPatch(self, patch):
     oldWorkingDirectory = os.getcwd()
     os.chdir(self.dest)
     errorCode = subprocess.call(['patch', '-p1', '-f', '-i', getPathFromProjectRoot(patch)])
     os.chdir(oldWorkingDirectory)
     if errorCode:
         raise Exception('Cannot apply patch, will skip current benchmarkPath - Error: %s' % errorCode)
Exemplo n.º 2
0
 def _applyPatch(self, patch):
     if not patch:
         return self.webRoot
     oldWorkingDirectory = os.getcwd()
     os.chdir(self.webRoot)
     errorCode = subprocess.call(['patch', '-p1', '-f', '-i', getPathFromProjectRoot(patch)])
     os.chdir(oldWorkingDirectory)
     if errorCode:
         _log.error('Cannot apply patch, will skip current benchmarkPath')
         self.clean()
         return None
     return self.webRoot
Exemplo n.º 3
0
 def _copyBenchmarkToTempDir(self, benchmarkPath):
     self.webRoot = tempfile.mkdtemp()
     _log.debug('Servering at webRoot: %s' % self.webRoot)
     self.dest = os.path.join(self.webRoot, os.path.split(benchmarkPath)[1])
     shutil.copytree(getPathFromProjectRoot(benchmarkPath), self.dest)
Exemplo n.º 4
0
 def _copyBenchmarkToTempDir(self, benchmarkPath):
     shutil.copytree(getPathFromProjectRoot(benchmarkPath), self.dest)