本文整理汇总了Python中builder.Builder.delete方法的典型用法代码示例。如果您正苦于以下问题:Python Builder.delete方法的具体用法?Python Builder.delete怎么用?Python Builder.delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类builder.Builder
的用法示例。
在下文中一共展示了Builder.delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: BRTest
# 需要导入模块: from builder import Builder [as 别名]
# 或者: from builder.Builder import delete [as 别名]
class BRTest(unittest.TestCase):
def showMsg(self, msg):
print "[%s/%s/%s] %s" % (self.testname, self.testinstance,
datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
msg)
def setUp(self):
if os.getenv("REUSE_BUILD"):
self.builddir = os.getenv("REUSE_BUILD").rstrip("/")
skip_build = True
else:
skip_build = False
b = subprocess.check_output(["mktemp", "-d", "buildroot.XXXXX"],
cwd=configtest.builddir)
b = b.strip()
self.builddir = os.path.join(configtest.builddir, b)
self.testname = self.__class__.__name__
self.testinstance = os.path.basename(self.builddir)
self.buildlog = self.builddir + "-build.log"
self.runlog = self.builddir + "-run.log"
self.s = None
self.showMsg("Starting")
self.b = Builder(self.__class__.config, self.builddir, self.buildlog)
if not skip_build:
self.showMsg("Building")
self.b.build()
self.showMsg("Building done")
self.s = System(self.runlog)
def tearDown(self):
self.showMsg("Cleaning up")
if self.s:
self.s.stop()
if self.b and os.getenv("KEEP_BUILD"):
self.b.delete()