예제 #1
0
    def run_tests(self, experiment, run):
        """Runs runtime tests for eix"""

        wrap(path.join("usr", "bin", "eix"), experiment, self.builddir)
        eix = uchroot()["/usr/bin/eix"]

        run(eix["clang"])
예제 #2
0
파일: js.py 프로젝트: simbuerg/benchbuild
    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"])
예제 #3
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"])
예제 #4
0
 def run_tests(self, runner):
     unpack_dir = local.path('tcc-{0}.tar.bz2'.format(self.version))
     with local.cwd(unpack_dir):
         with local.cwd("build"):
             wrapping.wrap("tcc", self)
             inc_path = path.abspath("..")
             runner(make["TCCFLAGS=-B{}".format(inc_path), "test", "-i"])
예제 #5
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"])
예제 #6
0
    def run_tests(self, runner):
        def filter_stderr(stderr_raw, stderr_filtered):
            """Extract dump_arrays_output from stderr."""
            with open(stderr_raw, 'r') as stderr:
                with open(stderr_filtered, 'w') as stderr_filt:
                    stderr_filt.writelines(
                        get_dump_arrays_output(stderr.readlines()))

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

        binary = local.cwd / self.name
        opt_stderr_raw = binary + ".stderr"
        opt_stderr_filtered = opt_stderr_raw + ".filtered"

        runner(wrapping.wrap(binary, self))
        filter_stderr(opt_stderr_raw, opt_stderr_filtered)

        if verify:
            binary = local.cwd / (self.name + ".no-opts")
            noopt_stderr_raw = binary + ".stderr"
            noopt_stderr_filtered = noopt_stderr_raw + ".filtered"

            with local.env(BB_IS_BASELINE=True):
                runner(wrapping.wrap(binary, self))
            filter_stderr(noopt_stderr_raw, noopt_stderr_filtered)

            diff_cmd = diff[noopt_stderr_filtered, opt_stderr_filtered]
            runner(diff_cmd, retcode=0)
예제 #7
0
    def run_tests(self, runner):
        for outfile in self.config['src']:
            wrap(os.path.join(self.in_src_dir, outfile), self)

        with local.cwd(self.in_src_dir):
            test_runner = sh["./run"]
            runner(test_runner)
예제 #8
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)
예제 #9
0
    def run_tests(self, runner):
        noopts_file = self.run_f + ".no-opts"
        noopts_file_stderr = noopts_file + ".stderr"
        noopts_file_stderr_2 = noopts_file_stderr + ".2"

        opts_file = self.run_f
        opts_file_stderr = self.run_f + ".stderr"
        opts_file_stderr_2 = opts_file_stderr + ".2"

        runner(wrap(opts_file, self))
        with local.env(BB_IS_BASELINE=True):
            runner(wrap(noopts_file, self))

        with open(noopts_file_stderr, 'r') as inf:
            stderr = inf.readlines()
            with open(noopts_file_stderr_2, 'w') as fd_stderr:
                fd_stderr.writelines(get_dump_arrays_output(stderr))

        with open(opts_file_stderr, 'r') as inf:
            stderr = inf.readlines()
            with open(opts_file_stderr_2, 'w') as fd_stderr:
                fd_stderr.writelines(get_dump_arrays_output(stderr))

        diff_cmd = diff[noopts_file_stderr_2, opts_file_stderr_2]
        runner(diff_cmd, retcode=0)
예제 #10
0
    def run_tests(self, runner):
        mozjs_obj_dir = local.path("mozjs-0.0.0") / "js" / "src" / "obj"
        self.runtime_extension = partial(self, may_wrap=False)
        wrapping.wrap(mozjs_obj_dir / "js" / "src" / "shell" / "js", self)

        with local.cwd(mozjs_obj_dir):
            runner(make["check-jstests"])
예제 #11
0
파일: js.py 프로젝트: PolyJIT/benchbuild
    def run_tests(self, runner):
        mozjs_obj_dir = local.path("mozjs-0.0.0") / "js" / "src" / "obj"
        self.runtime_extension = partial(self, may_wrap=False)
        wrapping.wrap(mozjs_obj_dir / "js" / "src" / "shell" / "js", self)

        with local.cwd(mozjs_obj_dir):
            runner(make["check-jstests"])
