Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arbor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
arbor-sim
arbor
Commits
11ad487f
Unverified
Commit
11ad487f
authored
3 years ago
by
Robin De Schepper
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Write build-catalogue (c)make errors to `stdout` and `stderr` (#1679)
parent
e03a8ce2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/build-catalogue.in
+27
-4
27 additions, 4 deletions
scripts/build-catalogue.in
with
27 additions
and
4 deletions
scripts/build-catalogue.in
+
27
−
4
View file @
11ad487f
...
...
@@ -145,9 +145,32 @@ with TemporaryDirectory() as tmp:
if
verbose
:
out
,
err
=
(
None
,
None
)
else
:
out
,
err
=
(
sp
.
DEVNULL
,
sp
.
DEVNULL
)
sp
.
run
(
'
cmake ..
'
,
shell
=
True
,
check
=
True
,
stdout
=
out
,
stderr
=
err
)
sp
.
run
(
'
make
'
,
shell
=
True
,
check
=
True
,
stdout
=
out
,
stderr
=
err
)
shutil
.
copy2
(
f
'
{
name
}
-catalogue.so
'
,
pwd
)
out
,
err
=
(
sp
.
PIPE
,
sp
.
PIPE
)
try
:
sp
.
run
(
'
cmake ..
'
,
shell
=
True
,
check
=
True
,
stdout
=
out
,
stderr
=
err
)
sp
.
run
(
'
make
'
,
shell
=
True
,
check
=
True
,
stdout
=
out
,
stderr
=
err
)
shutil
.
copy2
(
f
'
{
name
}
-catalogue.so
'
,
pwd
)
except
sp
.
CalledProcessError
as
e
:
import
sys
,
traceback
as
tb
if
not
verbose
:
# Not in verbose mode, so we have captured the
# `stdout` and `stderr` and can print it to the user.
sys
.
stdout
.
write
(
"
Build log:
\n
"
)
sys
.
stdout
.
write
(
e
.
stdout
.
decode
())
sys
.
stderr
.
write
(
tb
.
format_exc
()
+
"
Error:
\n\n
"
)
sys
.
stderr
.
write
(
e
.
stderr
.
decode
())
else
:
# In verbose mode the outputs weren't captured and
# have been streamed to `stdout` and `stderr` already.
sys
.
stderr
.
write
(
"
Catalogue building error occurred.
"
+
"
Check stdout log for underlying error,
"
+
"
or omit verbose flag to capture it.
"
)
sys
.
stdout
.
flush
()
sys
.
stderr
.
flush
()
exit
(
e
.
returncode
)
if
not
quiet
:
print
(
f
'
Catalogue has been built and copied to
{
pwd
}
/
{
name
}
-catalogue.so
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment