diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2013-10-30 16:37:34 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2013-10-30 18:57:42 +0000 |
commit | c75705e75383bf759a15c9316b0b4d29687e559d (patch) | |
tree | a6a0ee0435e388c364e8ecd5ecdcf8b47ce26778 /yarns | |
parent | e9b3dbbe18d9a465148cc8df494971054b87654a (diff) | |
download | morph-c75705e75383bf759a15c9316b0b4d29687e559d.tar.gz |
Modify morph test suite to use the new cmdtest
Diffstat (limited to 'yarns')
-rw-r--r-- | yarns/morph.shell-lib | 19 | ||||
-rw-r--r-- | yarns/print-architecture.yarn | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/yarns/morph.shell-lib b/yarns/morph.shell-lib index 58521ee8..b11ddab1 100644 --- a/yarns/morph.shell-lib +++ b/yarns/morph.shell-lib @@ -158,3 +158,22 @@ if ! env | grep '^SRCDIR=' > /dev/null then export SRCDIR="$(pwd)" fi + + +# Added until it's fixed in upstream. +# It's a solution to create an empty home directory each execution +export HOME="$DATADIR/home" +if [ ! -d "$HOME" ] +then + mkdir "$HOME" +fi + +# Generating a default git user to run the tests +if ! test -r "$HOME/.gitconfig" +then + cat > "$HOME/.gitconfig" <<EOF +[user] + name = Tomjon Codethinker + email = tomjon@codethink.co.uk +EOF +fi diff --git a/yarns/print-architecture.yarn b/yarns/print-architecture.yarn index e45d7d1b..c2496147 100644 --- a/yarns/print-architecture.yarn +++ b/yarns/print-architecture.yarn @@ -19,6 +19,7 @@ Oh, and the one line should contain no spaces, either. AND stderr is empty IMPLEMENTS WHEN morph print-architecture is run + set +x run_morph print-architecture > "$DATADIR/stdout" 2> "$DATADIR/stderr" IMPLEMENTS THEN stdout contains a single line |