Ejemplo n.º 1
0
    def run_tests(self, experiment):
        from benchbuild.project import wrap

        wrap(path.join(self.builddir, "usr", "bin", "7z"), experiment,
             self.builddir)
        sevenz = uchroot()["/usr/bin/7z"]
        run(sevenz["b", "-mmt1"])
Ejemplo n.º 2
0
 def configure(self):
     clang = cc(self)
     with local.cwd(self.src_dir):
         configure = local["./configure"]
         with local.env(CC=str(clang)):
             run(configure["--disable-dependency-tracking",
                           "--disable-silent-rules", "--with-gnu-ld"])
Ejemplo n.º 3
0
    def compile(self):
        with local.env(CC="gcc", CXX="g++"):
            emerge_in_chroot = uchroot.uchroot()["/usr/bin/emerge"]
            run.run(emerge_in_chroot["app-portage/portage-utils"])
            run.run(emerge_in_chroot["app-portage/gentoolkit"])

        qgrep_in_chroot = uchroot.uchroot()["/usr/bin/qgrep"]
        equery_in_chroot = uchroot.uchroot()["/usr/bin/equery"]

        ebuilds = set()

        languages = CFG["gentoo"]["autotest_lang"].value
        use_flags = CFG["gentoo"]["autotest_use"].value
        file_location = str(CFG["gentoo"]["autotest_loc"])

        for language in languages:
            output = qgrep_in_chroot("-l", get_string_for_language(language))
            for line in output.split('\n'):
                if "ebuild" in line:
                    parts = line.split('.ebuild')[0].split('/')
                    package_atom = '{0}/{1}'.format(parts[0], parts[1])
                    ebuilds.add(package_atom)

        for use in use_flags:
            output = equery_in_chroot("-q", "hasuse", "-p", use)
            ebuilds_use = set()
            for line in output.split('\n'):
                ebuilds_use.add(re.sub(r"(.*)-[0-9]+.*$", r"\1", line))

            ebuilds = ebuilds.intersection(ebuilds_use)

        with open(file_location, "w") as output_file:
            for ebuild in sorted(ebuilds):
                output_file.write(str(ebuild) + "\n")
            output_file.flush()
Ejemplo n.º 4
0
    def build(self):
        from plumbum.cmd import make
        from benchbuild.utils.run import run

        ccrypt_dir = path.join(self.builddir, self.src_dir)
        with local.cwd(ccrypt_dir):
            run(make["check"])
Ejemplo n.º 5
0
 def run_tests(self, runner):
     mcrypt_dir = local.path(self.builddir) / "mcrypt-2.6.8"
     mcrypt_libs = mcrypt_dir / "src" / ".libs"
     aestest = wrapping.wrap(mcrypt_libs / "lt-aestest", self)
     ciphertest = wrapping.wrap(mcrypt_libs / "lt-ciphertest", self)
     run.run(aestest)
     run.run(ciphertest)
Ejemplo n.º 6
0
    def run_tests(self, experiment):
        from plumbum.cmd import mkdir
        from benchbuild.project import wrap
        from benchbuild.utils.run import run

        povray_dir = path.join(self.builddir, self.src_dir)
        povray_binary = path.join(povray_dir, "unix", self.name)
        tmpdir = path.join(self.builddir, "tmp")
        povini = path.join(self.builddir, "cfg", ".povray", "3.6",
                           "povray.ini")
        scene_dir = path.join(self.builddir, "share", "povray-3.6", "scenes")
        mkdir(tmpdir, retcode=None)

        povray = wrap(povray_binary, experiment)

        pov_files = find(scene_dir, "-name", "*.pov").splitlines()
        for pov_f in pov_files:
            from plumbum.cmd import head, grep, sed
            with local.env(POVRAY=povray_binary,
                           INSTALL_DIR=self.builddir,
                           OUTPUT_DIR=tmpdir,
                           POVINI=povini):
                options = ((((head["-n", "50", "\"" + pov_f + "\""]
                              | grep["-E", "'^//[ ]+[-+]{1}[^ -]'"])
                             | head["-n", "1"]) | sed["s?^//[ ]*??"]) & FG)
                run(povray["+L" + scene_dir, "+L" + tmpdir, "-i" + pov_f, "-o"
                           + tmpdir, options, "-p"],
                    retcode=None)
Ejemplo n.º 7
0
    def run_tests(self, experiment):
        from benchbuild.project import wrap
        from benchbuild.utils.run import run

        exp = wrap(self.run_f, experiment)
        for i in range(1, 15):
            run(exp[str(i)])
