Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vidjil
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1,696
Issues
1,696
List
Boards
Labels
Service Desk
Milestones
Merge Requests
89
Merge Requests
89
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vidjil
vidjil
Commits
06396924
Commit
06396924
authored
Nov 24, 2018
by
Mathieu Giraud
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-a/should-update' into 'dev'
tools/should.py: update from upstream See merge request
!366
parents
f355173e
336b8051
Pipeline
#51467
failed with stages
in 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
tools/should.py
tools/should.py
+11
-5
No files found.
tools/should.py
View file @
06396924
...
...
@@ -38,6 +38,7 @@ import os.path
from
collections
import
defaultdict
,
OrderedDict
import
xml.etree.ElementTree
as
ET
import
datetime
import
tempfile
# Make sure the output is in utf8
sys
.
stdout
=
open
(
sys
.
stdout
.
fileno
(),
mode
=
'w'
,
encoding
=
'utf8'
,
buffering
=
1
)
...
...
@@ -266,7 +267,7 @@ def pre_process(cmd):
def
populate_variables
(
var
):
'''
>>> populate_variables(['ab=cd', 'ef=xyz'])
[('$
ab', 'cd'), ('$ef', 'xyz
')]
[('$
ef', 'xyz'), ('$ab', 'cd
')]
'''
variables
=
[]
...
...
@@ -777,8 +778,10 @@ class TestSuite():
cmd
=
' ; '
.
join
(
map
(
pre_process
,
self
.
cmds
))
cmd
=
cmd_variables_cd
(
cmd
)
f_stdout
=
tempfile
.
TemporaryFile
()
f_stderr
=
tempfile
.
TemporaryFile
()
p
=
subprocess
.
Popen
([
cmd
],
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
stdout
=
f_stdout
,
stderr
=
f_stderr
,
close_fds
=
True
)
try
:
...
...
@@ -788,9 +791,12 @@ class TestSuite():
self
.
exit_code
=
None
self
.
tests
.
append
(
ExternalTestCase
(
'Exit code is %d'
%
self
.
expected_exit_code
,
SKIP
,
'timeout after %s seconds'
%
TIMEOUT
))
self
.
stdout
=
[
l
.
decode
(
errors
=
'replace'
)
for
l
in
p
.
stdout
.
readlines
()]
self
.
stderr
=
[
l
.
decode
(
errors
=
'replace'
)
for
l
in
p
.
stderr
.
readlines
()]
f_stdout
.
seek
(
0
)
f_stderr
.
seek
(
0
)
self
.
stdout
=
[
l
.
decode
(
errors
=
'replace'
)
for
l
in
f_stdout
.
readlines
()]
self
.
stderr
=
[
l
.
decode
(
errors
=
'replace'
)
for
l
in
f_stderr
.
readlines
()]
f_stdout
.
close
()
f_stderr
.
close
()
if
verbose
>
0
:
...
...
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