예제 #12
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"])
예제 #13
0
    def run_tests(self, runner):
        unpack_dir = local.path("libressl-{0}".format(self.version))
        with local.cwd(unpack_dir / "tests"):
            for binary in LibreSSL.BINARIES:
                wrapping.wrap(local.cwd / binary, self)

        with local.cwd(unpack_dir):
            runner(make["V=1", "check", "-i"])
예제 #14
0
    def run_tests(self, runner):
        unpack_dir = local.path('rodinia_{0}'.format(self.version))
        in_src_dir = unpack_dir / self.config['dir']

        for outfile in self.config['src']:
            wrapping.wrap(in_src_dir / outfile, self)

        with local.cwd(in_src_dir):
            runner(sh['./run'])
예제 #15
0
    def run_tests(self, runner):
        unpack_dir = local.path('rodinia_{0}'.format(self.version))
        in_src_dir = unpack_dir / self.config['dir']

        for outfile in self.config['src']:
            wrapping.wrap(in_src_dir / outfile, self)

        with local.cwd(in_src_dir):
            runner(sh['./run'])
예제 #16
0
    def run_tests(self, experiment, run):
        wrap(path.join(self.builddir, "usr/bin/lmp_serial"), experiment,
             self.builddir)
        lammps = uchroot()["/usr/bin/lmp_serial"]
        lammps_dir = path.join(self.builddir, "lammps")

        with local.cwd("lammps"):
            tests = glob(path.join(lammps_dir, "in.*"))
            for test in tests:
                run((lammps < strip_path_prefix(test, self.builddir)))
예제 #17
0
 def run_tests(self, runner):
     unpack_dir = "crafty.src"
     with local.cwd(unpack_dir):
         crafty = wrapping.wrap("./crafty", self)
         testdir = local.path(self.testdir)
         runner((cat[testdir / "test1.sh"] | crafty), retcode=[0, 120])
         runner((cat[testdir / "test2.sh"] | crafty), retcode=[0, 120])
예제 #18
0
 def run_tests(self, runner):
     unpack_dir = "crafty.src"
     with local.cwd(unpack_dir):
         crafty = wrapping.wrap("./crafty", self)
         testdir = local.path(self.testdir)
         runner((cat[testdir / "test1.sh"] | crafty), retcode=[0, 120])
         runner((cat[testdir / "test2.sh"] | crafty), retcode=[0, 120])
예제 #19
0
파일: crafty.py 프로젝트: vulder/benchbuild
 def run_tests(self, runner):
     with local.cwd(self.src_dir):
         exp = wrap("./crafty", self)
         runner((cat[path.join(self.testdir, "test1.sh")] | exp),
             retcode=[0, 120])
         runner((cat[path.join(self.testdir, "test2.sh")] | exp),
             retcode=[0, 120])
예제 #20
0
 def run_tests(self, runner):
     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"),
                           self)
             run(sqlite)
예제 #21
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)
예제 #22
0
    def run_tests(self, runner):
        crocopat = wrapping.wrap(self.run_f, self)

        programs = local.path(self.testdir) / "programs" // "*.rml"
        projects = local.path(self.testdir) / "projects" // "*.rsf"
        for program in programs:
            for _project in projects:
                runner((cat[_project] | crocopat[program]), None)
예제 #23
0
    def run_tests(self, runner):
        exp = wrap(self.run_f, self)

        programs = glob(path.join(self.testdir, "programs", "*.rml"))
        projects = glob(path.join(self.testdir, "projects", "*.rsf"))
        for program in programs:
            for project in projects:
                runner((cat[project] | exp[program]), None)
예제 #24
0
    def run_tests(self, runner):
        crocopat = wrapping.wrap(self.run_f, self)

        programs = local.path(self.testdir) / "programs" // "*.rml"
        projects = local.path(self.testdir) / "projects" // "*.rsf"
        for program in programs:
            for _project in projects:
                runner((cat[_project] | crocopat[program]), None)
