Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
3eba2011
Commit
3eba2011
authored
Oct 06, 2013
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: run.py: return valid errorCode in case of the single test run
parent
d5723480
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
run.py
modules/ts/misc/run.py
+14
-6
No files found.
modules/ts/misc/run.py
View file @
3eba2011
...
@@ -7,6 +7,8 @@ from subprocess import Popen, PIPE
...
@@ -7,6 +7,8 @@ from subprocess import Popen, PIPE
hostos
=
os
.
name
# 'nt', 'posix'
hostos
=
os
.
name
# 'nt', 'posix'
hostmachine
=
platform
.
machine
()
# 'x86', 'AMD64', 'x86_64'
hostmachine
=
platform
.
machine
()
# 'x86', 'AMD64', 'x86_64'
errorCode
=
0
SIMD_DETECTION_PROGRAM
=
"""
SIMD_DETECTION_PROGRAM
=
"""
#if __SSE5__
#if __SSE5__
# error SSE5
# error SSE5
...
@@ -641,6 +643,8 @@ class TestSuite(object):
...
@@ -641,6 +643,8 @@ class TestSuite(object):
return
True
return
True
def
runTest
(
self
,
path
,
workingDir
,
_stdout
,
_stderr
,
args
=
[]):
def
runTest
(
self
,
path
,
workingDir
,
_stdout
,
_stderr
,
args
=
[]):
global
errorCode
if
self
.
error
:
if
self
.
error
:
return
return
args
=
args
[:]
args
=
args
[:]
...
@@ -759,9 +763,9 @@ class TestSuite(object):
...
@@ -759,9 +763,9 @@ class TestSuite(object):
print
>>
_stderr
,
"Run command:"
,
" "
.
join
(
cmd
)
print
>>
_stderr
,
"Run command:"
,
" "
.
join
(
cmd
)
try
:
try
:
Popen
(
cmd
,
stdout
=
_stdout
,
stderr
=
_stderr
,
cwd
=
self
.
java_test_binary_dir
+
"/.build"
)
.
wait
()
errorCode
=
Popen
(
cmd
,
stdout
=
_stdout
,
stderr
=
_stderr
,
cwd
=
self
.
java_test_binary_dir
+
"/.build"
)
.
wait
()
except
OSError
:
except
:
p
ass
p
rint
"Unexpected error:"
,
sys
.
exc_info
()[
0
]
return
None
return
None
else
:
else
:
...
@@ -777,9 +781,9 @@ class TestSuite(object):
...
@@ -777,9 +781,9 @@ class TestSuite(object):
print
>>
_stderr
,
"Run command:"
,
" "
.
join
(
cmd
)
print
>>
_stderr
,
"Run command:"
,
" "
.
join
(
cmd
)
try
:
try
:
Popen
(
cmd
,
stdout
=
_stdout
,
stderr
=
_stderr
,
cwd
=
workingDir
)
.
wait
()
errorCode
=
Popen
(
cmd
,
stdout
=
_stdout
,
stderr
=
_stderr
,
cwd
=
workingDir
)
.
wait
()
except
OSError
:
except
:
p
ass
p
rint
"Unexpected error:"
,
sys
.
exc_info
()[
0
]
# clean temporary files
# clean temporary files
if
orig_temp_path
:
if
orig_temp_path
:
...
@@ -891,3 +895,7 @@ if __name__ == "__main__":
...
@@ -891,3 +895,7 @@ if __name__ == "__main__":
if
logs
:
if
logs
:
print
>>
sys
.
stderr
,
"Collected: "
,
" "
.
join
(
logs
)
print
>>
sys
.
stderr
,
"Collected: "
,
" "
.
join
(
logs
)
if
errorCode
!=
0
:
print
"Error code: "
,
errorCode
,
(
" (0x
%
x)"
%
(
errorCode
&
0xffffffff
))
exit
(
errorCode
)
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