From 4611f388c1e2fd874b05a42e22cf97d7eaf225f7 Mon Sep 17 00:00:00 2001 From: Stefan Marr Date: Thu, 2 Aug 2018 18:43:52 +0100 Subject: [PATCH 1/2] Add support to prevent execution This is essentially a dry-run, and allows to check whether the loads configuration. Signed-off-by: Stefan Marr --- docs/usage.md | 11 +++++++++++ rebench/rebench.py | 11 ++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/usage.md b/docs/usage.md index 0b63341f..315e51aa 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -143,6 +143,17 @@ For this purpose we use *schedulers* to determine the execution order. random [default: batch] ``` +#### Prevent Execution to Verify Configuration + +To check whether a configuration is correct, it can be useful to avoid +execution altogether. For such *testing* or *dry run*, we have the following +option: + +```text +-E, --no-execution Disables execution. It allows to verify the + configuration file and other parameters. +``` + #### Continuous Performance Tracking ReBench supports [Codespeed][1] as platform for continuous performance diff --git a/rebench/rebench.py b/rebench/rebench.py index 8f547242..43b89be3 100755 --- a/rebench/rebench.py +++ b/rebench/rebench.py @@ -116,6 +116,11 @@ def shell_options(self): default='batch', help='execution order of benchmarks: ' 'batch, round-robin, random [default: %(default)s]') + execution.add_argument( + '-E', '--no-execution', action='store_true', dest='no_execution', + default=False, + help='Disables execution.' + ' It allows to verify the configuration file and other parameters.') data = parser.add_argument_group( 'Data and Reporting', @@ -220,7 +225,11 @@ def execute_experiment(self, runs): self._config.options.debug, scheduler_class, self._config.build_log) - return executor.execute() + + if self._config.options.no_execution: + return True + else: + return executor.execute() def main_func(): From c51f96831ba03e21901cc920452d0aa387d31972 Mon Sep 17 00:00:00 2001 From: Stefan Marr Date: Thu, 2 Aug 2018 19:02:33 +0100 Subject: [PATCH 2/2] Run coverage only on Python 2.7 There are currently issues with PyPy for some reason. Signed-off-by: Stefan Marr --- .travis.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3d4f9fc2..b3debc2a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,19 @@ language: python matrix: include: - python: "2.7" + before_install: + - pip install coveralls pylint + env: COVERAGE="--with-coverage --cover-package=rebench" + after_success: + coveralls - python: "3.6" + before_install: + - pip install coveralls pylint # PyPy versions - python: pypy + env: DO_LINT="echo On PyPy, we won't " - python: pypy3 + env: DO_LINT="echo On PyPy, we won't " dist: trusty sudo: false @@ -17,14 +26,10 @@ addons: - time install: - - pip install coveralls pylint - pip install . # command to run tests script: - - nosetests --with-coverage --cover-package=rebench + - nosetests ${COVERAGE} - (cd rebench && rebench -N ../rebench.conf e:TestRunner2) - - pylint rebench - -after_success: - coveralls + - ${DO_LINT} pylint rebench