Ejemplo n.º 8
0
    def download(self):
        super(PrepareStage3, self).download()

        with local.cwd(self.builddir + "/usr"):
            Wget(self.src_uri_portage, self.src_file_portage)
            run(tar["xfj", self.src_file_portage])
            rm(self.src_file_portage)
Ejemplo n.º 9
0
 def build(self):
     clang = cc(self)
     with local.cwd(self.src_dir):
         target_opts = ["-DCPUS=1", "-DSYZYGY", "-DTEST"]
         crafty_make = make["target=UNIX", "CC="+str(clang),
                            "opt="+" ".join(target_opts), "crafty-make"]
         run(crafty_make)
Ejemplo n.º 10
0
    def run_tests(self, experiment, run):
        mozjs_dir = path.join("mozjs-0.0.0", "js", "src", "obj")
        wrap(path.join(mozjs_dir, "js", "src", "shell", "js"),
             partial(experiment, may_wrap=False))

        with local.cwd(mozjs_dir):
            run(make["check-jstests"])
Ejemplo n.º 11
0
    def run_tests(self, runner):
        with local.cwd(path.join(self.src_dir, "tests")):
            for binary in LibreSSL.BINARIES:
                wrap(path.abspath(binary), self)

        with local.cwd(self.src_dir):
            run(make["V=1", "check", "-i"])
Ejemplo n.º 12
0
    def build(self):
        from plumbum.cmd import make
        from benchbuild.utils.run import run

        gzip_dir = path.join(self.builddir, self.src_dir)
        with local.cwd(gzip_dir):
            run(make["-j" + CFG["jobs"], "clean", "all"])
Ejemplo n.º 13
0
    def compile(self):
        self.download()

        polybench_opts = CFG["projects"]["polybench"]
        verify = bool(polybench_opts["verify"])
        workload = str(polybench_opts["workload"])

        src_dir = local.cwd / self.src_file
        src_sub = src_dir / self.path_dict[self.name] / self.name

        src_file = src_sub / (self.name + ".c")
        kernel_file = src_sub / (self.name + "_kernel.c")
        utils_dir = src_dir / "utilities"

        polybench_opts = [
            "-D" + str(workload), "-DPOLYBENCH_USE_C99_PROTO",
            "-DPOLYBENCH_USE_RESTRICT"
        ]

        if verify:
            polybench_opts = self.compile_verify([
                "-I", utils_dir, "-I", src_sub, utils_dir / "polybench.c",
                kernel_file, src_file, "-lm"
            ], polybench_opts)

        clang = compiler.cc(self)
        run.run(clang[
            "-I", utils_dir, "-I", src_sub, polybench_opts, utils_dir /
            "polybench.c", kernel_file, src_file, "-lm", "-o", self.name])
Ejemplo n.º 14
0
    def build(self):
        from plumbum.cmd import make
        from benchbuild.utils.run import run
        sdcc_dir = path.join(self.builddir, self.src_dir)

        with local.cwd(sdcc_dir):
            run(make["-j", CFG["jobs"]])
Ejemplo n.º 15
0
    def __str__(self):
        try:
            domain, _, name = self.name.partition("_")
            package = domain + '/' + name
            _container = self.container()

            _uchroot = uchroot.no_args()
            _uchroot = _uchroot["-E", "-A", "-C", "-w", "/", "-r"]
            _uchroot = _uchroot[_container.local]
            with local.env(CONFIG_PROTECT="-*"):
                fake_emerge = _uchroot["emerge", "--autounmask-only=y",
                                       "--autounmask-write=y", "--nodeps"]
                run.run(fake_emerge[package])

            emerge_in_chroot = \
                _uchroot["emerge", "-p", "--nodeps", package]
            _, stdout, _ = emerge_in_chroot.run()

            for line in stdout.split('\n'):
                if package in line:
                    _, _, package_name = line.partition("/")
                    _, name, version = package_name.partition(name)
                    version, _, _ = version.partition(" ")
                    return version[1:]
        except ProcessExecutionError:
            logger = logging.getLogger(__name__)
            logger.info("This older package might not exist any more.")
        return ""
Ejemplo n.º 16
0
    def compile(self):
        self.download()

        js_dir = local.path(self.src_file) / "js" / "src"
        clang = compiler.cc(self)
        clang_cxx = compiler.cxx(self)
        with local.cwd(js_dir):
            make_src_pkg = local["./make-source-package.sh"]
            with local.env(
                    DIST=self.builddir,
                    MOZJS_MAJOR_VERSION=0,
                    MOZJS_MINOR_VERSION=0,
                    MOZJS_PATCH_VERSION=0):
                make_src_pkg()

        mozjs_dir = local.path("mozjs-0.0.0")
        mozjs_src_dir = mozjs_dir / "js" / "src"
        tar("xfj", mozjs_dir + ".tar.bz2")
        with local.cwd(mozjs_src_dir):
            mkdir("obj")
            autoconf = local["autoconf-2.13"]
            autoconf()
            with local.cwd("obj"):
                with local.env(CC=str(clang), CXX=str(clang_cxx)):
                    configure = local["../configure"]
                    configure = configure["--without-system-zlib"]
                    run.run(configure)

        mozjs_obj_dir = mozjs_src_dir / "obj"
        with local.cwd(mozjs_obj_dir):
            run.run(make["-j", str(CFG["jobs"])])
Ejemplo n.º 17
0
 def configure(self):
     clang = cc(self)
     clang_cxx = cxx(self)
     with local.cwd(self.src_dir):
         with local.env(CC=str(clang), CXX=str(clang_cxx)):
             configure = local["./configure"]
             run(configure["--with-static-linked-ext", "--disable-shared"])
Ejemplo n.º 18
0
 def run_tests(self, runner):
     leveldb_dir = local.path("leveldb.src")
     with local.cwd(leveldb_dir):
         with local.env(LD_LIBRARY_PATH=leveldb_dir):
             sqlite = wrapping.wrap(
                 leveldb_dir / 'out-static' / 'db_bench_sqlite3', self)
             run.run(sqlite)
Ejemplo n.º 19
0
    def compile(self):
        self.download()
        makefile_config = local.path(self.src_file) / "config" / "make.config"
        clang = compiler.cc(self)

        with open(makefile_config, 'w') as config:
            lines = [
                "LABEL=benchbuild",
                "ENABLE_OMPSS=",
                "OMPSSC=",
                "OMPC=",
                "CC={cc}",
                "OMPSSLINK=",
                "OMPLINK={cc} -fopenmp",
                "CLINK={cc}",
                "OPT_FLAGS=",
                "CC_FLAGS=",
                "OMPC_FLAGS=",
                "OMPSSC_FLAGS=",
                "OMPC_FINAL_FLAGS=",
                "OMPSSC_FINAL_FLAG=",
                "CLINK_FLAGS=",
                "OMPLINK_FLAGS=",
                "OMPSSLINK_FLAGS=",
            ]
            lines = [l.format(cc=clang) + "\n" for l in lines]
            config.writelines(lines)
        mkdir(local.path(self.src_file) / "bin")
        with local.cwd(self.src_file):
            run.run(make["-C", self.path_dict[self.name]])
Ejemplo n.º 20
0
    def __str__(self):
        try:
            domain, _, name = self.name.partition("_")
            package = domain + '/' + name
            _container = self.container()

            _uchroot = uchroot.no_args()
            _uchroot = _uchroot["-E", "-A", "-C", "-w", "/", "-r"]
            _uchroot = _uchroot[_container.local]
            with local.env(CONFIG_PROTECT="-*"):
                fake_emerge = _uchroot["emerge", "--autounmask-only=y",
                                       "--autounmask-write=y", "--nodeps"]
                run.run(fake_emerge[package])

            emerge_in_chroot = \
                _uchroot["emerge", "-p", "--nodeps", package]
            _, stdout, _ = emerge_in_chroot.run()

            for line in stdout.split('\n'):
                if package in line:
                    _, _, package_name = line.partition("/")
                    _, name, version = package_name.partition(name)
                    version, _, _ = version.partition(" ")
                    return version[1:]
        except ProcessExecutionError:
            logger = logging.getLogger(__name__)
            logger.info("This older package might not exist any more.")
        return ""
Ejemplo n.º 21
0
 def run_tests(self, experiment, run):
     leveldb_dir = "leveldb.src"
     with local.cwd(leveldb_dir):
         with local.env(LD_LIBRARY_PATH=path.abspath(self.src_dir)):
             sqlite = wrap(path.join("out-static", "db_bench_sqlite3"),
                           experiment)
             run(sqlite)
Ejemplo n.º 22
0
    def run_tests(self, experiment):
        from benchbuild.project import wrap
        from benchbuild.utils.run import run

        p7z_dir = path.join(self.builddir, self.src_dir)
        exp = wrap(path.join(p7z_dir, "bin", "7za"), experiment)
        run(exp["b", "-mmt1"])
