Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
common_helper_process
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-gitdep
common_helper_process
Commits
5cfc68cd
Commit
5cfc68cd
authored
Aug 29, 2017
by
Peter Weidenbach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
timeout message added
parent
73573cf3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
+2
-1
fail_safe_subprocess.py
common_helper_process/fail_safe_subprocess.py
+1
-0
test_fail_safe_subprocess.py
test/test_fail_safe_subprocess.py
+1
-1
No files found.
common_helper_process/fail_safe_subprocess.py
View file @
5cfc68cd
...
...
@@ -69,6 +69,7 @@ def execute_interactive_shell_command(shell_command, timeout=60, inputs={}):
except
pexpect
.
TIMEOUT
:
child
.
kill
(
SIGKILL
)
output
+=
child
.
before
output
+=
b
'
\n\n
Error: Execution timed out!'
break
except
pexpect
.
EOF
:
output
+=
child
.
before
...
...
test/test_fail_safe_subprocess.py
View file @
5cfc68cd
...
...
@@ -53,5 +53,5 @@ class TestProcessHelper(unittest.TestCase):
script_path
=
os
.
path
.
join
(
get_dir_of_file
(
__file__
),
'data/interactive.sh'
)
output
,
ret_code
=
execute_interactive_shell_command
(
script_path
,
timeout
=
2
)
assert
'give me some input'
in
output
assert
'
Error: Execution timed out!'
assert
'
\n\n
Error: Execution timed out!'
in
output
assert
ret_code
>
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