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
Levin Zimmermann
neoppod
Commits
ea808106
Commit
ea808106
authored
Sep 25, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8bf4418c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
+16
-14
go/neo/t/nxd/nxdtest
go/neo/t/nxd/nxdtest
+16
-14
No files found.
go/neo/t/nxd/nxdtest
View file @
ea808106
#!/usr/bin/env python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# Copyright (C) 2018 Nexedi SA and Contributors.
# Copyright (C) 2018
-2020
Nexedi SA and Contributors.
#
#
# This program is free software: you can Use, Study, Modify and Redistribute
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# it under the terms of the GNU General Public License version 3, or (at your
...
@@ -17,9 +17,9 @@
...
@@ -17,9 +17,9 @@
#
#
# See COPYING file for full licensing terms.
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
# See https://www.nexedi.com/licensing for rationale and options.
"""
runTestSuite - run neotes
t under Nexedi testing infrastructure.
"""
nxdtest - test a projec
t under Nexedi testing infrastructure.
neotest must be on $PATH.
XXX more docs
"""
"""
# XXX split -> nxdtest + NXDTestfile (name=?)
# XXX split -> nxdtest + NXDTestfile (name=?)
...
@@ -82,6 +82,15 @@ def main():
...
@@ -82,6 +82,15 @@ def main():
argv
=
[
'neotest'
,
testname
]
argv
=
[
'neotest'
,
testname
]
tstart
=
time
()
tstart
=
time
()
# default status dict
status
=
{
'test_count'
:
1
,
'error_count'
:
0
,
'failure_count'
:
0
,
'skip_count'
:
0
,
#html_test_result
}
try
:
try
:
# NOTE runs with unchanged cwd. Instance wrapper cares to set cwd before running us.
# NOTE runs with unchanged cwd. Instance wrapper cares to set cwd before running us.
# bufsize=1 means 'line buffered'
# bufsize=1 means 'line buffered'
...
@@ -89,7 +98,7 @@ def main():
...
@@ -89,7 +98,7 @@ def main():
except
:
except
:
stdout
,
stderr
=
''
,
traceback
.
format_exc
()
stdout
,
stderr
=
''
,
traceback
.
format_exc
()
sys
.
stderr
.
write
(
stderr
)
sys
.
stderr
.
write
(
stderr
)
ok
=
False
status
[
'error_count'
]
+=
1
else
:
else
:
# tee >stdout,stderr so we can also see in testnode logs
# tee >stdout,stderr so we can also see in testnode logs
# (explicit teeing instead of p.communicate() to be able to see incremental progress)
# (explicit teeing instead of p.communicate() to be able to see incremental progress)
...
@@ -103,16 +112,9 @@ def main():
...
@@ -103,16 +112,9 @@ def main():
tout
.
join
();
stdout
=
''
.
join
(
buf_out
)
tout
.
join
();
stdout
=
''
.
join
(
buf_out
)
terr
.
join
();
stderr
=
''
.
join
(
buf_err
)
terr
.
join
();
stderr
=
''
.
join
(
buf_err
)
p
.
wait
()
p
.
wait
()
ok
=
(
p
.
returncode
==
0
)
# default status dict just by exit code
if
p
.
returncode
!=
0
:
status
=
{
status
[
'error_count'
]
+=
1
'test_count'
:
1
,
'error_count'
:
(
0
if
ok
else
1
),
'failure_count'
:
0
,
'skip_count'
:
0
,
#html_test_result
}
# postprocess output, if we can
# postprocess output, if we can
summaryf
=
globals
().
get
(
testname
.
replace
(
'-'
,
'_'
)
+
'_summary'
)
summaryf
=
globals
().
get
(
testname
.
replace
(
'-'
,
'_'
)
+
'_summary'
)
...
@@ -140,7 +142,7 @@ def main():
...
@@ -140,7 +142,7 @@ def main():
stdout
=
stdout
,
stdout
=
stdout
,
stderr
=
stderr
,
stderr
=
stderr
,
**
status
**
status
# FIXME popen fail -> status is unbound
)
)
# tee, similar to tee(1) utility, copies data from fin to fout appending them to buf.
# tee, similar to tee(1) utility, copies data from fin to fout appending them to buf.
...
...
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