Ejemplo n.º 23
0
    def build(self):
        from plumbum.cmd import make
        from benchbuild.utils.run import run

        rasdaman_dir = path.join(self.builddir, self.src_dir)
        with local.cwd(rasdaman_dir):
            run(make["clean", "all", "-j", CFG["jobs"]])
Ejemplo n.º 24
0
    def run_tests(self, runner):
        mozjs_dir = path.join("mozjs-0.0.0", "js", "src", "obj")
        self.runtime_extension = partial(self, may_wrap=False)
        wrap(path.join(mozjs_dir, "js", "src", "shell", "js"), self)

        with local.cwd(mozjs_dir):
            run(make["check-jstests"])
Ejemplo n.º 25
0
    def configure(self):
        mcrypt_dir = self.src_dir
        mhash_dir = self.mhash_dir
        libmcrypt_dir = self.libmcrypt_dir

        # Build mhash dependency
        with local.cwd(mhash_dir):
            configure = local["./configure"]
            with local.env(CC=cc(self), CXX=cxx(self)):
                run(configure["--prefix=" + self.builddir])
                run(make["-j", CFG["jobs"], "install"])

        # Builder libmcrypt dependency
        with local.cwd(libmcrypt_dir):
            configure = local["./configure"]
            with local.env(CC=cc(self), CXX=cxx(self)):
                run(configure["--prefix=" + self.builddir])
                run(make["-j", CFG["jobs"], "install"])

        with local.cwd(mcrypt_dir):
            configure = local["./configure"]
            with local.env(CC=cc(self),
                           CXX=cxx(self),
                           LD_LIBRARY_PATH=path.join(self.builddir, "lib") +
                           ":" + CFG["ld_library_path"].value(),
                           LDFLAGS="-L" + path.join(self.builddir, "lib"),
                           CFLAGS="-I" + path.join(self.builddir, "include")):
                run(configure["--disable-dependency-tracking",
                              "--enable-static", "--disable-shared",
                              "--with-libmcrypt=" + self.builddir,
                              "--with-libmhash=" + self.builddir])
Ejemplo n.º 26
0
    def configure(self):
        from plumbum.cmd import make
        from benchbuild.utils.run import run

        minisat_dir = path.join(self.builddir, self.src_dir)
        with local.cwd(minisat_dir):
            run(make["config"])
Ejemplo n.º 27
0
    def run_tests(self, experiment):
        from benchbuild.utils.run import run

        exp = experiment(self.run_f)

        pg_ctl = local[path.join(self.builddir, "pg_ctl")]
        dropdb = local[path.join(self.builddir, "dropdb")]
        createdb = local[path.join(self.builddir, "createdb")]
        pgbench = local[path.join(self.builddir, "pgbench")]

        bin_name = path.join(self.builddir, self.name + ".sh")
        test_data = path.join(self.testdir, "test-data")

        (echo["#!/bin/sh"] >> bin_name) & FG
        (echo[str(exp)] >> bin_name) & FG
        chmod("+x", bin_name)

        num_clients = 1
        num_transactions = 1000000

        pg_ctl("stop", "-t", 360, "-w", "-D", test_data, retcode=None)
        try:
            with local.cwd(test_data):
                pg_ctl("start", "-p", bin_name, "-w", "-D", test_data)
            dropdb["pgbench"] & FG(retcode=None)
            createdb("pgbench")
            run(pgbench["-i", "pgbench"])
            run(pgbench[
                "-c", num_clients, "-S", "-t", num_transactions, "pgbench"])
            dropdb("pgbench")
            pg_ctl("stop", "-t", 360, "-w", "-D", test_data)
        except Exception:
            pg_ctl("stop", "-t", 360, "-w", "-D", test_data)
            raise
Ejemplo n.º 28
0
    def run_tests(self, experiment):
        from benchbuild.project import wrap
        from benchbuild.utils.run import run
        crafty_dir = path.join(self.builddir, self.src_dir)
        exp = wrap(path.join(crafty_dir, "crafty"), experiment)

        run((cat[path.join(self.testdir, "test1.sh")] | exp))
        run((cat[path.join(self.testdir, "test2.sh")] | exp))