예제 #25
0
파일: gzip.py 프로젝트: vulder/benchbuild
    def run_tests(self, runner):
        wrap(path.join(self.builddir, "bin", "gzip"), self, self.builddir)
        gzip = uchroot()["/bin/gzip"]

        # Compress
        runner(gzip["-f", "-k", "--best", "compression/text.html"])
        runner(gzip["-f", "-k", "--best", "compression/chicken.jpg"])
        runner(gzip["-f", "-k", "--best", "compression/control"])
        runner(gzip["-f", "-k", "--best", "compression/input.source"])
        runner(gzip["-f", "-k", "--best", "compression/liberty.jpg"])

        # Decompress
        runner(gzip["-f", "-k", "--decompress", "compression/text.html.gz"])
        runner(gzip["-f", "-k", "--decompress", "compression/chicken.jpg.gz"])
        runner(gzip["-f", "-k", "--decompress", "compression/control.gz"])
        runner(gzip["-f", "-k", "--decompress", "compression/input.source.gz"])
        runner(gzip["-f", "-k", "--decompress", "compression/liberty.jpg.gz"])
예제 #26
0
    def run_tests(self, experiment, run):
        wrap(path.join(self.builddir, "bin", "bzip2"), experiment,
             self.builddir)
        bzip2 = uchroot()["/bin/bzip2"]

        # Compress
        run(bzip2["-f", "-z", "-k", "--best", "compression/text.html"])
        run(bzip2["-f", "-z", "-k", "--best", "compression/chicken.jpg"])
        run(bzip2["-f", "-z", "-k", "--best", "compression/control"])
        run(bzip2["-f", "-z", "-k", "--best", "compression/input.source"])
        run(bzip2["-f", "-z", "-k", "--best", "compression/liberty.jpg"])

        # Decompress
        run(bzip2["-f", "-k", "--decompress", "compression/text.html.bz2"])
        run(bzip2["-f", "-k", "--decompress", "compression/chicken.jpg.bz2"])
        run(bzip2["-f", "-k", "--decompress", "compression/control.bz2"])
        run(bzip2["-f", "-k", "--decompress", "compression/input.source.bz2"])
        run(bzip2["-f", "-k", "--decompress", "compression/liberty.jpg.bz2"])
예제 #27
0
    def run_tests(self, experiment, run):
        lammps_dir = path.join(self.builddir, self.src_dir, "src")
        exp = wrap(path.join(lammps_dir, "lmp_serial"), experiment)

        with local.cwd("test"):
            tests = glob(path.join(self.testdir, "in.*"))
            for test in tests:
                cmd = (exp < test)
                run(cmd, None)
예제 #28
0
    def run_tests(self, runner):
        builddir = self.builddir
        lammps = wrapping.wrap(local.path('/usr/bin/lmp'), self)
        lammps_dir = builddir / "lammps"

        with local.cwd(lammps_dir):
            tests = lammps_dir // "in.*"
            for test in tests:
                runner((lammps < wrapping.strip_path_prefix(test, builddir)))
예제 #29
0
    def run_tests(self, experiment, run):
        exp = wrap(path.join(self.src_dir, "ruby"), experiment)

        with local.env(RUBYOPT=""):
            run(ruby[path.join(self.testdir, "benchmark", "run.rb"),
                     "--ruby=\"" + str(exp) + "\"",
                     "--opts=\"-I" + path.join(self.testdir, "lib") + " -I" +
                     path.join(self.testdir, ".") + " -I" +
                     path.join(self.testdir, ".ext", "common") + "\"", "-r"])
예제 #30
0
    def run_tests(self, runner):
        unpack_dir = local.path('ruby-{0}'.format(self.version))
        ruby_n = wrapping.wrap(unpack_dir / "ruby", self)
        testdir = local.path(self.testdir)

        with local.env(RUBYOPT=""):
            run.run(ruby[testdir / "benchmark" / "run.rb",
                         "--ruby=\"" + str(ruby_n) + "\"", "--opts=\"-I" +
                         testdir / "lib" + " -I" + testdir / "." + " -I" +
                         testdir / ".ext" / "common" + "\"", "-r"])
예제 #31
0
    def run_tests(self, runner):
        src_path = local.path(self.src_file)
        minisat_lib_path = src_path / "build" / "dynamic" / "lib"
        testfiles = local.path(self.testdir) // "*.cnf.gz"

        minisat = wrapping.wrap(
            src_path / "build" / "dynamic" / "bin" / "minisat", self)
        for test_f in testfiles:
            cmd = (minisat.with_env(LD_LIBRARY_PATH=minisat_lib_path) < test_f)
            runner(cmd, None)
예제 #32
0
파일: x264.py 프로젝트: vulder/benchbuild
    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(" ")])
