summaryrefslogtreecommitdiff
path: root/yarns
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-11-12 12:56:28 +0000
committerRichard Maw <richard.maw@gmail.com>2014-11-12 14:47:08 +0000
commite82909361a50f5046295a1453f48735752318696 (patch)
tree6bcd7429ec88dc0b0a325343556b5ee019a042ca /yarns
parent501a039172d066d0b0ea9071c5d82467e89de9a6 (diff)
downloadmorph-e82909361a50f5046295a1453f48735752318696.tar.gz
yarns: Report stderr on morph failure
Diffstat (limited to 'yarns')
-rw-r--r--yarns/implementations.yarn3
-rw-r--r--yarns/morph.shell-lib8
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"