Skip to content
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 reframe/frontend/testgenerators.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def _rfm_pin_run_nodes(obj):

def _rfm_pin_build_nodes(obj):
pin_nodes = getattr(obj, '$nid')
if not obj.local and not obj.build_locally:
if obj.build_job and not obj.local and not obj.build_locally:
obj.build_job.pin_nodes = pin_nodes

def _make_dist_test(testcase):
Expand Down
5 changes: 3 additions & 2 deletions unittests/resources/checks_unlisted/distribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
class Simple(rfm.RunOnlyRegressionTest):
valid_systems = ['*']
valid_prog_environs = ['*']
executable = '/bin/true'
executable = 'true'
sanity_patterns = sn.assert_true(1)


class MyFixture(rfm.RunOnlyRegressionTest):
Expand All @@ -30,7 +31,7 @@ class Complex(rfm.RunOnlyRegressionTest):
valid_systems = ['*']
valid_prog_environs = ['*']
f = fixture(MyFixture, scope='session')
executable = '/bin/true'
executable = 'true'

@sanity_function
def inspect_fixture(self):
Expand Down
12 changes: 12 additions & 0 deletions unittests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,18 @@ def test_maxfail_negative(run_reframe):
assert returncode == 1


def test_distribute_build_remotely_runonly(run_reframe, run_action):
returncode, stdout, stderr = run_reframe(
local=False,
more_options=['--distribute', '-S', 'build_locally=0'],
checkpath=['unittests/resources/checks_unlisted/distribute.py'],
action=run_action
)
assert 'Traceback' not in stdout
assert 'Traceback' not in stderr
assert returncode == 0


def test_repeat_option(run_reframe, run_action):
returncode, stdout, stderr = run_reframe(
more_options=['--repeat', '2', '-n', '^HelloTest'],
Expand Down