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
e99d9417
Commit
e99d9417
authored
Sep 25, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
027e8b0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
go/neo/t/nxd/nxdtest
go/neo/t/nxd/nxdtest
+8
-7
No files found.
go/neo/t/nxd/nxdtest
View file @
e99d9417
...
...
@@ -91,7 +91,7 @@ def main():
tool
=
TaskDistributor
(
portal_url
=
args
.
master_url
,
logger
=
logger
)
test_result
=
tool
.
createTestResult
(
revision
=
args
.
revision
,
test_name_list
=
tenv
.
testv
,
test_name_list
=
[
t
.
name
for
t
in
tenv
.
testv
]
,
node_title
=
args
.
test_node_title
,
test_title
=
args
.
test_suite_title
or
args
.
test_suite
,
project_title
=
args
.
project_title
)
...
...
@@ -102,7 +102,7 @@ def main():
# master_url not provided -> run tests locally
else
:
test_result
=
LocalTestResult
(
tenv
.
testv
)
test_result
=
LocalTestResult
(
tenv
)
# make sure we get output from subprocesses without delay.
# go does not buffer stdout/stderr by default, but python does for stdout.
...
...
@@ -207,16 +207,17 @@ def tee(fin, fout, buf):
# LocalTestResult* handle tests runs, when master_url was not provided and tests are run locally.
class
LocalTestResult
:
def
__init__
(
self
,
test_name_list
):
self
.
testv
=
test_name_list
self
.
next
=
0
# testv[next] is next test to execute
def
__init__
(
self
,
tenv
):
assert
isinstance
(
tenv
,
TestEnv
)
self
.
tenv
=
tenv
self
.
next
=
0
# tenv.testv[next] is next test to execute
def
start
(
self
):
# -> test_result_line
if
self
.
next
>=
len
(
self
.
testv
):
if
self
.
next
>=
len
(
self
.
te
nv
.
te
stv
):
return
None
# all tests are done
test_result_line
=
LocalTestResultLine
()
test_result_line
.
name
=
self
.
te
stv
[
self
.
next
]
test_result_line
.
name
=
self
.
te
nv
.
testv
[
self
.
next
].
name
self
.
next
+=
1
return
test_result_line
...
...
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