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
5f72cf02
Commit
5f72cf02
authored
Jun 14, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typo
parent
50c5ce48
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
23 deletions
+10
-23
erp5/tests/testERP5TestNode.py
erp5/tests/testERP5TestNode.py
+4
-1
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+1
-1
erp5/util/testnode/testnode.py
erp5/util/testnode/testnode.py
+5
-21
No files found.
erp5/tests/testERP5TestNode.py
View file @
5f72cf02
...
@@ -79,7 +79,9 @@ class ERP5TestNode(TestCase):
...
@@ -79,7 +79,9 @@ class ERP5TestNode(TestCase):
config
[
"system_temp_folder"
]
=
self
.
system_temp_folder
config
[
"system_temp_folder"
]
=
self
.
system_temp_folder
config
[
"computer_id"
]
=
"COMP-TEST"
config
[
"computer_id"
]
=
"COMP-TEST"
config
[
"server_url"
]
=
"http://foo.bar"
config
[
"server_url"
]
=
"http://foo.bar"
config
[
"link_to_testsuite_directory"
]
=
self
.
link_to_testsuite_directory
config
[
"httpd_ip"
]
=
"[1234:5678:9101:1121:3141:5161:7181:9202]"
config
[
"httpd_port2"
]
=
"9080"
return
TestNode
(
self
.
log
,
config
)
return
TestNode
(
self
.
log
,
config
)
def
getTestSuiteData
(
self
,
add_third_repository
=
False
,
reference
=
"foo"
):
def
getTestSuiteData
(
self
,
add_third_repository
=
False
,
reference
=
"foo"
):
...
@@ -832,6 +834,7 @@ branch = foo
...
@@ -832,6 +834,7 @@ branch = foo
pass
pass
def
test_scalability_as_master_11_run
(
self
,
my_test_type
=
'ScalabilityTest'
):
def
test_scalability_as_master_11_run
(
self
,
my_test_type
=
'ScalabilityTest'
):
self
.
test_11_run
(
my_test_type
,
grade
=
'master'
)
self
.
test_11_run
(
my_test_type
,
grade
=
'master'
)
# TODO : add a test with master and a launchable testsuite -> patch a lot of methods
def
test_scalability_as_slave_11_run
(
self
,
my_test_type
=
'ScalabilityTest'
):
def
test_scalability_as_slave_11_run
(
self
,
my_test_type
=
'ScalabilityTest'
):
self
.
test_11_run
(
my_test_type
,
grade
=
'slave'
)
self
.
test_11_run
(
my_test_type
,
grade
=
'slave'
)
def
test_scalability_12_spawn
(
self
,
my_test_type
=
'ScalabilityTest'
):
def
test_scalability_12_spawn
(
self
,
my_test_type
=
'ScalabilityTest'
):
...
...
erp5/util/testnode/ScalabilityTestRunner.py
View file @
5f72cf02
...
@@ -189,7 +189,7 @@ class ScalabilityTestRunner():
...
@@ -189,7 +189,7 @@ class ScalabilityTestRunner():
software_path_list
=
[]
software_path_list
=
[]
# Here ipv6 url reachable from master profile
# Here ipv6 url reachable from master profile
self
.
reachable_profile
=
os
.
path
.
join
(
self
.
reachable_profile
=
os
.
path
.
join
(
"https://"
,
self
.
testnode
[
'httpd_ip'
]
+
":"
+
self
.
testnode
[
'httpd_port2'
],
"https://"
,
self
.
testnode
.
config
[
'httpd_ip'
]
+
":"
+
self
.
testnode
.
config
[
'httpd_port2'
],
self
.
random_path
,
"software.cfg"
)
self
.
random_path
,
"software.cfg"
)
self
.
testnode
.
log
(
"Software reachable profile path is : %s "
self
.
testnode
.
log
(
"Software reachable profile path is : %s "
%
(
self
.
reachable_profile
,))
%
(
self
.
reachable_profile
,))
...
...
erp5/util/testnode/testnode.py
View file @
5f72cf02
...
@@ -308,8 +308,6 @@ branch = %(branch)s
...
@@ -308,8 +308,6 @@ branch = %(branch)s
try
:
try
:
while
True
:
while
True
:
try
:
try
:
##BLOCK OK
node_test_suite
=
None
node_test_suite
=
None
self
.
log
=
self
.
process_manager
.
log
=
self
.
testnode_log
self
.
log
=
self
.
process_manager
.
log
=
self
.
testnode_log
self
.
cleanUp
(
None
)
self
.
cleanUp
(
None
)
...
@@ -324,20 +322,15 @@ branch = %(branch)s
...
@@ -324,20 +322,15 @@ branch = %(branch)s
test_suite_data
=
testnodeUtils
.
deunicodeData
(
json
.
loads
(
test_suite_json
))
test_suite_data
=
testnodeUtils
.
deunicodeData
(
json
.
loads
(
test_suite_json
))
log
(
"Got following test suite data from master : %r"
%
\
log
(
"Got following test suite data from master : %r"
%
\
(
test_suite_data
,))
(
test_suite_data
,))
##/BLOCK OK
# TODO : implement this method for each distributor
# TODO : implement this method for each distributor
# into nexedi/master-erp5..
# into nexedi/master-erp5..
# (just UnitTestDistributor should be sufficient)
try
:
try
:
my_test_type
=
self
.
test_suite_portal
.
getTestType
()
my_test_type
=
self
.
test_suite_portal
.
getTestType
()
except
:
except
:
log
(
"testnode, error during requesting getTestType() method
\
log
(
"testnode, error during requesting getTestType() method
\
from the distributor."
)
from the distributor."
)
raise
NotImplementedError
raise
NotImplementedError
# Select runner according to the test type
# Select runner according to the test type
if
my_test_type
==
'UnitTest'
:
if
my_test_type
==
'UnitTest'
:
runner
=
UnitTestRunner
(
self
)
runner
=
UnitTestRunner
(
self
)
...
@@ -347,14 +340,12 @@ from the distributor.")
...
@@ -347,14 +340,12 @@ from the distributor.")
log
(
"testnode, Runner type not implemented."
,
my_test_type
)
log
(
"testnode, Runner type not implemented."
,
my_test_type
)
raise
NotImplementedError
raise
NotImplementedError
log
(
"Type of current test is %s"
%
(
my_test_type
,))
log
(
"Type of current test is %s"
%
(
my_test_type
,))
# master testnode gets test_suites, slaves get nothing
# master gets test_suites, slaves get nothing
runner
.
prepareSlapOSForTestNode
(
test_node_slapos
)
runner
.
prepareSlapOSForTestNode
(
test_node_slapos
)
#Clean-up test suites
#
Clean-up test suites
self
.
checkOldTestSuite
(
test_suite_data
)
self
.
checkOldTestSuite
(
test_suite_data
)
for
test_suite
in
test_suite_data
:
for
test_suite
in
test_suite_data
:
## BLOCK OK
remote_test_result_needs_cleanup
=
False
remote_test_result_needs_cleanup
=
False
node_test_suite
=
self
.
getNodeTestSuite
(
node_test_suite
=
self
.
getNodeTestSuite
(
test_suite
[
"test_suite_reference"
])
test_suite
[
"test_suite_reference"
])
...
@@ -375,25 +366,18 @@ from the distributor.")
...
@@ -375,25 +366,18 @@ from the distributor.")
node_test_suite
.
project_title
)
node_test_suite
.
project_title
)
remote_test_result_needs_cleanup
=
True
remote_test_result_needs_cleanup
=
True
log
(
"testnode, test_result : %r"
%
(
test_result
,
))
log
(
"testnode, test_result : %r"
%
(
test_result
,
))
## /BLOCK OK
if
test_result
is
not
None
:
if
test_result
is
not
None
:
## BLOCK OK
self
.
registerSuiteLog
(
test_result
,
node_test_suite
)
self
.
registerSuiteLog
(
test_result
,
node_test_suite
)
self
.
checkRevision
(
test_result
,
node_test_suite
)
self
.
checkRevision
(
test_result
,
node_test_suite
)
## /BLOCK OK
# Now prepare the installation of SlapOS and create instance
# Now prepare the installation of SlapOS and create instance
status_dict
=
runner
.
prepareSlapOSForTestSuite
(
node_test_suite
)
status_dict
=
runner
.
prepareSlapOSForTestSuite
(
node_test_suite
)
# Give some time so computer partitions may start
# Give some time so computer partitions may start
# as partitions can be of any kind we have and likely will never have
# 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 ...
# a reliable way to check if they are up or not ...
# time.sleep(20)
time
.
sleep
(
20
)
# For scalability test runTestSuite is a big part
runner
.
runTestSuite
(
node_test_suite
,
portal_url
)
runner
.
runTestSuite
(
node_test_suite
,
portal_url
)
# break the loop to get latest priorities from master
# break the loop to get latest priorities from master
break
break
self
.
cleanUp
(
test_result
)
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