Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
Xavier Thompson
neoppod
Commits
9eb06ff1
Commit
9eb06ff1
authored
Feb 02, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qa: new --log runner option
parent
42fd89bc
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
5 deletions
+8
-5
neo/scripts/runner.py
neo/scripts/runner.py
+7
-0
neo/tests/__init__.py
neo/tests/__init__.py
+0
-1
neo/tests/benchmark.py
neo/tests/benchmark.py
+0
-3
neo/tests/threaded/__init__.py
neo/tests/threaded/__init__.py
+1
-1
No files found.
neo/scripts/runner.py
View file @
9eb06ff1
...
...
@@ -33,6 +33,7 @@ if filter(re.compile(r'--coverage$|-\w*c').match, sys.argv[1:]):
coverage.neotestrunner = []
coverage.start()
from neo.lib import logging
from neo.tests import getTempDirectory, NeoTestBase, Patch, \
__dict__ as neo_tests__dict__
from neo.tests.benchmark import BenchmarkRunner
...
...
@@ -234,6 +235,9 @@ class TestRunner(BenchmarkRunner):
parser.add_option('
-
C
', '
--
cov
-
unit
', action='
store_true
',
help='
Same
as
-
c
but
output
1
file
per
test
,
'
'
in
the
temporary
test
directory
')
parser.add_option('
-
L
', '
--
log
', action='
store_true
',
help='
Force
all
logs
to
be
emitted
immediately
and
keep
'
'
packet
body
in
logs
of
successful
threaded
tests
')
parser.add_option('
-
l
', '
--
loop
', type='
int
', default=1,
help='
Repeat
tests
several
times
')
parser.add_option('
-
f', '
--
functional
', action='
store_true
',
...
...
@@ -278,6 +282,7 @@ Environment Variables:
sys.exit('
Nothing
to
run
,
please
give
one
of
-
f
,
-
u
,
-
z
')
options.unit = options.functional = options.zodb = True
return dict(
log = options.log,
loop = options.loop,
unit = options.unit,
functional = options.functional,
...
...
@@ -290,6 +295,8 @@ Environment Variables:
def start(self):
config = self._config
logging.backlog(max_packet=1<<20,
**({'
max_size
': None} if config.log else {}))
only = config.only
# run requested tests
runner = NeoTestRunner(config.title or '
Neo
', config.verbosity)
...
...
neo/tests/__init__.py
View file @
9eb06ff1
...
...
@@ -74,7 +74,6 @@ SSL = os.path.dirname(__file__) + os.sep
SSL
=
SSL
+
"ca.crt"
,
SSL
+
"node.crt"
,
SSL
+
"node.key"
logging
.
default_root_handler
.
handle
=
lambda
record
:
None
logging
.
backlog
(
None
,
1
<<
20
)
debug
.
register
()
# prevent "signal only works in main thread" errors in subprocesses
...
...
neo/tests/benchmark.py
View file @
9eb06ff1
...
...
@@ -9,9 +9,6 @@ from email.mime.text import MIMEText
MAIL_SERVER
=
'127.0.0.1:25'
from
neo.lib
import
logging
logging
.
backlog
()
class
AttributeDict
(
dict
):
def
__getattr__
(
self
,
item
):
...
...
neo/tests/threaded/__init__.py
View file @
9eb06ff1
...
...
@@ -927,7 +927,7 @@ class NEOThreadedTest(NeoTestBase):
def
_tearDown
(
self
,
success
):
super
(
NEOThreadedTest
,
self
).
_tearDown
(
success
)
ServerNode
.
resetPorts
()
if
success
:
if
success
and
logging
.
_max_size
is
not
None
:
with
logging
as
db
:
db
.
execute
(
"UPDATE packet SET body=NULL"
)
db
.
execute
(
"VACUUM"
)
...
...
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