Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mpsd-software-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
MPSD Computational Science
mpsd-software-manager
Commits
8dc2d9d1
Commit
8dc2d9d1
authored
1 year ago
by
Ashwin Kumar Karnad
Browse files
Options
Downloads
Patches
Plain Diff
fix tests
parent
de972872
No related branches found
No related tags found
1 merge request
!41
Status command
Pipeline
#370498
passed
1 year ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests.py
+13
-9
13 additions, 9 deletions
tests.py
with
13 additions
and
9 deletions
tests.py
+
13
−
9
View file @
8dc2d9d1
...
@@ -430,20 +430,24 @@ def test_environment_status(tmp_path):
...
@@ -430,20 +430,24 @@ def test_environment_status(tmp_path):
assert
toolchain_map
is
None
assert
toolchain_map
is
None
# create a fake environment
# create a fake environment
mpsd_release
=
"
dev-23a
"
mpsd_release
=
"
dev-23a
"
mpsd
_microarch
=
"
sandybridge
"
test
_microarch
=
mod
.
get_native_microarchitecture
()
expected_toochain_map
=
{
"
sandybridge
"
:
[
"
foss2021a
"
,
"
intel2021a
"
]}
expected_toochain_map
=
{
test_microarch
:
[
"
foss2021a
"
,
"
intel2021a
"
]}
for
m
psd_release
in
expected_toochain_map
.
keys
():
for
m
icroarch
in
expected_toochain_map
.
keys
():
toolchain_
files_path
=
(
toolchain_
lmod_folder
=
(
tmp_path
/
mpsd_release
/
mpsd_
microarch
/
"
lmod
"
/
"
Core
"
/
"
toolchains
"
tmp_path
/
mpsd_release
/
microarch
/
"
lmod
"
/
"
Core
"
/
"
toolchains
"
)
)
toolchain_files_path
.
mkdir
(
parents
=
True
)
toolchain_lmod_folder
.
mkdir
(
parents
=
True
)
for
toolchain
in
expected_toochain_map
[
mpsd_release
]:
spack_folder
=
tmp_path
/
mpsd_release
/
microarch
/
"
spack
"
toolchain_file
=
toolchain_files_path
/
f
"
{
toolchain
}
.lua
"
spack_folder
.
mkdir
(
parents
=
True
)
for
toolchain
in
expected_toochain_map
[
microarch
]:
toolchain_file
=
toolchain_lmod_folder
/
f
"
{
toolchain
}
.lua
"
toolchain_file
.
touch
()
toolchain_file
.
touch
()
# check that the environment status is correct
# check that the environment status is correct
toolchain_map
=
mod
.
environment_status
(
mpsd_release
,
tmp_path
)
toolchain_map
=
mod
.
environment_status
(
mpsd_release
,
tmp_path
)
assert
toolchain_map
==
expected_toochain_map
# convert each list to a set to ensure that the order doesn't matter
for
microarch
in
toolchain_map
.
keys
():
assert
set
(
toolchain_map
[
microarch
])
==
set
(
expected_toochain_map
[
microarch
])
def
test_interface
(
tmp_path
):
def
test_interface
(
tmp_path
):
...
...
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