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
Laurent S
erp5
Commits
0389e5f5
Commit
0389e5f5
authored
Dec 18, 2012
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5testnode: runTestSuite should be launched within the test suite sub folder
parent
1f541a2d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
2 deletions
+26
-2
erp5/tests/testERP5TestNode.py
erp5/tests/testERP5TestNode.py
+18
-0
erp5/util/testnode/SlapOSControler.py
erp5/util/testnode/SlapOSControler.py
+3
-1
erp5/util/testnode/testnode.py
erp5/util/testnode/testnode.py
+5
-1
No files found.
erp5/tests/testERP5TestNode.py
View file @
0389e5f5
...
...
@@ -5,6 +5,7 @@ from erp5.util.testnode.testnode import SlapOSInstance
from
erp5.util.testnode.ProcessManager
import
ProcessManager
,
SubprocessError
from
erp5.util.testnode.SlapOSControler
import
SlapOSControler
from
erp5.util.testnode.SlapOSControler
import
createFolder
from
erp5.util.taskdistribution
import
TaskDistributor
from
erp5.util.taskdistribution
import
TaskDistributionTool
from
erp5.util.taskdistribution
import
TestResultProxy
...
...
@@ -159,6 +160,8 @@ class ERP5TestNode(TestCase):
node_test_suite
.
edit
(
working_directory
=
self
.
working_directory
)
self
.
assertEquals
(
"%s/foo"
%
self
.
working_directory
,
node_test_suite
.
working_directory
)
self
.
assertEquals
(
"%s/foo/test_suite"
%
self
.
working_directory
,
node_test_suite
.
test_suite_directory
)
def
test_03_NodeTestSuiteCheckDataAfterEdit
(
self
):
"""
...
...
@@ -476,3 +479,18 @@ branch = foo
self
.
assertEquals
([
file_name
],
os
.
listdir
(
controler
.
software_root
))
controler
.
_resetSoftware
()
self
.
assertEquals
([],
os
.
listdir
(
controler
.
software_root
))
def
test_14_createFolder
(
self
):
test_node
=
self
.
getTestNode
()
node_test_suite
=
test_node
.
getNodeTestSuite
(
'foo'
)
node_test_suite
.
edit
(
working_directory
=
self
.
working_directory
)
folder
=
node_test_suite
.
test_suite_directory
self
.
assertEquals
(
False
,
os
.
path
.
exists
(
folder
))
createFolder
(
folder
)
self
.
assertEquals
(
True
,
os
.
path
.
exists
(
folder
))
to_drop_path
=
os
.
path
.
join
(
folder
,
'drop'
)
to_drop
=
open
(
to_drop_path
,
'w'
)
to_drop
.
close
()
self
.
assertEquals
(
True
,
os
.
path
.
exists
(
to_drop_path
))
createFolder
(
folder
,
clean
=
True
)
self
.
assertEquals
(
False
,
os
.
path
.
exists
(
to_drop_path
))
erp5/util/testnode/SlapOSControler.py
View file @
0389e5f5
...
...
@@ -36,7 +36,9 @@ import glob
MAX_PARTIONS
=
10
MAX_SR_RETRIES
=
3
def
createFolder
(
folder
):
def
createFolder
(
folder
,
clean
=
False
):
if
clean
and
os
.
path
.
exists
(
folder
):
shutil
.
rmtree
(
folder
)
if
not
(
os
.
path
.
exists
(
folder
)):
os
.
mkdir
(
folder
)
...
...
erp5/util/testnode/testnode.py
View file @
0389e5f5
...
...
@@ -93,6 +93,8 @@ class NodeTestSuite(SlapOSInstance):
self
.
working_directory
=
os
.
path
.
join
(
self
.
working_directory
,
self
.
reference
)
SlapOSControler
.
createFolder
(
self
.
working_directory
)
self
.
test_suite_directory
=
os
.
path
.
join
(
self
.
working_directory
,
"test_suite"
)
self
.
custom_profile_path
=
os
.
path
.
join
(
self
.
working_directory
,
'software.cfg'
)
if
getattr
(
self
,
"vcs_repository_list"
,
None
)
is
not
None
:
...
...
@@ -325,8 +327,10 @@ branch = %(branch)s
# From this point, test runner becomes responsible for updating test
# result. We only do cleanup if the test runner itself is not able
# to run.
SlapOSControler
.
createFolder
(
node_test_suite
.
test_suite_directory
,
clean
=
True
)
self
.
process_manager
.
spawn
(
*
invocation_list
,
cwd
=
config
[
'test_suite_directory'
]
,
cwd
=
node_test_suite
.
test_suite_directory
,
log_prefix
=
'runTestSuite'
,
get_output
=
False
)
def
cleanUp
(
self
,
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