Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make include_faulty more robust by checking for it in Executor.execute() #278

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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())
Loading