Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyfeeds-tests
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
pyfeeds-tests
Commits
94a159f5
Commit
94a159f5
authored
1 year ago
by
Paul McCarthy
Committed by
Matthew Webster
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
TEST: MAke sure build env is activated
parent
0a057f31
No related branches found
No related tags found
1 merge request
!57
TEST: Test fslStartup logic
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
unit_tests/utils/feedsRun.fslStartup
+12
-10
12 additions, 10 deletions
unit_tests/utils/feedsRun.fslStartup
with
12 additions
and
10 deletions
unit_tests/utils/feedsRun.fslStartup
+
12
−
10
View file @
94a159f5
...
@@ -6,20 +6,19 @@ import tempfile
...
@@ -6,20 +6,19 @@ import tempfile
import
subprocess
as
sp
import
subprocess
as
sp
def
run
(
cmd
,
ompthreads
=
None
,
blasthreads
=
None
,
fslskipglobal
=
None
,
keepenv
=
False
):
def
run
(
cmd
,
ompthreads
=
None
,
blasthreads
=
None
,
fslskipglobal
=
None
):
env
=
os
.
environ
.
copy
()
env
=
os
.
environ
.
copy
()
if
not
keepenv
:
blacklist
=
[
'
OMP
'
,
'
GOTO
'
,
'
BLAS
'
,
'
FSL
'
]
blacklist
=
[
'
OMP
'
,
'
GOTO
'
,
'
BLAS
'
,
'
FSL
'
]
for
varname
in
list
(
env
.
keys
()):
for
varname
in
list
(
env
.
keys
()):
if
any
(
b
in
varname
for
b
in
blacklist
):
if
any
(
b
in
varname
for
b
in
blacklist
):
env
.
pop
(
varname
)
env
.
pop
(
varname
)
if
ompthreads
is
not
None
:
env
[
'
OMP_NUM_THREADS
'
]
=
str
(
ompthreads
)
if
ompthreads
is
not
None
:
env
[
'
OMP_NUM_THREADS
'
]
=
str
(
ompthreads
)
if
blasthreads
is
not
None
:
env
[
'
BLAS_NUM_THREADS
'
]
=
str
(
blasthreads
)
if
blasthreads
is
not
None
:
env
[
'
BLAS_NUM_THREADS
'
]
=
str
(
blasthreads
)
if
fslskipglobal
is
not
None
:
env
[
'
FSL_SKIP_GLOBAL
'
]
=
str
(
fslskipglobal
)
if
fslskipglobal
is
not
None
:
env
[
'
FSL_SKIP_GLOBAL
'
]
=
str
(
fslskipglobal
)
result
=
sp
.
run
(
shlex
.
split
(
cmd
),
check
=
True
,
text
=
True
,
result
=
sp
.
run
(
shlex
.
split
(
cmd
),
check
=
True
,
text
=
True
,
stdout
=
sp
.
PIPE
,
stderr
=
sp
.
STDOUT
,
env
=
env
)
stdout
=
sp
.
PIPE
,
stderr
=
sp
.
STDOUT
,
env
=
env
)
...
@@ -33,7 +32,10 @@ def run(cmd, ompthreads=None, blasthreads=None, fslskipglobal=None, keepenv=Fals
...
@@ -33,7 +32,10 @@ def run(cmd, ompthreads=None, blasthreads=None, fslskipglobal=None, keepenv=Fals
def
main
():
def
main
():
run
(
'
make
'
,
keepenv
=
True
)
buildcmds
=
[
'
source $FSLDIR/bin/activate $FSLDIR
'
,
'
source $FSLDIR/etc/fslconf/fsl-devel.sh
'
,
'
make
'
]
sp
.
run
(
'
;
'
.
join
(
buildcmds
),
check
=
True
,
shell
=
True
)
# Default behaviour should be: OMP multi-threaded, BLAS single threaded.
# Default behaviour should be: OMP multi-threaded, BLAS single threaded.
assert
run
(
'
./test_fslStartup
'
,
8
,
8
)
==
'
8 1 8
'
assert
run
(
'
./test_fslStartup
'
,
8
,
8
)
==
'
8 1 8
'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment