Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos-caddy
Commits
eafb53a1
Commit
eafb53a1
authored
Apr 19, 2017
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose and simplify configuration
parent
2343b622
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
software/cdn-test/runTestSuite.py
software/cdn-test/runTestSuite.py
+7
-5
No files found.
software/cdn-test/runTestSuite.py
View file @
eafb53a1
...
...
@@ -6,6 +6,10 @@ from time import gmtime, strftime, time, sleep
from
erp5.util
import
taskdistribution
SLEEP_TIME
=
10
TRY_AMOUNT
=
3600
class
DummyTestResult
:
class
DummyTestResultLine
:
...
...
@@ -78,14 +82,12 @@ def main():
status_dict
=
{
'command'
:
'file not found'
}
# find test result, wait 10h
sleep_time
=
10
try_amount
=
(
3600
*
10
)
/
sleep_time
try_num
=
1
start
=
time
()
result_found
=
False
while
1
:
finished
=
False
try_info
=
'Try %s/%s.'
%
(
try_num
,
try_amount
)
try_info
=
'Try %s/%s.'
%
(
try_num
,
TRY_AMOUNT
)
test_result_glob
=
os
.
path
.
join
(
args
.
partition_path
,
'..'
,
...
...
@@ -153,14 +155,14 @@ def main():
finished
=
False
if
finished
:
break
if
try_num
>=
try_amount
:
if
try_num
>=
TRY_AMOUNT
:
msg
=
try_info
+
' Time exceeded, success not found.'
print
(
msg
)
status_dict
.
setdefault
(
'stdout'
,
''
)
status_dict
[
'stdout'
]
=
'
\
n
'
.
join
([
status_dict
[
'stdout'
],
msg
])
break
try_num
+=
1
sleep
(
10
)
sleep
(
SLEEP_TIME
)
if
not
result_found
:
status_dict
[
'stdout'
]
=
try_info
+
' Test timed out and no result found.'
status_dict
.
update
(
...
...
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