예제 #33
0
파일: bots.py 프로젝트: PolyJIT/benchbuild
    def run_tests(self, runner):
        binary_name = "{name}.benchbuild.serial".format(name=self.name)
        binary_path = local.path(self.src_file) / "bin" / binary_name
        exp = wrapping.wrap(binary_path, self)

        if self.name in self.input_dict:
            for test_input in self.input_dict[self.name]:
                input_file = local.path(
                    self.src_file) / "inputs" / self.name / test_input
                runner(exp["-f", input_file])
        else:
            runner(exp)
예제 #34
0
    def run_tests(self, runner):
        """
        Run the tests of this project.

        Clients override this method to provide customized run-time tests.

        Args:
            experiment: The experiment we run this project under
            run: A function that takes the run command.
        """
        exp = wrapping.wrap(self.run_f, self)
        runner(exp)
예제 #35
0
    def run_tests(self, runner):
        """
        Run the tests of this project.

        Clients override this method to provide customized run-time tests.

        Args:
            experiment: The experiment we run this project under
            run: A function that takes the run command.
        """
        exp = wrapping.wrap(self.run_f, self)
        runner(exp)
예제 #36
0
    def run_tests(self, experiment, run):
        exp = wrap(
            path.join(self.SRC_FILE, "build", "dynamic", "bin", "minisat"),
            experiment)

        testfiles = glob(path.join(self.testdir, "*.cnf.gz"))
        minisat_lib_path = path.join(self.SRC_FILE, "build", "dynamic", "lib")

        for test_f in testfiles:
            with local.env(LD_LIBRARY_PATH=minisat_lib_path + ":" +
                           getenv("LD_LIBRARY_PATH", "")):
                run((exp < test_f), None)
예제 #37
0
    def run_tests(self, runner):
        src_path = local.path(self.src_file)
        lammps_dir = src_path / "src"
        exp = wrapping.wrap(lammps_dir / "lmp_serial", self)

        examples_dir = src_path / "examples"
        tests = examples_dir // "*" // "in.*"

        for test in tests:
            dirname = test.dirname
            with local.cwd(dirname):
                cmd = (exp < test)
                runner(cmd, None)
예제 #38
0
    def run_tests(self, runner):
        """
        Execute LevelDB's runtime configuration.

        Args:
            experiment: The experiment's run function.
        """
        leveldb = wrapping.wrap(
            local.path(self.src_file) / "out-static" / "db_bench", self)
        with local.env(LD_LIBRARY_PATH="{}:{}".format(
                local.path(self.src_file) /
                "out-shared", getenv("LD_LIBRARY_PATH", ""))):
            runner(leveldb)
예제 #39
0
파일: gzip.py 프로젝트: PolyJIT/benchbuild
    def run_tests(self, runner):
        gzip = wrapping.wrap(local.path('/bin/gzip'), self)

        # Compress
        runner(gzip["-f", "-k", "--best", "compression/text.html"])
        runner(gzip["-f", "-k", "--best", "compression/chicken.jpg"])
        runner(gzip["-f", "-k", "--best", "compression/control"])
        runner(gzip["-f", "-k", "--best", "compression/input.source"])
        runner(gzip["-f", "-k", "--best", "compression/liberty.jpg"])

        # Decompress
        runner(gzip["-f", "-k", "--decompress", "compression/text.html.gz"])
        runner(gzip["-f", "-k", "--decompress", "compression/chicken.jpg.gz"])
        runner(gzip["-f", "-k", "--decompress", "compression/control.gz"])
        runner(gzip["-f", "-k", "--decompress", "compression/input.source.gz"])
        runner(gzip["-f", "-k", "--decompress", "compression/liberty.jpg.gz"])
예제 #40
0
파일: bzip2.py 프로젝트: PolyJIT/benchbuild
    def run_tests(self, runner):
        bzip2 = wrapping.wrap(local.path(self.src_file) / "bzip2", self)

        # Compress
        runner(bzip2["-f", "-z", "-k", "--best", "text.html"])
        runner(bzip2["-f", "-z", "-k", "--best", "chicken.jpg"])
        runner(bzip2["-f", "-z", "-k", "--best", "control"])
        runner(bzip2["-f", "-z", "-k", "--best", "input.source"])
        runner(bzip2["-f", "-z", "-k", "--best", "liberty.jpg"])

        # Decompress
        runner(bzip2["-f", "-k", "--decompress", "text.html.bz2"])
        runner(bzip2["-f", "-k", "--decompress", "chicken.jpg.bz2"])
        runner(bzip2["-f", "-k", "--decompress", "control.bz2"])
        runner(bzip2["-f", "-k", "--decompress", "input.source.bz2"])
        runner(bzip2["-f", "-k", "--decompress", "liberty.jpg.bz2"])
