From e82909361a50f5046295a1453f48735752318696 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Wed, 12 Nov 2014 12:56:28 +0000 Subject: yarns: Report stderr on morph failure --- yarns/implementations.yarn | 3 ++- yarns/morph.shell-lib | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn index 6110148e..e1ae271f 100644 --- a/yarns/implementations.yarn +++ b/yarns/implementations.yarn @@ -34,7 +34,8 @@ we can test it later in a THEN step. case $(cat "$DATADIR/morph-exit") in 0) echo "Morph succeeded!" ;; - *) die "Morph should have succeeded, but didn't. Unexpected failure!" + *) cat "$DATADIR/result-latest" >&2 + die "Morph should have succeeded, but didn't. Unexpected failure!" ;; esac diff --git a/yarns/morph.shell-lib b/yarns/morph.shell-lib index 9c13e449..d9c9eff6 100644 --- a/yarns/morph.shell-lib +++ b/yarns/morph.shell-lib @@ -39,9 +39,13 @@ run_morph() set +e "$SRCDIR"/morph --verbose \ --cachedir-min-space=0 --tempdir-min-space=0 \ - --no-default-config --config "$DATADIR/morph.conf" "$@" \ - 2> "$DATADIR/result-$1" > "$DATADIR/out-$1" + --no-default-config --config "$DATADIR/morph.conf" \ + --log="$DATADIR/log-$1" \ + "$@" 2> "$DATADIR/result-$1" > "$DATADIR/out-$1" local exit_code="$?" + for o in log result out; do + ln -sf "$o-$1" "$DATADIR/$o-latest" + done cat "$DATADIR/out-$1" cat "$DATADIR/result-$1" >&2 return "$exit_code" -- cgit v1.2.1