Skip to content

Commit

Permalink
Merge PR #104: Add support to prevent execution
Browse files Browse the repository at this point in the history
  • Loading branch information
smarr committed Aug 2, 2018
2 parents 43a1d15 + c51f968 commit 2423a1b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
17 changes: 11 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
11 changes: 11 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion rebench/rebench.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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():
Expand Down

0 comments on commit 2423a1b

Please sign in to comment.