예제 #41
0
파일: gzip.py 프로젝트: PolyJIT/benchbuild
    def run_tests(self, runner):
        unpack_dir = local.path("gzip-{0}.tar.xz".format(self.version))
        gzip = wrapping.wrap(unpack_dir / "gzip", self)

        # Compress
        runner(gzip["-f", "-k", "--best", "text.html"])
        runner(gzip["-f", "-k", "--best", "chicken.jpg"])
        runner(gzip["-f", "-k", "--best", "control"])
        runner(gzip["-f", "-k", "--best", "input.source"])
        runner(gzip["-f", "-k", "--best", "liberty.jpg"])

        # Decompress
        runner(gzip["-f", "-k", "--decompress", "text.html.gz"])
        runner(gzip["-f", "-k", "--decompress", "chicken.jpg.gz"])
        runner(gzip["-f", "-k", "--decompress", "control.gz"])
        runner(gzip["-f", "-k", "--decompress", "input.source.gz"])
        runner(gzip["-f", "-k", "--decompress", "liberty.jpg.gz"])
예제 #42
0
    def run_tests(self, runner):
        unpack_dir = local.path("CLAPACK-{0}".format(self.version))
        with local.cwd(unpack_dir / "BLAS"):
            xblat2s = wrapping.wrap("xblat2s", self)
            xblat2d = wrapping.wrap("xblat2d", self)
            xblat2c = wrapping.wrap("xblat2c", self)
            xblat2z = wrapping.wrap("xblat2z", self)

            xblat3s = wrapping.wrap("xblat3s", self)
            xblat3d = wrapping.wrap("xblat3d", self)
            xblat3c = wrapping.wrap("xblat3c", self)
            xblat3z = wrapping.wrap("xblat3z", self)

            runner((xblat2s < "sblat2.in"))
            runner((xblat2d < "dblat2.in"))
            runner((xblat2c < "cblat2.in"))
            runner((xblat2z < "zblat2.in"))
            runner((xblat3s < "sblat3.in"))
            runner((xblat3d < "dblat3.in"))
            runner((xblat3c < "cblat3.in"))
            runner((xblat3z < "zblat3.in"))
예제 #43
0
파일: bzip2.py 프로젝트: PolyJIT/benchbuild
    def run_tests(self, runner):
        bzip2 = wrapping.wrap(local.path('/bin/bzip2'), self)

        # Compress
        runner(bzip2["-f", "-z", "-k", "--best", "compression/text.html"])
        runner(bzip2["-f", "-z", "-k", "--best", "compression/chicken.jpg"])
        runner(bzip2["-f", "-z", "-k", "--best", "compression/control"])
        runner(bzip2["-f", "-z", "-k", "--best", "compression/input.source"])
        runner(bzip2["-f", "-z", "-k", "--best", "compression/liberty.jpg"])

        # Decompress
        runner(bzip2["-f", "-k", "--decompress", "compression/text.html.bz2"])
        runner(
            bzip2["-f", "-k", "--decompress", "compression/chicken.jpg.bz2"])
        runner(bzip2["-f", "-k", "--decompress", "compression/control.bz2"])
        runner(
            bzip2["-f", "-k", "--decompress", "compression/input.source.bz2"])
        runner(
            bzip2["-f", "-k", "--decompress", "compression/liberty.jpg.bz2"])
