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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
d6d75962
Commit
d6d75962
authored
May 27, 2011
by
Nicolas Delaby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catch more exceptions in order to display them into test_result_module
parent
8a402790
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
product/ERP5Type/tests/ERP5TypeTestSuite.py
product/ERP5Type/tests/ERP5TypeTestSuite.py
+12
-2
No files found.
product/ERP5Type/tests/ERP5TypeTestSuite.py
View file @
d6d75962
import
re
,
imp
,
sys
,
threading
,
os
,
shlex
,
subprocess
,
shutil
import
re
,
imp
,
sys
,
threading
,
os
,
shlex
,
subprocess
,
shutil
import
traceback
# The content of this file might be partially moved to an egg
# The content of this file might be partially moved to an egg
# in order to allows parallel tests without the code of ERP5
# in order to allows parallel tests without the code of ERP5
...
@@ -143,8 +144,17 @@ class TestSuite(object):
...
@@ -143,8 +144,17 @@ class TestSuite(object):
command
=
format_command
(
*
args
,
**
kw
)
command
=
format_command
(
*
args
,
**
kw
)
print
'
\
n
$ '
+
command
print
'
\
n
$ '
+
command
sys
.
stdout
.
flush
()
sys
.
stdout
.
flush
()
p
=
subprocess
.
Popen
(
args
,
stdin
=
self
.
stdin
,
stdout
=
subprocess
.
PIPE
,
try
:
stderr
=
subprocess
.
PIPE
,
env
=
env
)
p
=
subprocess
.
Popen
(
args
,
stdin
=
self
.
stdin
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
env
=
env
)
except
Exception
:
# Catch any exception here, to warn user instead of beeing silent,
# by generating fake error result
result
=
dict
(
status_code
=-
1
,
command
=
command
,
stderr
=
traceback
.
format_exc
(),
stdout
=
''
)
raise
SubprocessError
(
result
)
if
self
.
realtime_output
:
if
self
.
realtime_output
:
stdout
,
stderr
=
subprocess_capture
(
p
,
quiet
)
stdout
,
stderr
=
subprocess_capture
(
p
,
quiet
)
else
:
else
:
...
...
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