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
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
amrani
erp5
Commits
8e41eb66
Commit
8e41eb66
authored
May 22, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LiveTest: prevent running tests twice
parent
cbfc5283
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
product/ERP5Type/Tool/ComponentTool.py
product/ERP5Type/Tool/ComponentTool.py
+22
-11
No files found.
product/ERP5Type/Tool/ComponentTool.py
View file @
8e41eb66
...
@@ -48,6 +48,7 @@ from DateTime import DateTime
...
@@ -48,6 +48,7 @@ from DateTime import DateTime
DEFAULT_TEST_TEMPLATE_COPYRIGHT
=
"Copyright (c) 2002-%s Nexedi SA and "
\
DEFAULT_TEST_TEMPLATE_COPYRIGHT
=
"Copyright (c) 2002-%s Nexedi SA and "
\
"Contributors. All Rights Reserved."
%
DateTime
().
year
()
"Contributors. All Rights Reserved."
%
DateTime
().
year
()
live_test_running
=
False
last_sync
=
-
1
last_sync
=
-
1
class
ComponentTool
(
BaseTool
):
class
ComponentTool
(
BaseTool
):
"""
"""
...
@@ -277,6 +278,12 @@ class Test(ERP5TypeTestCase):
...
@@ -277,6 +278,12 @@ class Test(ERP5TypeTestCase):
"""
"""
from
StringIO
import
StringIO
from
StringIO
import
StringIO
global
global_stream
global
global_stream
global
live_test_running
self
.
serialize
()
if
live_test_running
:
LOG
(
'ComponentTool'
,
INFO
,
'Live test already running'
)
return
''
global_stream
=
StringIO
()
global_stream
=
StringIO
()
test_list
=
self
.
_getCommaSeparatedParameterList
(
test_list
)
test_list
=
self
.
_getCommaSeparatedParameterList
(
test_list
)
if
not
test_list
:
if
not
test_list
:
...
@@ -289,6 +296,8 @@ class Test(ERP5TypeTestCase):
...
@@ -289,6 +296,8 @@ class Test(ERP5TypeTestCase):
run_only
=
self
.
_getCommaSeparatedParameterList
(
run_only
)
run_only
=
self
.
_getCommaSeparatedParameterList
(
run_only
)
verbosity
=
verbose
and
2
or
1
verbosity
=
verbose
and
2
or
1
try
:
live_test_running
=
True
from
Products.ERP5Type.tests.ERP5TypeLiveTestCase
import
runLiveTest
from
Products.ERP5Type.tests.ERP5TypeLiveTestCase
import
runLiveTest
try
:
try
:
result
=
runLiveTest
(
test_list
,
result
=
runLiveTest
(
test_list
,
...
@@ -301,6 +310,8 @@ class Test(ERP5TypeTestCase):
...
@@ -301,6 +310,8 @@ class Test(ERP5TypeTestCase):
traceback
.
print_exc
(
file
=
global_stream
)
traceback
.
print_exc
(
file
=
global_stream
)
global_stream
.
seek
(
0
)
global_stream
.
seek
(
0
)
return
global_stream
.
read
()
return
global_stream
.
read
()
finally
:
live_test_running
=
False
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'readTestOutput'
)
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'readTestOutput'
)
def
readTestOutput
(
self
,
position
=
0
):
def
readTestOutput
(
self
,
position
=
0
):
...
...
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