Skip to content

Commit

Permalink
Make include_faulty more robust by checking for it in Executor.execut…
Browse files Browse the repository at this point in the history
…e() (#278)
  • Loading branch information
smarr authored Jan 10, 2025
2 parents ab94e43 + bc810ea commit 82eb4ee
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rebench/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ def execute(self):
run.report_job_completed(self._runs)
if run.is_failed:
successful = False
return successful
return successful or self._include_faulty
finally:
for run in self._runs:
run.close_files()
Expand Down
20 changes: 20 additions & 0 deletions rebench/tests/perf/issue_166_profiling_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,23 @@ def _make_profiler_return_small_report(run_id):
profiler.command = "./cat-first.sh"
profiler.record_args = "perf-small.report"
profiler.report_args = "perf-small.report"

def test_failing_profiler_and_include_faulty(self):
raw_config = self._load_config_and_use_tmp_as_data_file()
cnf = Configurator(
raw_config, DataStore(self.ui), self.ui, exp_name="profile2", data_file=self._tmp_file)

runs = cnf.get_runs()
run_id = list(cnf.get_runs())[0]
self.assertEqual(0, run_id.completed_invocations)
self.assertEqual(0, run_id.get_number_of_data_points())

profilers = run_id.benchmark.suite.executor.profiler
profiler = profilers[0]
profiler.command = "false"

executor = Executor(runs, False, self.ui, include_faulty=True)
self.assertTrue(executor.execute())

self.assertEqual(0, run_id.completed_invocations)
self.assertEqual(0, run_id.get_number_of_data_points())

0 comments on commit 82eb4ee

Please sign in to comment.