Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lu Xu
slapos.core
Commits
ec94994c
Commit
ec94994c
authored
May 02, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing/testcase: snapshot more software files
buildout profiles and .installed.cfg, shared parts signatures
parent
6d9c9bf3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
slapos/testing/testcase.py
slapos/testing/testcase.py
+18
-5
No files found.
slapos/testing/testcase.py
View file @
ec94994c
...
@@ -330,14 +330,27 @@ def installSoftwareUrlList(cls, software_url_list, max_retry=2, debug=False):
...
@@ -330,14 +330,27 @@ def installSoftwareUrlList(cls, software_url_list, max_retry=2, debug=False):
This also check softwares with `checkSoftware`
This also check softwares with `checkSoftware`
"""
"""
def
_storeSoftware
Log
Snapshot
(
name
):
def
_storeSoftwareSnapshot
(
name
):
for
standalone_log
in
glob
.
glob
(
os
.
path
.
join
(
for
path
in
glob
.
glob
(
os
.
path
.
join
(
cls
.
_base_directory
,
cls
.
_base_directory
,
'var'
,
'var'
,
'log'
,
'log'
,
'*'
,
'*'
,
))
+
glob
.
glob
(
os
.
path
.
join
(
cls
.
slap
.
software_directory
,
'*'
,
'*.cfg'
,
))
+
glob
.
glob
(
os
.
path
.
join
(
cls
.
slap
.
software_directory
,
'*'
,
'.installed.cfg'
,
))
+
glob
.
glob
(
os
.
path
.
join
(
cls
.
slap
.
shared_directory
,
'*'
,
'*'
,
'.slapos.recipe.cmmi.signature'
,
)):
)):
cls
.
_copySnapshot
(
standalone_log
,
name
)
cls
.
_copySnapshot
(
path
,
name
)
try
:
try
:
cls
.
logger
.
debug
(
"Starting"
)
cls
.
logger
.
debug
(
"Starting"
)
...
@@ -347,7 +360,7 @@ def installSoftwareUrlList(cls, software_url_list, max_retry=2, debug=False):
...
@@ -347,7 +360,7 @@ def installSoftwareUrlList(cls, software_url_list, max_retry=2, debug=False):
cls
.
slap
.
supply
(
software_url
)
cls
.
slap
.
supply
(
software_url
)
cls
.
logger
.
debug
(
"Waiting for slapos node software to build"
)
cls
.
logger
.
debug
(
"Waiting for slapos node software to build"
)
cls
.
slap
.
waitForSoftware
(
max_retry
=
max_retry
,
debug
=
debug
)
cls
.
slap
.
waitForSoftware
(
max_retry
=
max_retry
,
debug
=
debug
)
_storeSoftware
Log
Snapshot
(
'setupModule'
)
_storeSoftwareSnapshot
(
'setupModule'
)
for
software_url
in
software_url_list
:
for
software_url
in
software_url_list
:
checkSoftware
(
cls
.
slap
,
software_url
)
checkSoftware
(
cls
.
slap
,
software_url
)
except
BaseException
as
e
:
except
BaseException
as
e
:
...
@@ -361,7 +374,7 @@ def installSoftwareUrlList(cls, software_url_list, max_retry=2, debug=False):
...
@@ -361,7 +374,7 @@ def installSoftwareUrlList(cls, software_url_list, max_retry=2, debug=False):
cls
.
slap
.
waitForSoftware
(
max_retry
=
max_retry
,
debug
=
debug
)
cls
.
slap
.
waitForSoftware
(
max_retry
=
max_retry
,
debug
=
debug
)
except
BaseException
:
except
BaseException
:
cls
.
logger
.
exception
(
"Error removing software"
)
cls
.
logger
.
exception
(
"Error removing software"
)
_storeSoftware
Log
Snapshot
(
'setupModule removing software'
)
_storeSoftwareSnapshot
(
'setupModule removing software'
)
cls
.
_cleanup
(
'setupModule'
)
cls
.
_cleanup
(
'setupModule'
)
raise
e
raise
e
...
...
Write
Preview
Markdown
is supported
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