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
95820236
Commit
95820236
authored
1 year ago
by
Ashwin Kumar Karnad
Browse files
Options
Downloads
Patches
Plain Diff
test remove_build_log when uninstalling global packages
parent
81648694
No related branches found
No related tags found
1 merge request
!82
Remove cmd
Pipeline
#384221
failed
1 year ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_mpsd_software.py
+15
-2
15 additions, 2 deletions
tests/test_mpsd_software.py
with
15 additions
and
2 deletions
tests/test_mpsd_software.py
+
15
−
2
View file @
95820236
...
...
@@ -804,13 +804,16 @@ def test_remove_package_sets(tmp_path, simple_toolchain):
def
test_remove_global_package_sets
():
"""
Test removal of global package_sets via spack.
"""
root_dir
=
Path
(
"
/tmp/test_global_generic
"
)
release_to_test
=
"
dev-23a
"
if
not
root_dir
.
exists
():
# we need the sample spack instance with global_generic
# this is already done in test_install_environment_zlib
# so we just need to call it
test_install_environment_zlib
()
# check that zlib and zstd are installed
spack_dir
=
root_dir
/
"
dev-23a
"
/
mod
.
get_native_microarchitecture
()
/
"
spack
"
spack_dir
=
(
root_dir
/
release_to_test
/
mod
.
get_native_microarchitecture
()
/
"
spack
"
)
source_spack
=
(
f
"
export SPACK_DIR=
{
spack_dir
}
&&
"
f
'
.
{
spack_dir
/
"
share
"
/
"
spack
"
/
"
setup-env.sh
"
}
'
...
...
@@ -824,7 +827,7 @@ def test_remove_global_package_sets():
# remove global_generic
mod
.
remove_environment
(
mpsd_release
=
"
dev-23a
"
,
mpsd_release
=
release_to_test
,
root_dir
=
root_dir
,
package_sets
=
[
"
global_generic
"
],
force_remove
=
True
,
...
...
@@ -842,6 +845,16 @@ def test_remove_global_package_sets():
shell
=
True
,
check
=
True
,
)
# check that the logs directory contains a build log for remove cmd
# dev-23a_zen3_2023-08-11T15-55-54_BUILD_toolchain2_remove.log
logs_dir
=
root_dir
/
release_to_test
/
"
logs
"
# remove_build_log is the last log file in the list
remove_build_log
=
sorted
(
list
(
logs_dir
.
iterdir
()))[
-
1
]
assert
"
global_generic_remove.log
"
in
remove_build_log
.
name
with
open
(
remove_build_log
,
"
r
"
)
as
f
:
logs
=
f
.
read
()
assert
"
==> Successfully uninstalled zstd
"
in
logs
assert
"
==> Successfully uninstalled zlib
"
in
logs
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