예제 #44
0
    def run_tests(self, runner):
        pg_data = local.path("/test-data/")
        pg_path = local.path("/usr/bin/postgres")

        postgres = wrapping.wrap(pg_path, self)

        def pg_su(command):
            return su['-c', command, '-g', 'postgres', 'postgres']

        dropdb = pg_su('/usr/bin/dropdb')
        createdb = pg_su("/usr/bin/createdb")
        pgbench = pg_su("/usr/bin/pgbench")
        initdb = pg_su("/usr/bin/initdb")
        pg_server = pg_su(pg_path)

        with local.env(PGPORT="54329", PGDATA=pg_data):
            if not pg_data.exists():
                runner(initdb)

            with pg_server.bgrun() as postgres:
                #We get the PID of the running 'pg_server, which is actually
                #the PID of the uchroot binary. This is not the PID we
                #want to send a SIGTERM to.

                #We need to enumerate all children of 'postgres' recursively
                #and select the one PID that is named 'postgres.bin' and has
                #not a process with the same name as parent.
                #This should be robust enough, as long as postgres doesn't
                #switch process names after forking.
                sleep(3)
                postgres_root = Process(pid=postgres.pid)
                real_postgres = [
                    c.pid for c in postgres_root.children(True)
                    if c.name() == 'postgres.bin'
                    and c.parent().name() != 'postgres.bin'
                ]
                try:
                    runner(createdb)
                    runner(pgbench["-i", "portage"])
                    runner(pgbench["-c", 1, "-S", "-t", 1000000, "portage"])
                    runner(dropdb["portage"])
                finally:
                    kill("-sSIGTERM", real_postgres[0])
예제 #45
0
파일: x264.py 프로젝트: PolyJIT/benchbuild
    def run_tests(self, runner):
        x264 = wrapping.wrap(local.path('/usr/bin/x264'), self)

        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):
                runner(x264[ifile, self.inputfiles[ifile], "--threads", "1",
                            "-o", "/dev/null",
                            test.split(" ")])
예제 #46
0
    def run_tests(self, runner):
        povray_binary = local.path(self.src_file) / "unix" / self.name
        tmpdir = local.path("tmp")
        tmpdir.mkdir()

        povini = local.path("cfg") / ".povray" / "3.6" / "povray.ini"
        scene_dir = local.path("share") / "povray-3.6" / "scenes"

        povray = wrapping.wrap(povray_binary, self)
        pov_files = find(scene_dir, "-name", "*.pov").splitlines()
        for pov_f in pov_files:
            with local.env(
                    POVRAY=povray_binary,
                    INSTALL_DIR='.',
                    OUTPUT_DIR=tmpdir,
                    POVINI=povini):
                options = ((((head["-n", "50", "\"" + pov_f + "\""]
                              | grep["-E", "'^//[ ]+[-+]{1}[^ -]'"])
                             | head["-n", "1"]) | sed["s?^//[ ]*??"]) & FG)
                run.run(
                    povray["+L" + scene_dir, "+L" + tmpdir, "-i" +
                           pov_f, "-o" + tmpdir, options, "-p"],
                    retcode=None)
예제 #47
0
 def test_create(self):
     with local.cwd(self.tmp_dir):
         self.cmd = wrappers.wrap(self.tmp_script,
                                  EmptyProject(empty.Empty()))
         self.assertTrue(os.path.exists("{}.bin".format(self.tmp_script)))
     self.assertTrue(os.path.exists(str(self.cmd)))
예제 #48
0
 def run_tests(self, runner):
     lulesh = wrapping.wrap("lulesh", self)
     for i in range(1, 15):
         runner(lulesh["-i", i])
예제 #49
0
파일: sdcc.py 프로젝트: PolyJIT/benchbuild
 def run_tests(self, runner):
     sdcc = wrapping.wrap(self.run_f, self)
     runner(sdcc)
예제 #50
0
 def run_tests(self, runner):
     _7z = wrapping.wrap(local.path('/usr/bin/7z'), self)
     runner(_7z["b", "-mmt1"])
예제 #51
0
 def run_tests(self, runner):
     scimark2 = wrap(local.path('scimark2'), self)
     runner(scimark2)
예제 #52
0
파일: test.py 프로젝트: PolyJIT/benchbuild
 def run_tests(self, runner):
     exp = wrapping.wrap(self.src_file + ".out", self)
     runner(exp)
예제 #53
0
파일: eix.py 프로젝트: PolyJIT/benchbuild
    def run_tests(self, runner):
        """Runs runtime tests for eix"""

        eix = wrapping.wrap(local.path('/usr/bin/eix'), self)
        runner(eix["clang"])
예제 #54
0
    def run_tests(self, runner):
        crafty_path = local.path("/usr/bin/crafty")
        crafty = wrapping.wrap(crafty_path, self)

        with open("test1.sh", 'w') as test1:
            lines = '''
st=10
ponder=off
display nomoves
setboard rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq
move
book off
setboard rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq
move
setboard 1k1r4/pp1b1R2/3q2pp/4p3/2B5/4Q3/PPP2B2/2K5 b
move
setboard 3r1k2/4npp1/1ppr3p/p6P/P2PPPP1/1NR5/5K2/2R5 w
move
setboard 2q1rr1k/3bbnnp/p2p1pp1/2pPp3/PpP1P1P1/1P2BNNP/2BQ1PRK/7R b
move
setboard rnbqkb1r/p3pppp/1p6/2ppP3/3N4/2P5/PPP1QPPP/R1B1KB1R w KQkq
move
setboard r1b2rk1/2q1b1pp/p2ppn2/1p6/3QP3/1BN1B3/PPP3PP/R4RK1 w
move
setboard 2r3k1/pppR1pp1/4p3/4P1P1/5P2/1P4K1/P1P5/8 w
move
setboard 1nk1r1r1/pp2n1pp/4p3/q2pPp1N/b1pP1P2/B1P2R2/2P1B1PP/R2Q2K1 w
move
setboard 4b3/p3kp2/6p1/3pP2p/2pP1P2/4K1P1/P3N2P/8 w
move
setboard 2kr1bnr/pbpq4/2n1pp2/3p3p/3P1P1B/2N2N1Q/PPP3PP/2KR1B1R w
move
setboard 3rr1k1/pp3pp1/1qn2np1/8/3p4/PP1R1P2/2P1NQPP/R1B3K1 b
move
setboard 2r1nrk1/p2q1ppp/bp1p4/n1pPp3/P1P1P3/2PBB1N1/4QPPP/R4RK1 w
move
setboard r3r1k1/ppqb1ppp/8/4p1NQ/8/2P5/PP3PPP/R3R1K1 b
move
setboard r2q1rk1/4bppp/p2p4/2pP4/3pP3/3Q4/PP1B1PPP/R3R1K1 w
move
setboard rnb2r1k/pp2p2p/2pp2p1/q2P1p2/8/1Pb2NP1/PB2PPBP/R2Q1RK1 w
move
setboard 2r3k1/1p2q1pp/2b1pr2/p1pp4/6Q1/1P1PP1R1/P1PN2PP/5RK1 w
move
setboard r1bqkb1r/4npp1/p1p4p/1p1pP1B1/8/1B6/PPPN1PPP/R2Q1RK1 w kq
move
setboard r2q1rk1/1ppnbppp/p2p1nb1/3Pp3/2P1P1P1/2N2N1P/PPB1QP2/R1B2RK1 b
move
setboard r1bq1rk1/pp2ppbp/2np2p1/2n5/P3PP2/N1P2N2/1PB3PP/R1B1QRK1 b
move
setboard 3rr3/2pq2pk/p2p1pnp/8/2QBPP2/1P6/P5PP/4RRK1 b
move
setboard r4k2/pb2bp1r/1p1qp2p/3pNp2/3P1P2/2N3P1/PPP1Q2P/2KRR3 w
move
setboard 3rn2k/ppb2rpp/2ppqp2/5N2/2P1P3/1P5Q/PB3PPP/3RR1K1 w
move
setboard 2r2rk1/1bqnbpp1/1p1ppn1p/pP6/N1P1P3/P2B1N1P/1B2QPP1/R2R2K1 b
move
setboard r1bqk2r/pp2bppp/2p5/3pP3/P2Q1P2/2N1B3/1PP3PP/R4RK1 b kq
move
setboard r2qnrnk/p2b2b1/1p1p2pp/2pPpp2/1PP1P3/PRNBB3/3QNPPP/5RK1 w
move
setboard /k/3p/p2P1p/P2P1P///K/ w
move
setboard /k/rnn////5RBB/K/ w
move
mt=0
quit
EOF
'''

            test1.write(lines)

        with open("test2.sh", 'w') as test2:
            lines = '''
st=10
ponder=off
mt=2
setboard 2r2rk1/1bqnbpp1/1p1ppn1p/pP6/N1P1P3/P2B1N1P/1B2QPP1/R2R2K1 b
move
mt=0
quit
'''

            test2.write(lines)

        runner((cat["test1.sh"] | crafty))
        runner((cat["test2.sh"] | crafty))
예제 #55
0
 def run_tests(self, runner):
     unpack_dir = "ffmpeg-{0}".format(self.version)
     with local.cwd(unpack_dir):
         wrapping.wrap(self.name, self)
         runner(make["V=1", "-i", "fate"])