Skip to content

Commit

Permalink
Don't create an output file for temci shell, fix #118
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Bechberger committed Jul 22, 2020
1 parent 611bd1d commit 5fc2c49
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions temci/run/run_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ class AbstractRunDriver(AbstractRegistry):
""" Type scheme for the program block configuration """
runs_benchmarks = True

store_files = True

def __init__(self, misc_settings: dict = None):
"""
Creates an instance.
Expand Down Expand Up @@ -892,6 +894,7 @@ class ShellRunDriver(ExecRunDriver):
"cwd": (List(Str()) | Str()) // Default(".") // Description("Execution directory"),
}, unknown_keys=True)
runs_benchmarks = False
store_files = False

def __init__(self, misc_settings: dict = None):
super().__init__(misc_settings)
Expand Down
2 changes: 2 additions & 0 deletions temci/run/run_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ def store_and_teardown(self):
if configured to do so.
"""
self.teardown()
if not self.pool.run_driver.store_files:
return
self.store()
if len(self.stats_helper.valid_runs()) > 0 \
and all(x.benchmarks() > 0 for x in self.stats_helper.valid_runs()):
Expand Down
4 changes: 4 additions & 0 deletions tests/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ def test_temci_short_shell():
assert "42" in run_temci_proc("short shell echo 42").out


def test_temci_short_shell_file_creation():
assert "run_output.yaml" not in run_temci_proc("short shell echo 42").file_contents


def test_pass_arguments():
assert run_temci("short exec exit --argument 1", expect_success=False).ret_code == ErrorCode.PROGRAM_ERROR.value

Expand Down

0 comments on commit 5fc2c49

Please sign in to comment.