-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PR #113: Fix how settings are inherited, strictly follow docume…
…ntation
- Loading branch information
Showing
8 changed files
with
170 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
default_experiment: Test | ||
|
||
runs: | ||
invocations: 5 | ||
|
||
benchmark_suites: | ||
Suite: | ||
gauge_adapter: TestExecutor | ||
command: TestBenchMarks %(benchmark)s | ||
benchmarks: | ||
- Bench1 | ||
|
||
SuiteWithSetting: | ||
invocations: 3 | ||
gauge_adapter: TestExecutor | ||
command: TestBenchMarks %(benchmark)s | ||
benchmarks: | ||
- Bench1 | ||
executors: | ||
TestRunner1: | ||
path: . | ||
executable: vm-one-result.py | ||
|
||
experiments: | ||
ExpSetting: | ||
invocations: 10 | ||
suites: | ||
- Suite | ||
executions: | ||
- TestRunner1 | ||
|
||
ExecSetting: | ||
executions: | ||
- TestRunner1: | ||
invocations: 7 | ||
suites: | ||
- Suite | ||
|
||
GlobalSetting: | ||
suites: | ||
- Suite | ||
executions: | ||
- TestRunner1 | ||
|
||
SuiteSetting: | ||
suites: | ||
- SuiteWithSetting | ||
executions: | ||
- TestRunner1 |
72 changes: 72 additions & 0 deletions
72
rebench/tests/bugs/issue_112_invocations_setting_ignored_test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
from ..rebench_test_case import ReBenchTestCase | ||
|
||
from ...persistence import DataStore | ||
from ...configurator import Configurator, load_config | ||
from ...executor import Executor | ||
|
||
|
||
class Issue112Test(ReBenchTestCase): | ||
|
||
def setUp(self): | ||
super(Issue112Test, self).setUp() | ||
self._set_path(__file__) | ||
|
||
def test_invocation_setting_on_experiment(self): | ||
# Executes first time | ||
ds = DataStore(self._ui) | ||
cnf = Configurator(load_config(self._path + '/issue_112.conf'), | ||
ds, self._ui, exp_name='ExpSetting', data_file=self._tmp_file) | ||
ds.load_data(None, False) | ||
|
||
# Has not executed yet, check that there is simply | ||
self._assert_runs(cnf, 1, 0, 0) | ||
|
||
ex = Executor(cnf.get_runs(), False, False, self._ui) | ||
ex.execute() | ||
|
||
self._assert_runs(cnf, 1, 10, 10) | ||
|
||
def test_invocation_setting_on_experiment_execution_detail(self): | ||
# Executes first time | ||
ds = DataStore(self._ui) | ||
cnf = Configurator(load_config(self._path + '/issue_112.conf'), | ||
ds, self._ui, exp_name='ExecSetting', data_file=self._tmp_file) | ||
ds.load_data(None, False) | ||
|
||
# Has not executed yet, check that there is simply | ||
self._assert_runs(cnf, 1, 0, 0) | ||
|
||
ex = Executor(cnf.get_runs(), False, False, self._ui) | ||
ex.execute() | ||
|
||
self._assert_runs(cnf, 1, 7, 7) | ||
|
||
def test_invocation_setting_for_global_run_details(self): | ||
# Executes first time | ||
ds = DataStore(self._ui) | ||
cnf = Configurator(load_config(self._path + '/issue_112.conf'), | ||
ds, self._ui, exp_name='GlobalSetting', data_file=self._tmp_file) | ||
ds.load_data(None, False) | ||
|
||
# Has not executed yet, check that there is simply | ||
self._assert_runs(cnf, 1, 0, 0) | ||
|
||
ex = Executor(cnf.get_runs(), False, False, self._ui) | ||
ex.execute() | ||
|
||
self._assert_runs(cnf, 1, 5, 5) | ||
|
||
def test_invocation_setting_in_suite(self): | ||
# Executes first time | ||
ds = DataStore(self._ui) | ||
cnf = Configurator(load_config(self._path + '/issue_112.conf'), | ||
ds, self._ui, exp_name='SuiteSetting', data_file=self._tmp_file) | ||
ds.load_data(None, False) | ||
|
||
# Has not executed yet, check that there is simply | ||
self._assert_runs(cnf, 1, 0, 0) | ||
|
||
ex = Executor(cnf.get_runs(), False, False, self._ui) | ||
ex.execute() | ||
|
||
self._assert_runs(cnf, 1, 3, 3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env python | ||
# simple script emulating an executor generating benchmark results | ||
from __future__ import print_function | ||
|
||
import sys | ||
import random | ||
|
||
print(sys.argv) | ||
|
||
print("Harness Name: ", sys.argv[1]) | ||
print("Bench Name:", sys.argv[2]) | ||
|
||
print("RESULT-total: ", random.triangular(700, 850)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters