Commit 5810d1ef authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

BF: Don't split shell commands. Rev instead of repo

parent c81caf09
......@@ -65,8 +65,11 @@ def indir(dirname):
def sprun(cmd, **kwargs):
"""Runs the given command with subprocess.run. """
fprint(f'Running {cmd}')
cmd = shlex.split(cmd)
return sp.run(cmd, check=True, **kwargs)
if not kwargs.get('shell', False):
cmd = shlex.split(cmd)
if 'check' not in kwargs:
kwargs['check'] = True
return sp.run(cmd, **kwargs)
def is_valid_project_version(version):
......
......@@ -133,7 +133,7 @@ def get_project_repository_and_revision(filename, ignore_env=False):
source = meta.get('source', {})
repo = source.get('git_url', '').strip()
rev = source.get('git_url', '').strip()
rev = source.get('git_rev', '').strip()
if repo == '': repo = None
if rev == '': rev = None
......
......@@ -29,6 +29,7 @@ def checkout_project_repository_shortcut_if_no_tests(project_dir):
# If no feedsRun tests can be found, we abort the job
hits = glob.glob(op.join(project_dir, '**', 'feedsRun*'))
if len(hits) == 0:
print(f'No feedsRun scripts found in project source repository '
f'({repo}:{rev} - aborting test.')
......@@ -80,7 +81,6 @@ def run_tests(project_dir, test_output_dir):
commands.append(f'export FSLDIR={condaenv}')
commands.append('. $FSLDIR/etc/fslconf/fsl.sh')
commands.append(f'pyfeeds run -v -k {cfg} '
f'-i {project_dir} '
f'-o {test_output_dir} '
f'{project_dir}')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment