Skip to content

Commit 54411e4

Browse files
authored
Merge pull request #274 from vkarak/bugfix/force-local-not-working
Fix force local execution
2 parents 8e8e7a9 + f5ef7a2 commit 54411e4

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

reframe/frontend/executors/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ def run_check(self, c, p, e):
342342
if self.strict_check:
343343
c.strict_check = True
344344

345+
if self.force_local:
346+
c.local = True
347+
345348
@abc.abstractmethod
346349
def getstats(self):
347350
"""Return test case statistics of the run."""

unittests/test_policies.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ def test_strict_performance_check(self):
120120
self.assertEqual(1, self._num_failures_stage('sanity'))
121121
self.assertEqual(2, self._num_failures_stage('performance'))
122122

123+
def test_force_local_execution(self):
124+
self.runner.policy.force_local = True
125+
self.runner.runall([HelloTest(system=self.system, resources=self.resources)],
126+
self.system)
127+
stats = self.runner.stats
128+
for t in stats.get_tasks():
129+
self.assertTrue(t.check.local)
130+
123131
def test_kbd_interrupt_within_test(self):
124132
check = KeyboardInterruptCheck(system=self.system,
125133
resources=self.resources)

0 commit comments

Comments
 (0)