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
143
Merge Requests
143
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
1108dad6
Commit
1108dad6
authored
Jun 13, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction of test log + FIX one test
parent
0f337070
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
erp5/tests/testERP5TestNode.py
erp5/tests/testERP5TestNode.py
+21
-1
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+2
-0
No files found.
erp5/tests/testERP5TestNode.py
View file @
1108dad6
...
...
@@ -47,7 +47,7 @@ class ERP5TestNode(TestCase):
os
.
mkdir
(
self
.
remote_repository2
)
def
log
(
*
args
,
**
kw
):
for
arg
in
args
:
print
"TESTNODE LOG : %r
"
%
(
arg
,
)
print
"TESTNODE LOG : %r
, %r"
%
(
arg
,
kw
)
self
.
log
=
log
def
returnGoodClassRunner
(
self
,
test_type
):
...
...
@@ -597,8 +597,17 @@ branch = foo
def
test_15_suite_log_directory
(
self
,
my_test_type
=
'UnitTest'
):
def
doNothing
(
self
,
*
args
,
**
kw
):
pass
# Used in case of 'ScalabilityTest'
def
patch_getTestType
(
self
,
*
args
,
**
kw
):
return
my_test_type
def
patch_getSlaposAccountKey
(
self
,
*
args
,
**
kw
):
return
"key"
def
patch_getSlaposAccountCertificate
(
self
,
*
args
,
**
kw
):
return
"key"
def
patch_generateConfiguration
(
self
,
*
args
,
**
kw
):
return
'{"configuration_list": [], "involved_nodes_computer_guid"
\
: [], "error_message": "No error.", "launcher_nodes_computer_guid": {},
\
"launchable": false}'
test_self
=
self
test_result_path_root
=
os
.
path
.
join
(
test_self
.
_temp_dir
,
'test/results'
)
os
.
makedirs
(
test_result_path_root
)
...
...
@@ -644,6 +653,13 @@ branch = foo
original_sleep
=
time
.
sleep
time
.
sleep
=
doNothing
self
.
generateTestRepositoryList
()
if
my_test_type
==
"ScalabilityTest"
:
original_getSlaposAccountKey
=
TaskDistributor
.
getSlaposAccountKey
original_getSlaposAccountCertificate
=
TaskDistributor
.
getSlaposAccountCertificate
original_generateConfiguration
=
TaskDistributor
.
generateConfiguration
TaskDistributor
.
getSlaposAccountKey
=
patch_getSlaposAccountKey
TaskDistributor
.
getSlaposAccountCertificate
=
patch_getSlaposAccountCertificate
TaskDistributor
.
generateConfiguration
=
patch_generateConfiguration
original_startTestSuite
=
TaskDistributor
.
startTestSuite
original_subscribeNode
=
TaskDistributor
.
subscribeNode
original_getTestType
=
TaskDistributor
.
getTestType
...
...
@@ -664,6 +680,10 @@ branch = foo
checkTestSuite
(
test_node
)
time
.
sleep
=
original_sleep
# Restore old class methods
if
my_test_type
==
"ScalabilityTest"
:
TaskDistributor
.
getSlaposAccountKey
=
original_getSlaposAccountKey
TaskDistributor
.
getSlaposAccountCertificate
=
original_getSlaposAccountCertificate
TaskDistributor
.
generateConfiguration
=
original_generateConfiguration
TaskDistributor
.
startTestSuite
=
original_startTestSuite
TaskDistributionTool
.
createTestResult
=
original_createTestResult
TaskDistributionTool
.
subscribeNode
=
original_subscribeNode
...
...
erp5/util/testnode/ScalabilityTestRunner.py
View file @
1108dad6
...
...
@@ -101,6 +101,7 @@ class ScalabilityTestRunner():
signal
.
signal
(
signal
.
SIGINT
,
self
.
_getSignal
)
def
_comeBackFromDummySlapOS
(
self
):
print
"Dummy slapOS answer disabled, don't press crtl+c anymore."
# use SIG_USR (kill)
signal
.
signal
(
signal
.
SIGINT
,
signal
.
SIG_DFL
)
def
simulateSlapOSAnswer
(
self
):
if
len
(
self
.
last_slapos_answer
)
==
0
:
...
...
@@ -184,6 +185,7 @@ class ScalabilityTestRunner():
self
.
_comeBackFromDummySlapOS
()
if
self
.
remainSoftwareToInstall
()
:
return
{
'status_code'
:
1
}
self
.
testnode
.
log
(
"Softwares installed"
)
return
{
'status_code'
:
0
}
def
_cleanUpNodesInformation
(
self
):
...
...
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