mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-21 06:33:31 +00:00
run: instruct 'exec' to ignore stderr output
Unless '-ignorestderr' is set on 'exec' in expect, any output on stderr is interpreted as execution failure. In this case, 'create_iso' logs some diagnostics but does not fail. We repeatedly promote our ISOs to be bootable from USB storage. Therefore, we have a hard dependency on 'isohybrid' and should fail in the case that the tool is missing.
This commit is contained in:
parent
6a076ff621
commit
a3e30cc96c
@ -38,7 +38,7 @@ gen_iso_image = mkisofs -f -l -R -hide-rr-moved -jcharset utf-8 \
|
|||||||
|
|
||||||
$(ISOIMG) iso:
|
$(ISOIMG) iso:
|
||||||
@$(call gen_iso_image, $(ISOIMG) $(ISODIR))
|
@$(call gen_iso_image, $(ISOIMG) $(ISODIR))
|
||||||
@which isohybrid > /dev/null && isohybrid $(ISOIMG)
|
@isohybrid $(ISOIMG)
|
||||||
|
|
||||||
STRIP_FILES = $(wildcard genode/*) $(wildcard pistachio/*)
|
STRIP_FILES = $(wildcard genode/*) $(wildcard pistachio/*)
|
||||||
|
|
||||||
|
7
tool/run
7
tool/run
@ -422,11 +422,10 @@ proc create_iso_image_from_run_dir { } {
|
|||||||
exec rm -f "[run_dir].iso"
|
exec rm -f "[run_dir].iso"
|
||||||
|
|
||||||
#
|
#
|
||||||
# The 'create_iso' tool returns a non-zero return code even if
|
# The 'create_iso' write diagnostics to stderr, which are interpreted as
|
||||||
# successful. So we ignore the return code here.
|
# execution failure by expect unless '-ignorestderr' is set on 'exec'.
|
||||||
#
|
#
|
||||||
catch { exec [genode_dir]/tool/create_iso iso ISO=[run_dir] }
|
if {[catch {exec -ignorestderr [genode_dir]/tool/create_iso iso ISO=[run_dir]} ]} {
|
||||||
if {![file exists "[run_dir].iso"]} {
|
|
||||||
puts stderr "Error: ISO image creation failed"
|
puts stderr "Error: ISO image creation failed"
|
||||||
exit -5
|
exit -5
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user