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
Mikolaï Krol
erp5
Commits
146b188a
Commit
146b188a
authored
Jun 05, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save before changements
parent
89d983cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
9 deletions
+15
-9
erp5/util/testnode/UnitTestRunner.py
erp5/util/testnode/UnitTestRunner.py
+6
-2
erp5/util/testnode/__init__.py
erp5/util/testnode/__init__.py
+1
-4
erp5/util/testnode/testnode.py
erp5/util/testnode/testnode.py
+8
-3
No files found.
erp5/util/testnode/UnitTestRunner.py
View file @
146b188a
...
...
@@ -39,13 +39,17 @@ import string
import
random
from
ProcessManager
import
SubprocessError
,
ProcessManager
,
CancellationError
from
subprocess
import
CalledProcessError
from
NodeTestSuite
import
SlapOSInstance
from
Updater
import
Updater
from
erp5.util
import
taskdistribution
class
UnitTestRunner
(
object
):
def
__init__
(
self
,
testnode
):
pass
self
.
testnode
=
testnode
self
.
test_node_slapos
=
SlapOSInstance
()
self
.
test_node_slapos
.
edit
(
working_directory
=
self
.
testnode
.
config
[
'slapos_directory'
])
...
...
erp5/util/testnode/__init__.py
View file @
146b188a
...
...
@@ -107,9 +107,6 @@ def main(*args):
if
'software_list'
in
config
.
sections
():
CONFIG
[
'software_list'
]
=
filter
(
None
,
config
.
get
(
"software_list"
,
"path_list"
).
split
(
","
))
# Here : can we know the test type (scalability or unittest) ?
# If it's possible, :
# testnode = Testnode / ScalabilityTestNode
testnode
=
TestNode
(
logger
.
info
,
CONFIG
)
testnode
.
run
()
erp5/util/testnode/testnode.py
View file @
146b188a
...
...
@@ -471,8 +471,9 @@ class TestNode(BaseTestNode):
previous_revision_dict
=
{}
revision_dict
=
{}
test_result
=
None
test_node_slapos
=
SlapOSInstance
()
test_node_slapos
.
edit
(
working_directory
=
self
.
config
[
'slapos_directory'
])
runner
=
UnitTestRunner
(
self
)
try
:
while
True
:
try
:
...
...
@@ -481,7 +482,6 @@ class TestNode(BaseTestNode):
self
.
cleanUp
(
None
)
remote_test_result_needs_cleanup
=
False
begin
=
time
.
time
()
self
.
prepareSlapOSForTestNode
(
test_node_slapos
)
portal_url
=
config
[
'test_suite_master_url'
]
portal
=
taskdistribution
.
TaskDistributionTool
(
portal_url
,
logger
=
DummyLogger
(
log
))
test_suite_portal
=
taskdistribution
.
TaskDistributor
(
portal_url
,
logger
=
DummyLogger
(
log
))
...
...
@@ -489,6 +489,11 @@ class TestNode(BaseTestNode):
test_suite_data
=
deunicodeData
(
json
.
loads
(
test_suite_json
))
log
(
"Got following test suite data from master : %r"
%
\
(
test_suite_data
,))
# Here we know what we are (sclability or unit test)
# change the line below to runner.prepareSlapOSForTestNode ..
self
.
prepareSlapOSForTestNode
(
runner
.
test_node_slapos
)
#Clean-up test suites
self
.
checkOldTestSuite
(
test_suite_data
)
for
test_suite
in
test_suite_data
:
...
...
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