diff --git a/reframe/frontend/executors/__init__.py b/reframe/frontend/executors/__init__.py index 1bd8bb295e..5a19f8a9e3 100644 --- a/reframe/frontend/executors/__init__.py +++ b/reframe/frontend/executors/__init__.py @@ -342,6 +342,9 @@ def run_check(self, c, p, e): if self.strict_check: c.strict_check = True + if self.force_local: + c.local = True + @abc.abstractmethod def getstats(self): """Return test case statistics of the run.""" diff --git a/unittests/test_policies.py b/unittests/test_policies.py index bc8c2e3b20..d8d89d0363 100644 --- a/unittests/test_policies.py +++ b/unittests/test_policies.py @@ -120,6 +120,14 @@ def test_strict_performance_check(self): self.assertEqual(1, self._num_failures_stage('sanity')) self.assertEqual(2, self._num_failures_stage('performance')) + def test_force_local_execution(self): + self.runner.policy.force_local = True + self.runner.runall([HelloTest(system=self.system, resources=self.resources)], + self.system) + stats = self.runner.stats + for t in stats.get_tasks(): + self.assertTrue(t.check.local) + def test_kbd_interrupt_within_test(self): check = KeyboardInterruptCheck(system=self.system, resources=self.resources)