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
1
Merge Requests
1
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
Boxiang Sun
erp5
Commits
b38cbd7d
Commit
b38cbd7d
authored
Jun 12, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix self.test_suite_portal?
parent
80daf097
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
12 deletions
+27
-12
erp5/tests/testERP5TestNode.py
erp5/tests/testERP5TestNode.py
+22
-7
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+5
-5
No files found.
erp5/tests/testERP5TestNode.py
View file @
b38cbd7d
...
...
@@ -459,11 +459,13 @@ branch = foo
self
.
assertRaises
(
SubprocessError
,
runner
.
prepareSlapOSForTestSuite
,
node_test_suite
)
def
test_11_run
(
self
,
my_test_type
=
'UnitTest'
):
def
test_11_run
(
self
,
my_test_type
=
'UnitTest'
,
grade
=
'master'
):
def
doNothing
(
self
,
*
args
,
**
kw
):
pass
def
patch_getTestType
(
self
):
def
patch_getTestType
(
self
,
*
args
,
**
kw
):
return
my_test_type
def
patch_isValidatedMaster
(
self
,
*
args
,
**
kw
):
return
(
grade
==
'master'
)
test_self
=
self
test_result_path_root
=
os
.
path
.
join
(
test_self
.
_temp_dir
,
'test/results'
)
os
.
makedirs
(
test_result_path_root
)
...
...
@@ -472,6 +474,11 @@ branch = foo
def
patch_startTestSuite
(
self
,
test_node_title
):
global
counter
config_list
=
[]
# Sclalability slave testnode is not directly in charge of testsuites
if
my_test_type
==
'ScalabilityTest'
and
grade
==
'slave'
:
count
+=
5
return
[]
def
_checkExistingTestSuite
(
reference_set
):
test_self
.
assertEquals
(
set
(
reference_set
),
set
(
os
.
listdir
(
test_node
.
working_directory
)))
...
...
@@ -516,12 +523,16 @@ branch = foo
self
.
generateTestRepositoryList
()
RunnerClass
=
self
.
returnGoodClassRunner
(
my_test_type
)
# Patch
if
my_test_type
==
'ScalabilityTest'
:
original_isValidatedMaster
=
TaskDistributor
.
isValidatedMaster
TaskDistributor
.
isValidatedMaster
=
patch_isValidatedMaster
original_startTestSuite
=
TaskDistributor
.
startTestSuite
original_subscribeNode
=
TaskDistributor
.
subscribeNode
original_getTestType
=
TaskDistributor
.
getTestType
TaskDistributor
.
startTestSuite
=
patch_startTestSuite
TaskDistributor
.
subscribeNode
=
doNothing
TaskDistributor
.
getTestType
=
patch_getTestType
original_createTestResult
=
TaskDistributionTool
.
createTestResult
TaskDistributionTool
.
createTestResult
=
patch_createTestResult
# TestNode
...
...
@@ -537,6 +548,8 @@ branch = foo
self
.
assertEquals
(
5
,
counter
)
time
.
sleep
=
original_sleep
# Restore old class methods
if
my_test_type
==
'ScalabilityTest'
:
TaskDistributor
.
isValidatedMaster
=
original_isValidatedMaster
TaskDistributor
.
startTestSuite
=
original_startTestSuite
TaskDistributionTool
.
createTestResult
=
original_createTestResult
TaskDistributionTool
.
subscribeNode
=
original_subscribeNode
...
...
@@ -584,7 +597,7 @@ branch = foo
def
test_15_suite_log_directory
(
self
,
my_test_type
=
'UnitTest'
):
def
doNothing
(
self
,
*
args
,
**
kw
):
pass
def
patch_getTestType
(
self
):
def
patch_getTestType
(
self
,
*
args
,
**
kw
):
return
my_test_type
test_self
=
self
test_result_path_root
=
os
.
path
.
join
(
test_self
.
_temp_dir
,
'test/results'
)
...
...
@@ -767,8 +780,10 @@ branch = foo
# This case test may be dispensable on ScalabilityTest case
# so..
pass
def
test_scalability_11_run
(
self
,
my_test_type
=
'ScalabilityTest'
):
self
.
test_11_run
(
my_test_type
)
def
test_scalability_as_master_11_run
(
self
,
my_test_type
=
'ScalabilityTest'
):
self
.
test_11_run
(
my_test_type
,
grade
=
'master'
)
def
test_scalability_as_slave_11_run
(
self
,
my_test_type
=
'ScalabilityTest'
):
self
.
test_11_run
(
my_test_type
,
grade
=
'slave'
)
def
test_scalability_12_spawn
(
self
,
my_test_type
=
'ScalabilityTest'
):
self
.
test_12_spawn
(
my_test_type
)
def
test_scalability_13_SlaposControlerResetSoftware
(
self
,
my_test_type
=
'ScalabilityTest'
):
...
...
erp5/util/testnode/ScalabilityTestRunner.py
View file @
b38cbd7d
...
...
@@ -79,11 +79,11 @@ class ScalabilityTestRunner():
We will build slapos software needed by the testnode itself,
"""
if
self
.
test_suite_portal
.
isValidatedMaster
(
self
.
config
[
'test_node_title'
]):
software_path_list
=
[]
software_path_list
.
append
(
self
.
testnode
.
config
.
get
(
"software_list"
))
for
software_path
in
software_path_list
:
for
launcher_node
in
self
.
launcher
_nodes
:
self
.
_prepareSlapOS
(
software_path
,
launcher_node
[
'computer_id'
])
#
software_path_list = []
#
software_path_list.append(self.testnode.config.get("software_list"))
#
for software_path in software_path_list:
# for launcher_node in self.????
_nodes:
#
self._prepareSlapOS(software_path, launcher_node['computer_id'])
# TODO : change the line below
return
{
'status_code'
:
0
}
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