diff options
author | Adam Coldrick <adam@sotk.co.uk> | 2015-04-12 11:32:31 +0000 |
---|---|---|
committer | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2015-04-27 15:44:14 +0000 |
commit | fa5c470ad5dd3a3416217363983eb3795ef53c79 (patch) | |
tree | 4dc11b509b50d1da3471ef825d1291f697811a50 /yarns/implementations.yarn | |
parent | cc7be86c788a5337ebce16365b9b51341b7cddc2 (diff) | |
download | morph-fa5c470ad5dd3a3416217363983eb3795ef53c79.tar.gz |
Add a test for `morph get-repo`
Change-Id: Ie0ac708946c3b1d65d2022638c02d6a2d288ad9d
Diffstat (limited to 'yarns/implementations.yarn')
-rw-r--r-- | yarns/implementations.yarn | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn index faae44a8..e11a95b8 100644 --- a/yarns/implementations.yarn +++ b/yarns/implementations.yarn @@ -561,6 +561,43 @@ Editing morphologies with `morph edit`. echo "$MATCH_2" > "$DATADIR/git-branch.wanted" diff -u "$DATADIR/git-branch.wanted" "$DATADIR/git-branch.actual" +Cloning chunk repos with `morph get-repo`. + + IMPLEMENTS WHEN the user gets the repo for chunk (\S+) in branch (\S+) + cd "$DATADIR/workspace/$MATCH_2/test/morphs" + run_morph get-repo "$MATCH_1" + + IMPLEMENTS WHEN the user (gets|attempts to get) the repo for chunk (\S+) from branch (\S+) in directory (\S+) + cd "$DATADIR/workspace/$MATCH_3/test/morphs" + if [ $MATCH_1 == gets ]; then + run_morph get-repo "$MATCH_2" "$DATADIR/$MATCH_3"; + else + attempt_morph get-repo "$MATCH_2" "$DATADIR/$MATCH_3"; + fi + + IMPLEMENTS WHEN the user gets the repo for chunk (\S+) from branch (\S+) in directory (\S+) at ref (\S+) + cd "$DATADIR/workspace/$MATCH_2/test/morphs" + run_morph get-repo "$MATCH_1" "$DATADIR/$MATCH_3" --ref "$MATCH_4" + + IMPLEMENTS THEN the repo for chunk (\S+) was cloned into the system branch (\S+) + if [[ -d "$DATADIR/workspace/$MATCH_2/test/$MATCH_1" ]]; then + exit 0 + fi + exit 1 + + IMPLEMENTS THEN the repo for chunk (\S+) was cloned into the directory (\S+) + if [[ -d "$DATADIR/$MATCH_2" ]]; then + exit 0 + fi + exit 1 + + IMPLEMENTS THEN the repo in directory (\S+) has HEAD (\S+) + cd "$DATADIR/$MATCH_1" + if [ "$MATCH_2" == `git rev-parse --abbrev-ref HEAD` ]; then + exit 0 + fi + exit 1 + To produce buildable morphologies, we need them to be of the same architecture as the machine doing the testing. This uses `morph print-architecture` to get a value appropriate for morph. |