Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
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
Show 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
# -*- 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
# it under the terms of the GNU General Public License version 3, or (at your
...
...
@@ -17,9 +17,9 @@
#
# See COPYING file for full licensing terms.
# 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=?)
...
...
@@ -82,6 +82,15 @@ def main():
argv
=
[
'neotest'
,
testname
]
tstart
=
time
()
# default status dict
status
=
{
'test_count'
:
1
,
'error_count'
:
0
,
'failure_count'
:
0
,
'skip_count'
:
0
,
#html_test_result
}
try
:
# NOTE runs with unchanged cwd. Instance wrapper cares to set cwd before running us.
# bufsize=1 means 'line buffered'
...
...
@@ -89,7 +98,7 @@ def main():
except
:
stdout
,
stderr
=
''
,
traceback
.
format_exc
()
sys
.
stderr
.
write
(
stderr
)
ok
=
False
status
[
'error_count'
]
+=
1
else
:
# tee >stdout,stderr so we can also see in testnode logs
# (explicit teeing instead of p.communicate() to be able to see incremental progress)
...
...
@@ -103,16 +112,9 @@ def main():
tout
.
join
();
stdout
=
''
.
join
(
buf_out
)
terr
.
join
();
stderr
=
''
.
join
(
buf_err
)
p
.
wait
()
ok
=
(
p
.
returncode
==
0
)
# default status dict just by exit code
status
=
{
'test_count'
:
1
,
'error_count'
:
(
0
if
ok
else
1
),
'failure_count'
:
0
,
'skip_count'
:
0
,
#html_test_result
}
if
p
.
returncode
!=
0
:
status
[
'error_count'
]
+=
1
# postprocess output, if we can
summaryf
=
globals
().
get
(
testname
.
replace
(
'-'
,
'_'
)
+
'_summary'
)
...
...
@@ -140,7 +142,7 @@ def main():
stdout
=
stdout
,
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.
...
...
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