Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
140
Merge Requests
140
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
438d1332
Commit
438d1332
authored
Dec 21, 2017
by
Julien Muchembled
Committed by
Klaus Wölfel
Aug 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testnode: use smaller random string for the log directory
parent
dbc82bf0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
erp5/tests/testERP5TestNode.py
erp5/tests/testERP5TestNode.py
+1
-1
erp5/util/testnode/NodeTestSuite.py
erp5/util/testnode/NodeTestSuite.py
+2
-2
No files found.
erp5/tests/testERP5TestNode.py
View file @
438d1332
...
...
@@ -811,7 +811,7 @@ shared = true
self
.
assertTrue
(
suite
.
suite_log_path
.
endswith
(
'suite.log'
))
m
=
re
.
match
(
'.*
\
-(.*)
\
/suite.log'
,
suite
.
suite_log_path
)
rand_part
=
m
.
groups
()[
0
]
self
.
assertEqual
(
len
(
rand_part
),
32
)
self
.
assertEqual
(
len
(
rand_part
),
10
)
self
.
assertNotIn
(
rand_part
,
rand_part_set
)
rand_part_set
.
add
(
rand_part
)
suite_log
=
open
(
suite
.
suite_log_path
,
'r'
)
...
...
erp5/util/testnode/NodeTestSuite.py
View file @
438d1332
...
...
@@ -77,11 +77,11 @@ class NodeTestSuite(SlapOSInstance):
vcs_repository
[
'repository_path'
]
=
repository_path
def
createSuiteLog
(
self
):
# /srv/slapgrid/slappartXX/srv/var/log/testnode/az-
mlksjfmlk234Sljssdflkj23KSdfslj
/suite.log
# /srv/slapgrid/slappartXX/srv/var/log/testnode/az-
D27KqX7FxJ
/suite.log
alphabets
=
string
.
digits
+
string
.
letters
while
1
:
log_folder_name
=
'%s-%s'
%
(
self
.
reference
,
''
.
join
(
random
.
choice
(
alphabets
)
for
i
in
xrange
(
32
)))
''
.
join
(
random
.
choice
(
alphabets
)
for
i
in
xrange
(
10
)))
log_folder_path
=
os
.
path
.
join
(
self
.
log_directory
,
log_folder_name
)
try
:
os
.
makedirs
(
log_folder_path
)
...
...
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