Esempio n. 1
0
    def build(self):
        emerge_in_chroot = uchroot()["/usr/bin/emerge"]
        with local.env(USE="server"):
            uretry(emerge_in_chroot["dev-db/postgresql:9.4"])

        pg_socketdir = "/run/postgresql"
        if not path.exists(self.outside(pg_socketdir)):
            uretry(mkdir["-p", self.outside(pg_socketdir)])
Esempio n. 2
0
 def build(self):
     emerge_in_chroot = uchroot()["/usr/bin/emerge"]
     prog = self.DOMAIN + "/" + str(self.NAME)[len(self.DOMAIN) + 1:]
     with local.env(CONFIG_PROTECT="-*"):
         emerge_in_chroot("--autounmask-only=y",
                          "--autounmask-write=y",
                          prog,
                          retcode=None)
     uretry(emerge_in_chroot[prog])
Esempio n. 3
0
    def run_tests(self, runner):
        wrap(path.join(self.builddir, "usr/bin/x264"), self, self.builddir)
        x264 = uchroot()["/usr/bin/x264"]

        tests = [
            "--crf 30 -b1 -m1 -r1 --me dia --no-cabac --direct temporal --ssim --no-weightb",
            "--crf 16 -b2 -m3 -r3 --me hex --no-8x8dct --direct spatial --no-dct-decimate -t0  --slice-max-mbs 50",
            "--crf 26 -b4 -m5 -r2 --me hex --cqm jvt --nr 100 --psnr --no-mixed-refs --b-adapt 2 --slice-max-size 1500",
            "--crf 18 -b3 -m9 -r5 --me umh -t1 -A all --b-pyramid normal --direct auto --no-fast-pskip --no-mbtree",
            "--crf 22 -b3 -m7 -r4 --me esa -t2 -A all --psy-rd 1.0:1.0 --slices 4",
            "--frames 50 --crf 24 -b3 -m10 -r3 --me tesa -t2",
            "--frames 50 -q0 -m9 -r2 --me hex -Aall",
            "--frames 50 -q0 -m2 -r1 --me hex --no-cabac"
        ]

        for ifile in self.inputfiles:
            for _, test in enumerate(tests):
                uretry(x264[ifile, self.inputfiles[ifile], "--threads", "1",
                            "-o", "/dev/null",
                            test.split(" ")])
Esempio n. 4
0
def mkdir_uchroot(dirpath, root="."):
    """
    Create a file inside a uchroot env.

    You will want to use this when you need to create a file with apropriate
    rights inside a uchroot container with subuid/subgid handling enabled.

    Args:
        dirpath:
            The dirpath that should be created. Absolute inside the
            uchroot container.
        root:
            The root PATH of the container filesystem as seen outside of
            the container.
    """
    from benchbuild.utils.run import uchroot_no_args, uretry

    uchroot = uchroot_no_args()
    uchroot = uchroot["-E", "-A", "-C", "-w", "/", "-r"]
    uchroot = uchroot[os.path.abspath(root)]
    uretry(uchroot["--", "/bin/mkdir", "-p", dirpath])
Esempio n. 5
0
 def build(self):
     emerge_in_chroot = uchroot()["/usr/bin/emerge"]
     uretry(emerge_in_chroot["app-arch/gzip"])
Esempio n. 6
0
 def build(self):
     emerge_in_chroot = uchroot()["/usr/bin/emerge"]
     uretry(emerge_in_chroot["games-board/crafty"])
Esempio n. 7
0
 def build(self):
     emerge_in_chroot = uchroot()["/usr/bin/emerge"]
     uretry(emerge_in_chroot["media-video/x264-encoder"])
Esempio n. 8
0
 def build(self):
     emerge_in_chroot = uchroot()["/usr/bin/emerge"]
     with local.env(USE="-mpi -doc"):
         uretry(emerge_in_chroot["sci-physics/lammps"])