Beispiel #1
0
 def copyIns(self, cwd, srcs, dest):
     # unlike copyIn, this copy list of files TO destination. Because of necessary relativity of srcs,
     # CWD is included
     o, e, r = exxec.processToStringsWithResult(
         self.mainCommand() + ["--copyin"] + srcs + [dest], True, cwd)
     la.LoggingAccess().log(e, vc.Verbosity.MOCK)
     return o, e, r
Beispiel #2
0
 def _rollbackCommand(self, name):
     o, e, r = exxec.processToStringsWithResult(self.mainCommand() +
                                                ["--rollback-to", name])
     la.LoggingAccess().log(e, vc.Verbosity.MOCK)
     la.LoggingAccess().log(o, vc.Verbosity.MOCK)
     la.LoggingAccess().log(str(self.listSnapshots()), vc.Verbosity.MOCK)
     return e, o, r
Beispiel #3
0
 def _scrubLvmCommand(self):
     o, e, r = exxec.processToStringsWithResult(self.mainCommand() +
                                                ["--scrub", "all"])
     if r != 0:
         failed = "Build chroot is locked, please restart the testsuite."
         tu.passed_or_failed(self, False, failed)
         raise utils.mock.mock_execution_exception.MockExecutionException(
             failed)
     la.LoggingAccess().log(e, vc.Verbosity.MOCK)
     la.LoggingAccess().log(o, vc.Verbosity.MOCK)
     la.LoggingAccess().log(str(self.listSnapshots()), vc.Verbosity.MOCK)
Beispiel #4
0
 def executeShell(self, scriptFilePath):
     o, e, r = exxec.processToStringsWithResult(
         self.mainCommand() + ["--chroot", "sh", scriptFilePath])
     la.LoggingAccess().log(e, vc.Verbosity.MOCK)
     return o, r
Beispiel #5
0
 def executeCommand(self, cmds):
     o, e, r = exxec.processToStringsWithResult(self.mainCommand() +
                                                ["--chroot"] + cmds)
     la.LoggingAccess().log(e, vc.Verbosity.MOCK)
     return o, r
Beispiel #6
0
 def copyIn(self, src, dest):
     o, e, r = exxec.processToStringsWithResult(self.mainCommand() +
                                                ["--copyin"] + src + [dest])
     la.LoggingAccess().log(e, vc.Verbosity.MOCK)
     return o, e, r