Exemplo n.º 1
0
 def teardown(self):
     cmd.docker["logs", "router"] & FG
     exec_docker("rm -f router")
     exec_docker("rm -f pause")  # veths are deleted automatically
     sudo("chown -R %s %s" % (cmd.whoami(), self.test_state.artifacts))
Exemplo n.º 2
0
Arquivo: test.py Projeto: shitz/scion
 def teardown(self):
     cmd.docker["logs", "router"].run_fg(retcode=None)
     exec_docker("rm -f router")
     exec_docker("rm -f pause")  # veths are deleted automatically
     sudo("chown -R %s %s" % (cmd.whoami(), self.artifacts))
Exemplo n.º 3
0
 def teardown(self):
     docker("stop %s" % self.pause)
     docker("rm %s" % self.pause)  # veths are deleted automatically
     docker("rmi %s %s" % (self.router_image, self.pause_image))
     sudo("chown -R %s %s" % (cmd.whoami(), self.artifacts))
Exemplo n.º 4
0
from argparse import ArgumentParser
import os

from plumbum.cmd import whoami

from dodo_commands import Dodo


def _args():
    parser = ArgumentParser()
    args = Dodo.parse_args(parser)
    return args


if Dodo.is_main(__name__):
    args = _args()
    me = whoami()[:-1]
    src_dir = Dodo.get_config("/ROOT/src_dir")
    Dodo.run(
        ["sudo", "chown", "-R",
         "%s:%s" % (me, me),
         os.path.basename(src_dir)],
        cwd=os.path.dirname(src_dir))