From a3e30cc96c1777df08308755b3a817c3dfb5edd4 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 13 Jan 2014 16:28:04 +0100 Subject: [PATCH] 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. --- tool/create_iso | 2 +- tool/run | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tool/create_iso b/tool/create_iso index 0b11b4ef0..c5c0458c0 100755 --- a/tool/create_iso +++ b/tool/create_iso @@ -38,7 +38,7 @@ gen_iso_image = mkisofs -f -l -R -hide-rr-moved -jcharset utf-8 \ $(ISOIMG) iso: @$(call gen_iso_image, $(ISOIMG) $(ISODIR)) - @which isohybrid > /dev/null && isohybrid $(ISOIMG) + @isohybrid $(ISOIMG) STRIP_FILES = $(wildcard genode/*) $(wildcard pistachio/*) diff --git a/tool/run b/tool/run index 4983205d7..82c2251c7 100755 --- a/tool/run +++ b/tool/run @@ -422,11 +422,10 @@ proc create_iso_image_from_run_dir { } { exec rm -f "[run_dir].iso" # - # The 'create_iso' tool returns a non-zero return code even if - # successful. So we ignore the return code here. + # The 'create_iso' write diagnostics to stderr, which are interpreted as + # execution failure by expect unless '-ignorestderr' is set on 'exec'. # - catch { exec [genode_dir]/tool/create_iso iso ISO=[run_dir] } - if {![file exists "[run_dir].iso"]} { + if {[catch {exec -ignorestderr [genode_dir]/tool/create_iso iso ISO=[run_dir]} ]} { puts stderr "Error: ISO image creation failed" exit -5 }