Esempio n. 1
0
    def test_02_run(self):
        set_all_environments(env_type='both')
        benchmarks = current_benchmarks(self)
        actions = current_action(self)

        for name, params in benchmarks.items():
            for action in actions:
                yield self.check_run, action, name, params[1]
Esempio n. 2
0
    def test_01_builds(self):
        set_all_environments(env_type='build')
        benchmarks = current_benchmarks(self)
        actions = current_action(self)

        for name, params in benchmarks.items():
            for action in actions:
                yield self.check_build, action, params[0]
    def test_01_builds(self):
        set_all_environments(env_type='build')
        benchmarks = current_benchmarks(self)
        actions = current_action(self)

        for name, params in benchmarks.items():
            for native, tested in actions.items():
                yield self.check_build, native, params[0]
                for t in tested:
                    yield self.check_build, t, params[0]
    def test_02_run(self):
        set_all_environments(env_type='both')
        benchmarks = current_benchmarks(self)
        actions = current_action(self)

        for name, params in benchmarks.items():
            for native, tested in actions.items():

                # run native and store output
                native_output = self.get_native_output(native, name, params[1])

                # run all tested types and compare outputs with native
                for t in tested:
                    yield self.compare_outputs, t, name, params[1], native_output
Esempio n. 5
0
    def set_environment(self, args):
        cli_env = CLIEnvironment(args, self.debug, self.verbose)
        cli_env.setup()

        if getattr(args, "partial_experiment", '') == 'build':
            set_all_environments(self.debug, self.verbose, 'build')
        elif getattr(args, "partial_experiment", '') == 'run':
            set_all_environments(self.debug, self.verbose, 'run')
        else:
            set_all_environments(self.debug, self.verbose, 'both')
Esempio n. 6
0
    def set_environment(self, args):
        cli_env = CLIEnvironment(args, self.debug, self.verbose)
        cli_env.setup()

        if getattr(args, "no_run", False):
            set_all_environments(self.debug, self.verbose, 'build')
        elif getattr(args, "no_build", False):
            set_all_environments(self.debug, self.verbose, 'run')
        else:
            set_all_environments(self.debug, self.verbose, 'both')
# ATTENTION: the tests are supposed to be run inside a container!
# all dependencies have to be installed before running the tests by `./entrypoint install -n benchmark_name`
from __future__ import absolute_import

import os
import subprocess

from core.environment import set_all_environments
from .abstract_test import BuildAndRun, current_action, current_benchmarks

set_all_environments()
os.environ['NUM_THREADS'] = '1'

PROJ_ROOT = os.environ.get("PROJ_ROOT")
CONF_DIR = "%s/experiments/makefiles" % PROJ_ROOT
BUILD_DIR = "%s/experiments/build" % PROJ_ROOT
DATA_PATH = os.environ.get("DATA_PATH")
INPUT_PATH = DATA_PATH + "/inputs/"


class Acceptance(BuildAndRun):
    # build types
    actions = {
        "gcc_native": (
            'gcc_mpx',
            'gcc_mpx_no_narrow_bounds',
            'gcc_mpx_only_write',
            'gcc_asan',
        ),
        "icc_native": (
            'icc_mpx',