How to use chore - 3 common examples

To help you get started, we’ve selected a few chore examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tsgates / mbox / src / sandbox.py View on Github external
# sandbox container
    box = osbox.OS(parse_root(opts.root))
    if opts.no_sandbox:
        tracer.trace(interpose, args, tracer.dump_syscall)
    else:
        tracer.trace(interpose, args, box.run)
    box.done()
    
    # interactively committing back to host
    if opts.interact:
        chore.interactive(box)

    # check post condition when unit testing
    if opts.test:
        dbg.info("[!] checking %s" % args[0])
        if not chore.check_post(args[0], box.root):
            exit(1)
github tsgates / mbox / src / sandbox.py View on Github external
# change directory
    if opts.cd:
        os.chdir(opts.cd)

    # sandbox container
    box = osbox.OS(parse_root(opts.root))
    if opts.no_sandbox:
        tracer.trace(interpose, args, tracer.dump_syscall)
    else:
        tracer.trace(interpose, args, box.run)
    box.done()
    
    # interactively committing back to host
    if opts.interact:
        chore.interactive(box)

    # check post condition when unit testing
    if opts.test:
        dbg.info("[!] checking %s" % args[0])
        if not chore.check_post(args[0], box.root):
            exit(1)
github tsgates / mbox / src / sandbox.py View on Github external
return (opts, args)

def parse_root(path):
    return path.replace("%PID", str(os.getpid()))

if __name__ == "__main__":
    (opts, args) = parse_args()

    if opts.list_syscalls:
        print_syscalls(opts)
        exit(1)

    # check pre condition when unit testing
    if opts.test:
        dbg.info("[!] checking %s" % args[0])
        if not chore.check_pre(args[0]):
            exit(1)

    # interpose opt
    if opts.interpose == "seccomp":
        interpose = tracer.TRACE_SECCOMP
    elif opts.interpose == "ptrace":
        interpose = tracer.TRACE_PTRACE
    else:
        dbg.error("Failed to find %s module" % opts.interpose)
        exit(1)

    # change directory
    if opts.cd:
        os.chdir(opts.cd)

    # sandbox container

chore

Multi-scheduler job dispatcher

LGPL-3.0
Latest version published 2 years ago

Package Health Score

39 / 100
Full package analysis