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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
erp5
Commits
8947a112
Commit
8947a112
authored
Aug 07, 2014
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5.util: Move dealShebang into Utils
In this way we don't have to duplicate the method everywhere.
parent
2c789110
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
erp5/util/testnode/UnitTestRunner.py
erp5/util/testnode/UnitTestRunner.py
+2
-1
erp5/util/testnode/Utils.py
erp5/util/testnode/Utils.py
+8
-1
erp5/util/testnode/testnode.py
erp5/util/testnode/testnode.py
+0
-7
No files found.
erp5/util/testnode/UnitTestRunner.py
View file @
8947a112
...
@@ -41,6 +41,7 @@ from ProcessManager import SubprocessError, ProcessManager, CancellationError
...
@@ -41,6 +41,7 @@ from ProcessManager import SubprocessError, ProcessManager, CancellationError
from
subprocess
import
CalledProcessError
from
subprocess
import
CalledProcessError
from
NodeTestSuite
import
SlapOSInstance
from
NodeTestSuite
import
SlapOSInstance
from
Updater
import
Updater
from
Updater
import
Updater
from
Utils
import
dealShebang
from
erp5.util
import
taskdistribution
from
erp5.util
import
taskdistribution
class
UnitTestRunner
():
class
UnitTestRunner
():
...
@@ -130,7 +131,7 @@ class UnitTestRunner():
...
@@ -130,7 +131,7 @@ class UnitTestRunner():
run_test_suite_path
=
run_test_suite_path_list
[
0
]
run_test_suite_path
=
run_test_suite_path_list
[
0
]
run_test_suite_revision
=
node_test_suite
.
revision
run_test_suite_revision
=
node_test_suite
.
revision
# Deal with Shebang size limitation
# Deal with Shebang size limitation
invocation_list
=
self
.
testnode
.
_
dealShebang
(
run_test_suite_path
)
invocation_list
=
dealShebang
(
run_test_suite_path
)
invocation_list
.
extend
([
run_test_suite_path
,
invocation_list
.
extend
([
run_test_suite_path
,
'--test_suite'
,
node_test_suite
.
test_suite
,
'--test_suite'
,
node_test_suite
.
test_suite
,
'--revision'
,
node_test_suite
.
revision
,
'--revision'
,
node_test_suite
.
revision
,
...
...
erp5/util/testnode/Utils.py
View file @
8947a112
...
@@ -20,3 +20,10 @@ def deunicodeData(data):
...
@@ -20,3 +20,10 @@ def deunicodeData(data):
else
:
else
:
new_data
=
data
new_data
=
data
return
new_data
return
new_data
def
dealShebang
(
run_test_suite_path
):
line
=
open
(
run_test_suite_path
,
'r'
).
readline
()
invocation_list
=
[]
if
line
[:
2
]
==
'#!'
:
invocation_list
=
line
[
2
:].
split
()
return
invocation_list
erp5/util/testnode/testnode.py
View file @
8947a112
...
@@ -111,13 +111,6 @@ class TestNode(object):
...
@@ -111,13 +111,6 @@ class TestNode(object):
if
self
.
node_test_suite_dict
.
has_key
(
reference
):
if
self
.
node_test_suite_dict
.
has_key
(
reference
):
self
.
node_test_suite_dict
.
pop
(
reference
)
self
.
node_test_suite_dict
.
pop
(
reference
)
def
_dealShebang
(
self
,
run_test_suite_path
):
line
=
open
(
run_test_suite_path
,
'r'
).
readline
()
invocation_list
=
[]
if
line
[:
2
]
==
'#!'
:
invocation_list
=
line
[
2
:].
split
()
return
invocation_list
def
constructProfile
(
self
,
node_test_suite
,
test_type
,
use_relative_path
=
False
):
def
constructProfile
(
self
,
node_test_suite
,
test_type
,
use_relative_path
=
False
):
config
=
self
.
config
config
=
self
.
config
profile_content
=
''
profile_content
=
''
...
...
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