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
631e2eea
Commit
631e2eea
authored
1 year ago
by
Ashwin Kumar Karnad
Browse files
Options
Downloads
Patches
Plain Diff
Handle and test wrong mpsd_release
parent
38700575
No related branches found
No related tags found
2 merge requests
!19
Move linux-debian11 into main
,
!1
Resolve "First draft for user interface for top level install command"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
install-mpsd-software-environment.py
+3
-1
3 additions, 1 deletion
install-mpsd-software-environment.py
tests.py
+10
-2
10 additions, 2 deletions
tests.py
with
13 additions
and
3 deletions
install-mpsd-software-environment.py
+
3
−
1
View file @
631e2eea
...
...
@@ -92,7 +92,9 @@ def create_dir_structure(mpsd_release, script_dir):
with
os_chdir
(
"
spack-environments
"
):
# Git fetch and checkout the release branch and git pull to be sure that the resulting repo is up to date
subprocess
.
run
([
"
git
"
,
"
fetch
"
,
"
--all
"
])
subprocess
.
run
([
"
git
"
,
"
checkout
"
,
mpsd_release
])
checkout_result
=
subprocess
.
run
([
"
git
"
,
"
checkout
"
,
mpsd_release
])
if
checkout_result
.
returncode
!=
0
:
raise
Exception
(
"
Release branch does not exist in spack-environment repo
\n
. Check for typos.
"
)
subprocess
.
run
([
"
git
"
,
"
pull
"
])
...
...
This diff is collapsed.
Click to expand it.
tests.py
+
10
−
2
View file @
631e2eea
...
...
@@ -83,10 +83,18 @@ def test_setup_log_cmd(tmp_path):
def
test_install_environment
(
tmp_path
):
# Expect an
d
Exception when wrong toolchains are provided
# Expect an Exception when wrong toolchains are provided
with
pytest
.
raises
(
Exception
):
mod
.
install_environment
(
mpsd_release
=
"
dev-23a
"
,
toolchains
=
[
"
wrong-toolchain
"
],
script_dir
=
(
tmp_path
),
)
\ No newline at end of file
)
# Expect an Exception when wrong mpsd_release is provided
with
pytest
.
raises
(
Exception
):
mod
.
install_environment
(
mpsd_release
=
"
wrong-mpsd-release
"
,
toolchains
=
[
"
foss2021a-mpi
"
],
script_dir
=
(
tmp_path
),
)
\ No newline at end of file
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