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
4 changes: 2 additions & 2 deletions reframe/core/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,8 +845,8 @@ def _rfm_init(self, name=None, prefix=None):

# Static directories of the regression check
self._prefix = os.path.abspath(prefix)
if (not os.path.isdir(os.path.join(self._prefix, self.sourcesdir)) and
not osext.is_url(self.sourcesdir)):
if (self.sourcesdir == 'src' and
not os.path.isdir(os.path.join(self._prefix, self.sourcesdir))):
self.sourcesdir = None

# Runtime information of the test
Expand Down
14 changes: 14 additions & 0 deletions unittests/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,20 @@ def __init__(self):
_run(test, *local_exec_ctx)


def test_run_only_srcdir_set_to_none(local_exec_ctx):
@fixtures.custom_prefix('foo/bar/')
class MyTest(rfm.RunOnlyRegressionTest):
executable = 'echo'
valid_prog_environs = ['*']
valid_systems = ['*']
sourcesdir = None
sanity_patterns = sn.assert_true(1)

test = MyTest()
assert test.sourcesdir is None
_run(test, *local_exec_ctx)


def test_compile_only_failure(local_exec_ctx):
@fixtures.custom_prefix('unittests/resources/checks')
class MyTest(rfm.CompileOnlyRegressionTest):
Expand Down