From: Michal Sojka Date: Mon, 6 Oct 2014 12:12:47 +0000 (+0200) Subject: run.pl: Better error messages X-Git-Tag: pc-sw-update~18 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/a70a890d69c27d38770424ad7b6a8857fe23703a?hp=2c2fd02ec2427436e9ff0b9c580dd919fcb9c4c9 run.pl: Better error messages --- diff --git a/continuous/gw-setup/run.pl b/continuous/gw-setup/run.pl index 97f9939..e27a682 100755 --- a/continuous/gw-setup/run.pl +++ b/continuous/gw-setup/run.pl @@ -11,12 +11,12 @@ system("cat > $S99; chmod +x $S99") unless -t STDIN; # Boot the gateway # die("No boot command") if ($#ARGV eq -1); my $bootcmd = scalar @ARGV ? "'".join("' '", @ARGV)."'" : "$FindBin::Bin/boot"; -$exp = Expect->spawn($bootcmd); +$exp = Expect->spawn($bootcmd) or die "Cannot spawn $bootcmd: $!"; $exp->expect(120, 'Welcome to Buildroot', 'UGW started', '-re', 't...a...s...k...s... ...s...t...a...r...t...e...d') # RTEMS has bug - it sends 4 characters instead of just one - or die "Cannot spawn $bootcmd: $!"; + or die("Boot failed"); # Measure latencies my $latester=<<'EOF';