Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
IPDSnelting
mjtest
Commits
aa066aee
Commit
aa066aee
authored
Dec 01, 2016
by
Johannes Bechberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check return code of compiled binaries
parent
489668ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
mjtest/test/exec_tests.py
mjtest/test/exec_tests.py
+17
-1
No files found.
mjtest/test/exec_tests.py
View file @
aa066aee
...
...
@@ -110,7 +110,15 @@ class JavaExecTest(BasicSyntaxTest):
os
.
chdir
(
cwd
)
raise
try
:
out
,
err
,
_
=
self
.
env
.
run_command
(
"./"
+
base_filename
)
out
,
err
,
rtcode
=
self
.
env
.
run_command
(
"./"
+
base_filename
)
if
rtcode
!=
0
:
test_result
.
incorrect_msg
=
"binary can't be run, non zero error code"
test_result
.
set_error_code
(
rtcode
)
test_result
.
add_long_text
(
"Error output"
,
err
.
decode
())
test_result
.
add_long_text
(
"Output"
,
out
.
decode
())
test_result
.
add_file
(
"Source file"
,
self
.
preprocessed_file
)
os
.
chdir
(
cwd
)
return
test_result
except
SigKill
as
sig
:
test_result
.
incorrect_msg
=
"binary can't be run: "
+
sig
.
name
.
strip
()
test_result
.
set_error_code
(
sig
.
retcode
)
...
...
@@ -184,6 +192,14 @@ class JavaInfiniteLoopTest(BasicSyntaxTest):
os
.
chdir
(
cwd
)
return
test_result
out
,
err
,
rtcode
=
self
.
env
.
run_command
(
"./"
+
base_filename
,
timeout
=
timeout
)
if
rtcode
!=
0
:
test_result
.
incorrect_msg
=
"binary can't be run, non zero error code"
test_result
.
set_error_code
(
rtcode
)
test_result
.
add_long_text
(
"Error output"
,
err
.
decode
())
test_result
.
add_long_text
(
"Output"
,
out
.
decode
())
test_result
.
add_file
(
"Source file"
,
self
.
preprocessed_file
)
os
.
chdir
(
cwd
)
return
test_result
except
SigKill
as
sig
:
if
sig
.
retcode
==
signal
.
SIGXCPU
:
test_result
.
add_long_text
(
"Output"
,
out
.
decode
())
...
...
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