Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
conda
fsl-ci-rules
Commits
5810d1ef
Commit
5810d1ef
authored
Feb 01, 2021
by
Paul McCarthy
🚵
Browse files
BF: Don't split shell commands. Rev instead of repo
parent
c81caf09
Changes
3
Hide whitespace changes
Inline
Side-by-side
fsl_ci/__init__.py
View file @
5810d1ef
...
@@ -65,8 +65,11 @@ def indir(dirname):
...
@@ -65,8 +65,11 @@ def indir(dirname):
def
sprun
(
cmd
,
**
kwargs
):
def
sprun
(
cmd
,
**
kwargs
):
"""Runs the given command with subprocess.run. """
"""Runs the given command with subprocess.run. """
fprint
(
f
'Running
{
cmd
}
'
)
fprint
(
f
'Running
{
cmd
}
'
)
cmd
=
shlex
.
split
(
cmd
)
if
not
kwargs
.
get
(
'shell'
,
False
):
return
sp
.
run
(
cmd
,
check
=
True
,
**
kwargs
)
cmd
=
shlex
.
split
(
cmd
)
if
'check'
not
in
kwargs
:
kwargs
[
'check'
]
=
True
return
sp
.
run
(
cmd
,
**
kwargs
)
def
is_valid_project_version
(
version
):
def
is_valid_project_version
(
version
):
...
...
fsl_ci/conda.py
View file @
5810d1ef
...
@@ -133,7 +133,7 @@ def get_project_repository_and_revision(filename, ignore_env=False):
...
@@ -133,7 +133,7 @@ def get_project_repository_and_revision(filename, ignore_env=False):
source
=
meta
.
get
(
'source'
,
{})
source
=
meta
.
get
(
'source'
,
{})
repo
=
source
.
get
(
'git_url'
,
''
).
strip
()
repo
=
source
.
get
(
'git_url'
,
''
).
strip
()
rev
=
source
.
get
(
'git_
url
'
,
''
).
strip
()
rev
=
source
.
get
(
'git_
rev
'
,
''
).
strip
()
if
repo
==
''
:
repo
=
None
if
repo
==
''
:
repo
=
None
if
rev
==
''
:
rev
=
None
if
rev
==
''
:
rev
=
None
...
...
fsl_ci/scripts/run_unit_tests.py
View file @
5810d1ef
...
@@ -29,6 +29,7 @@ def checkout_project_repository_shortcut_if_no_tests(project_dir):
...
@@ -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
# If no feedsRun tests can be found, we abort the job
hits
=
glob
.
glob
(
op
.
join
(
project_dir
,
'**'
,
'feedsRun*'
))
hits
=
glob
.
glob
(
op
.
join
(
project_dir
,
'**'
,
'feedsRun*'
))
if
len
(
hits
)
==
0
:
if
len
(
hits
)
==
0
:
print
(
f
'No feedsRun scripts found in project source repository '
print
(
f
'No feedsRun scripts found in project source repository '
f
'(
{
repo
}
:
{
rev
}
- aborting test.'
)
f
'(
{
repo
}
:
{
rev
}
- aborting test.'
)
...
@@ -80,7 +81,6 @@ def run_tests(project_dir, test_output_dir):
...
@@ -80,7 +81,6 @@ def run_tests(project_dir, test_output_dir):
commands
.
append
(
f
'export FSLDIR=
{
condaenv
}
'
)
commands
.
append
(
f
'export FSLDIR=
{
condaenv
}
'
)
commands
.
append
(
'. $FSLDIR/etc/fslconf/fsl.sh'
)
commands
.
append
(
'. $FSLDIR/etc/fslconf/fsl.sh'
)
commands
.
append
(
f
'pyfeeds run -v -k
{
cfg
}
'
commands
.
append
(
f
'pyfeeds run -v -k
{
cfg
}
'
f
'-i
{
project_dir
}
'
f
'-o
{
test_output_dir
}
'
f
'-o
{
test_output_dir
}
'
f
'
{
project_dir
}
'
)
f
'
{
project_dir
}
'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment