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
8 changes: 6 additions & 2 deletions reframe/core/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ def check_performance(self):
for tag, expr in self.perf_patterns.items():
value = evaluate(expr)
key = '%s:%s' % (self._current_partition.fullname, tag)
if not key in self.reference:
if key not in self.reference:
raise SanityError(
"tag `%s' not resolved in references for `%s'" %
(tag, self._current_partition.fullname))
Expand Down Expand Up @@ -1158,10 +1158,14 @@ def _copy_to_outputdir(self):

# Copy files specified by the user
for f in self.keep_files:
f_orig = f
if not os.path.isabs(f):
f = os.path.join(self._stagedir, f)

shutil.copy(f, self.outputdir)
if os.path.isfile(f):
shutil.copy(f, self.outputdir)
elif os.path.isdir(f):
shutil.copytree(f, os.path.join(self.outputdir, f_orig))

def cleanup(self, remove_files=False, unload_env=True):
"""The cleanup phase of the regression test pipeline.
Expand Down
7 changes: 4 additions & 3 deletions unittests/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,10 @@ def test_hellocheck_local(self):
test.valid_prog_environs = [self.progenv.name]

# Test also the prebuild/postbuild functionality
test.prebuild_cmd = ['touch prebuild']
test.postbuild_cmd = ['touch postbuild']
test.keep_files = ['prebuild', 'postbuild']
test.prebuild_cmd = ['touch prebuild', 'mkdir prebuild_dir']
test.postbuild_cmd = ['touch postbuild', 'mkdir postbuild_dir']
test.keep_files = ['prebuild', 'postbuild',
'prebuild_dir', 'postbuild_dir']

# Force local execution of the test
test.local = True
Expand Down