예제 #1
0
def dispatcher_experiment(fs, db, experiment):
    """Creates a dispatcher.Experiment object."""
    experiment_config_filepath = get_test_data_path('experiment-config.yaml')
    fs.add_real_file(experiment_config_filepath)
    for fuzzer in FUZZERS:
        fs.create_file(os.path.join(
            fuzzer_config_utils.get_fuzzer_configs_dir(), fuzzer),
                       contents=yaml.dump({'fuzzer': fuzzer}))
    return dispatcher.Experiment(experiment_config_filepath)
예제 #2
0
    def __init__(self, experiment_config_filepath: str):
        self.config = yaml_utils.read(experiment_config_filepath)

        benchmarks = self.config['benchmarks'].split(',')
        self.benchmarks = builder.build_all_measurers(benchmarks)

        self.fuzzers = [
            fuzzer_config_utils.get_fuzzer_name(filename) for filename in
            os.listdir(fuzzer_config_utils.get_fuzzer_configs_dir())
        ]

        _initialize_experiment_in_db(self.config['experiment'], self.benchmarks,
                                     self.fuzzers, self.config['trials'])
        self.web_bucket = posixpath.join(self.config['cloud_web_bucket'],
                                         experiment_utils.get_experiment_name())
예제 #3
0
    def __init__(self, experiment_config_filepath: str):
        self.config = yaml_utils.read(experiment_config_filepath)

        self.benchmarks = self.config['benchmarks'].split(',')

        self.fuzzers = [
            fuzzer_config_utils.get_fuzzer_name(filename) for filename in
            os.listdir(fuzzer_config_utils.get_fuzzer_configs_dir())
        ]
        self.num_trials = self.config['trials']
        self.experiment_name = self.config['experiment']
        self.git_hash = self.config['git_hash']

        self.web_bucket = posixpath.join(
            self.config['cloud_web_bucket'],
            experiment_utils.get_experiment_name())