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
alecs_myu
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
Show 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):
...
@@ -47,7 +47,7 @@ class ERP5TestNode(TestCase):
os
.
mkdir
(
self
.
remote_repository2
)
os
.
mkdir
(
self
.
remote_repository2
)
def
log
(
*
args
,
**
kw
):
def
log
(
*
args
,
**
kw
):
for
arg
in
args
:
for
arg
in
args
:
print
"TESTNODE LOG : %r
"
%
(
arg
,
)
print
"TESTNODE LOG : %r
, %r"
%
(
arg
,
kw
)
self
.
log
=
log
self
.
log
=
log
def
returnGoodClassRunner
(
self
,
test_type
):
def
returnGoodClassRunner
(
self
,
test_type
):
...
@@ -597,8 +597,17 @@ branch = foo
...
@@ -597,8 +597,17 @@ branch = foo
def
test_15_suite_log_directory
(
self
,
my_test_type
=
'UnitTest'
):
def
test_15_suite_log_directory
(
self
,
my_test_type
=
'UnitTest'
):
def
doNothing
(
self
,
*
args
,
**
kw
):
def
doNothing
(
self
,
*
args
,
**
kw
):
pass
pass
# Used in case of 'ScalabilityTest'
def
patch_getTestType
(
self
,
*
args
,
**
kw
):
def
patch_getTestType
(
self
,
*
args
,
**
kw
):
return
my_test_type
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_self
=
self
test_result_path_root
=
os
.
path
.
join
(
test_self
.
_temp_dir
,
'test/results'
)
test_result_path_root
=
os
.
path
.
join
(
test_self
.
_temp_dir
,
'test/results'
)
os
.
makedirs
(
test_result_path_root
)
os
.
makedirs
(
test_result_path_root
)
...
@@ -644,6 +653,13 @@ branch = foo
...
@@ -644,6 +653,13 @@ branch = foo
original_sleep
=
time
.
sleep
original_sleep
=
time
.
sleep
time
.
sleep
=
doNothing
time
.
sleep
=
doNothing
self
.
generateTestRepositoryList
()
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_startTestSuite
=
TaskDistributor
.
startTestSuite
original_subscribeNode
=
TaskDistributor
.
subscribeNode
original_subscribeNode
=
TaskDistributor
.
subscribeNode
original_getTestType
=
TaskDistributor
.
getTestType
original_getTestType
=
TaskDistributor
.
getTestType
...
@@ -664,6 +680,10 @@ branch = foo
...
@@ -664,6 +680,10 @@ branch = foo
checkTestSuite
(
test_node
)
checkTestSuite
(
test_node
)
time
.
sleep
=
original_sleep
time
.
sleep
=
original_sleep
# Restore old class methods
# 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
TaskDistributor
.
startTestSuite
=
original_startTestSuite
TaskDistributionTool
.
createTestResult
=
original_createTestResult
TaskDistributionTool
.
createTestResult
=
original_createTestResult
TaskDistributionTool
.
subscribeNode
=
original_subscribeNode
TaskDistributionTool
.
subscribeNode
=
original_subscribeNode
...
...
erp5/util/testnode/ScalabilityTestRunner.py
View file @
1108dad6
...
@@ -101,6 +101,7 @@ class ScalabilityTestRunner():
...
@@ -101,6 +101,7 @@ class ScalabilityTestRunner():
signal
.
signal
(
signal
.
SIGINT
,
self
.
_getSignal
)
signal
.
signal
(
signal
.
SIGINT
,
self
.
_getSignal
)
def
_comeBackFromDummySlapOS
(
self
):
def
_comeBackFromDummySlapOS
(
self
):
print
"Dummy slapOS answer disabled, don't press crtl+c anymore."
print
"Dummy slapOS answer disabled, don't press crtl+c anymore."
# use SIG_USR (kill)
signal
.
signal
(
signal
.
SIGINT
,
signal
.
SIG_DFL
)
signal
.
signal
(
signal
.
SIGINT
,
signal
.
SIG_DFL
)
def
simulateSlapOSAnswer
(
self
):
def
simulateSlapOSAnswer
(
self
):
if
len
(
self
.
last_slapos_answer
)
==
0
:
if
len
(
self
.
last_slapos_answer
)
==
0
:
...
@@ -184,6 +185,7 @@ class ScalabilityTestRunner():
...
@@ -184,6 +185,7 @@ class ScalabilityTestRunner():
self
.
_comeBackFromDummySlapOS
()
self
.
_comeBackFromDummySlapOS
()
if
self
.
remainSoftwareToInstall
()
:
if
self
.
remainSoftwareToInstall
()
:
return
{
'status_code'
:
1
}
return
{
'status_code'
:
1
}
self
.
testnode
.
log
(
"Softwares installed"
)
return
{
'status_code'
:
0
}
return
{
'status_code'
:
0
}
def
_cleanUpNodesInformation
(
self
):
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