Ejemplo n.º 29
0
    def build(self):
        from plumbum.cmd import make
        from benchbuild.utils.run import run

        js_dir = path.join(self.builddir, self.src_dir, "js", "src")

        with local.cwd(path.join(js_dir, "build_OPT.OBJ")):
            run(make["-j", CFG["available_cpu_count"]])
Ejemplo n.º 30
0
    def configure(self):
        clang = cc(self)

        with local.cwd(self.src_dir):
            mkdir("build")
            with local.cwd("build"):
                configure = local["../configure"]
                run(configure["--cc=" + str(clang), "--with-libgcc"])
Ejemplo n.º 31
0
    def build(self):
        self.ldflags += ["-lgomp"]

        clang_cxx = cxx(self)
        with local.cwd(os.path.join(self.src_dir, "src")):
            run(make["CC=" + str(clang_cxx),
                     "LINK=" + str(clang_cxx),
                     "clean", "serial"])
Ejemplo n.º 32
0
    def run_tests(self, experiment):
        from plumbum.cmd import make
        from benchbuild.project import wrap
        from benchbuild.utils.run import run

        wrap(self.run_f, experiment)
        with local.cwd(self.builddir):
            run(make["test"])
Ejemplo n.º 33
0
    def configure(self):
        clang = cc(self)
        clang_cxx = cxx(self)

        with local.cwd(self.src_dir):
            configure = local["./configure"]
            with local.env(CC=str(clang), CXX=str(clang_cxx)):
                run(configure["--disable-shared", "--without-gcc"])
Ejemplo n.º 34
0
    def build(self):
        clang = lt_clang(self.cflags, self.ldflags, self.compiler_extension)

        with local.cwd(self.src_dir):
            run(clang["-fPIC", "-I.", "-c", "sqlite3.c"])
            run(clang["-shared", "-o", "libsqlite3.so", "sqlite3.o", "-ldl"])

        self.build_leveldb()
Ejemplo n.º 35
0
 def build(self):
     with local.cwd(self.SRC_FILE):
         clang = lt_clang(self.cflags, self.ldflags,
                          self.compiler_extension)
         clang_cxx = lt_clang_cxx(self.cflags, self.ldflags,
                                  self.compiler_extension)
         run(make["CC=" + str(clang), "CXX=" + str(clang_cxx), "clean",
                  "lsh", "sh"])
Ejemplo n.º 36
0
 def configure(self):
     clang = lt_clang(self.cflags, self.ldflags, self.compiler_extension)
     clang_cxx = lt_clang_cxx(self.cflags, self.ldflags,
                              self.compiler_extension)
     with local.cwd(self.src_dir):
         with local.env(CC=str(clang), CXX=str(clang_cxx)):
             configure = local["./configure"]
             run(configure["--with-static-linked-ext", "--disable-shared"])
Ejemplo n.º 37
0
 def build(self):
     src_file = path.join(self.name + ".dir", self.name + ".c")
     clang = lt_clang(self.cflags, self.ldflags, self.compiler_extension)
     run(clang["-I", "utilities", "-I", self.name,
               "-DPOLYBENCH_USE_C99_PROTO",
               "-DEXTRALARGE_DATASET",
               "-DPOLYBENCH_USE_RESTRICT",
               "utilities/polybench.c", src_file, "-lm", "-o", self.run_f])
Ejemplo n.º 38
0
    def build(self):
        clang = lt_clang(self.cflags, self.ldflags, self.compiler_extension)
        clang_cxx = lt_clang_cxx(self.cflags, self.ldflags,
                                 self.compiler_extension)

        with local.cwd(self.src_dir):
            run(make["CC=" + str(clang), "CXX=" + str(clang_cxx), "clean",
                     "all"])
Ejemplo n.º 39
0
    def build(self):
        emerge_in_chroot = uchroot()["/usr/bin/emerge"]
        with local.env(USE="server"):
            run(emerge_in_chroot["dev-db/postgresql:9.4"])

        pg_socketdir = "/run/postgresql"
        if not path.exists(self.outside(pg_socketdir)):
            run(mkdir["-p", self.outside(pg_socketdir)])
Ejemplo n.º 40
0
    def build(self):
        from benchbuild.utils.compiler import lt_clang_cxx
        from benchbuild.utils.run import run

        with local.cwd(self.builddir):
            clang_cxx = lt_clang_cxx(self.cflags, self.ldflags,
                                     self.compiler_extension)
            run(clang_cxx["-o", self.run_f, self.src_file])
Ejemplo n.º 41
0
 def build(self):
     with local.cwd(self.builddir):
         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)
         run(emerge_in_chroot[prog])
Ejemplo n.º 42
0
    def compile(self):
        self.download()
        self.ldflags += ["-lgomp"]

        clang_cxx = compiler.cxx(self)
        with local.cwd(local.path(self.src_file) / "src"):
            run.run(make["CC=" + str(clang_cxx), "LINK=" +
                         str(clang_cxx), "clean", "serial"])
Ejemplo n.º 43
0
 def run_tests(self, experiment, run):
     with local.cwd(path.join(self.src_dir, "tests", ".libs")):
         files = find(".", "-type", "f", "-executable")
         for wrap_f in files.split("\n"):
             if wrap_f:
                 wrap(wrap_f, experiment)
     with local.cwd(self.src_dir):
         run(make["V=1", "check"])
Ejemplo n.º 44
0
    def build(self):
        clang = cc(self)

        with local.cwd(self.src_dir):
            run(clang["-fPIC", "-I.", "-c", "sqlite3.c"])
            run(clang["-shared", "-o", "libsqlite3.so", "sqlite3.o", "-ldl"])

        self.build_leveldb()
Ejemplo n.º 45
0
    def compile(self):
        self.download()
        lp_patch = path.template_path("../projects/patches/linpack.patch")
        (patch["-p0"] < lp_patch)()

        self.ldflags += ["-lm"]
        clang = compiler.cc(self)
        run.run(clang["-o", self.run_f, "linpack.c"])
Ejemplo n.º 46
0
    def run_tests(self, experiment, run):
        exp = wrap(self.run_f, experiment)

        programs = glob(path.join(self.testdir, "programs", "*.rml"))
        projects = glob(path.join(self.testdir, "projects", "*.rsf"))
        for program in programs:
            for project in projects:
                run((cat[project] | exp[program]), None)
Ejemplo n.º 47
0
    def compile(self):
        self.download()
        self.ldflags += ["-lgomp"]

        clang_cxx = compiler.cxx(self)
        with local.cwd(local.path(self.src_file) / "src"):
            run.run(make["CC=" + str(clang_cxx), "LINK=" + str(clang_cxx),
                         "clean", "serial"])
Ejemplo n.º 48
0
    def compile(self):
        self.download()

        clang = compiler.cc(self)
        clang_cxx = compiler.cxx(self)
        with local.cwd(self.src_file):
            with local.env(CXX=str(clang_cxx), CC=str(clang)):
                make("clean")
                run.run(make["all", "-i"])
Ejemplo n.º 49
0
    def run_tests(self, experiment):
        from benchbuild.project import wrap
        from benchbuild.utils.run import run

        mcrypt_dir = path.join(self.builddir, self.src_dir, "src", ".libs")
        aestest = wrap(path.join(mcrypt_dir, "lt-aestest"), experiment)
        run(aestest)
        ciphertest = wrap(path.join(mcrypt_dir, "lt-ciphertest"), experiment)
        run(ciphertest)
Ejemplo n.º 50
0
    def run_tests(self, experiment):
        from benchbuild.project import wrap
        from benchbuild.utils.run import run

        leveldb_dir = path.join(self.builddir, "leveldb.src")
        with local.cwd(leveldb_dir):
            sqlite = wrap(
                path.join(leveldb_dir, "out-static", "db_bench_sqlite3"), experiment)
            run(sqlite)
Ejemplo n.º 51
0
    def configure(self):
        clang = cc(self)
        clang_cxx = cxx(self)

        with local.cwd(self.SRC_FILE):
            configure = local["./configure"]
            with local.env(CC=str(clang), CXX=str(clang_cxx)):
                run(configure["--without-ccache", "--disable-pic14-port",
                              "--disable-pic16-port"])
Ejemplo n.º 52
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)
     run(emerge_in_chroot[prog])
Ejemplo n.º 53
0
    def compile(self):
        self.download()

        testfiles = [local.path(self.testdir) / x for x in self.testfiles]
        cp(testfiles, '.')

        clang = compiler.cc(self)
        with local.cwd(self.src_file):
            run.run(make["CFLAGS=-O3", "CC=" + str(clang), "clean", "bzip2"])
Ejemplo n.º 54
0
    def build(self):
        from plumbum.cmd import make, rm
        from benchbuild.utils.run import run
        povray_dir = path.join(self.builddir, self.src_dir)
        povray_binary = path.join(povray_dir, "unix", self.name)

        with local.cwd(povray_dir):
            rm("-f", povray_binary)
            run(make["clean", "all"])