Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
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
Eteri
erp5_fork
Commits
ee12673f
Commit
ee12673f
authored
Sep 10, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testnode: Fail test when error during SR install/runing test
parent
a31d90bb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
12 deletions
+23
-12
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+4
-6
erp5/util/testnode/testnode.py
erp5/util/testnode/testnode.py
+19
-6
No files found.
erp5/util/testnode/ScalabilityTestRunner.py
View file @
ee12673f
...
...
@@ -384,7 +384,7 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
node_test_suite
.
project_title
)
count
=
0
error
=
None
error
_message
=
None
# Each cluster configuration are tested
for
configuration
in
configuration_list
:
...
...
@@ -419,7 +419,6 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
#
if
test_result_line_proxy
==
None
:
error_message
=
"Test case already tested."
error
=
ValueError
(
error_message
)
break
self
.
log
(
"Test for count : %d is in a running state."
%
count
)
...
...
@@ -435,7 +434,6 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
if
test_result_line_proxy
.
isTestCaseAlive
():
error_message
=
"Test case during for %s seconds, too long. (max: %s seconds). Test failure."
\
%
(
str
(
time
.
time
()
-
test_case_start_time
),
MAX_TEST_CASE_TIME
)
error
=
ValueError
(
error_message
)
test_result_proxy
.
reportFailure
(
stdout
=
error_message
)
break
...
...
@@ -446,7 +444,6 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
break
# Cancelled or in an undeterminate state.
error_message
=
"Test cancelled or undeterminate state."
error
=
ValueError
(
error_message
)
break
# Stop current instance
...
...
@@ -457,9 +454,10 @@ late a SlapOS (positive) answer." %(str(os.getpid()),str(os.getpid()),))
self
.
_cleanUpOldInstance
()
# If error appears then that's a test failure.
if
error
:
if
error
_message
:
test_result_proxy
.
fail
()
raise
error
self
.
log
(
"Test Failed."
)
return
{
'status_code'
:
1
,
'error_message'
:
error_message
}
# Test is finished.
self
.
log
(
"Test finished."
)
return
{
'status_code'
:
0
}
...
...
erp5/util/testnode/testnode.py
View file @
ee12673f
...
...
@@ -390,17 +390,30 @@ from the distributor.")
# Give some time so computer partitions may start
# as partitions can be of any kind we have and likely will never have
# a reliable way to check if they are up or not ...
#
time.sleep(20)
time
.
sleep
(
20
)
if
my_test_type
==
'UnitTest'
:
runner
.
runTestSuite
(
node_test_suite
,
portal_url
)
elif
my_test_type
==
'ScalabilityTest'
:
error_message
=
None
# A problem is appeared during runTestSuite
if
status_dict
[
'status_code'
]
==
1
:
error_message
=
"Software installation too long or error(s) are present during SR install."
else
:
if
status_dict
[
'status_code'
]
==
0
:
runner
.
runTestSuite
(
node_test_suite
,
portal_url
)
else
:
status_dict
=
runner
.
runTestSuite
(
node_test_suite
,
portal_url
)
# A problem is appeared during runTestSuite
if
status_dict
[
'status_code'
]
==
1
:
error_message
=
status_dict
[
'error_message'
]
# If an error is appeared
if
error_message
:
test_result
.
reportFailure
(
command
=
"runner.prepareSlapOSForTestSuite()"
,
stdout
=
"Software installation too long or error(s) are present."
stdout
=
error_message
)
self
.
log
(
error_message
)
raise
ValueError
(
error_message
)
else
:
raise
NotImplementedError
# break the loop to get latest priorities from master
break
self
.
cleanUp
(
test_result
)
...
...
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