diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2015-11-20 13:57:31 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2016-03-25 21:02:33 +0000 |
commit | ddb8b27d5056074013a89d8ab277e39fdc1f069d (patch) | |
tree | 5ecf61560608dbea1ec1895e5cff2622959556b7 /yarns | |
parent | 9404317020ff0455cbfd3ca7976d546af823759b (diff) | |
download | morph-ddb8b27d5056074013a89d8ab277e39fdc1f069d.tar.gz |
WIP Add support for multiple sources per chunk
TODO:
- Add API to the cache server to retrieve a submodule commit from a
given path.
- Fix cross-bootstrap command.
Change-Id: I3475c2bcb648a272fee33bc878a521f79d4e6581
Diffstat (limited to 'yarns')
-rw-r--r-- | yarns/building.yarn | 18 | ||||
-rw-r--r-- | yarns/implementations.yarn | 75 |
2 files changed, 93 insertions, 0 deletions
diff --git a/yarns/building.yarn b/yarns/building.yarn index 9284f7cf..3aea709f 100644 --- a/yarns/building.yarn +++ b/yarns/building.yarn @@ -89,6 +89,24 @@ Morph Building Tests AND there are 2 artifacts named core-runtime in the cache FINALLY the git server is shut down + SCENARIO test recursive sources for a chunk + GIVEN a workspace + AND a git server + GIVEN a chunk with dependencies + WHEN the user checks out the system branch called master + WHEN the user attempts to build the system systems/test-system.morph in branch master + THEN morph succeeded + FINALLY the git server is shut down + + SCENARIO test recursive sources with non-empty path + GIVEN a workspace + AND a git server + GIVEN a chunk with recursive sources with non-empty paths + WHEN the user checks out the system branch called master + WHEN the user attempts to build the system systems/test-system.morph in branch master + THEN morph failed + FINALLY the git server is shut down + System integrations ------------------- diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn index 06380e7f..8ed5a5e9 100644 --- a/yarns/implementations.yarn +++ b/yarns/implementations.yarn @@ -45,6 +45,81 @@ locally, which we'll tell Morph to access using `file:` URLs. Specifically, we'll create a repository to hold system and stratum morphologies, and another to hold a chunk. + IMPLEMENTS GIVEN a chunk with recursive sources with non-empty paths + cd "$DATADIR/gits/morphs" + echo "version: 8" > VERSION + cat << EOF >> strata/core.morph + - name: invalid-chunk + repo: test:chunk-with-submodules + ref: master + extra-sources: + - repo: file://$DATADIR/gits/test-chunk + path: somepath + ref: master + - repo: file://$DATADIR/gits/child-chunk + path: somepath + EOF + git add . + git commit -m "More stuff" + + + IMPLEMENTS GIVEN a chunk with dependencies + mkdir "$DATADIR/gits/grandchild-chunk" + cd "$DATADIR/gits/grandchild-chunk" + git init . + touch grandchild-file + git add . + git commit -m "Initial commit" + + mkdir "$DATADIR/gits/child-chunk" + cd "$DATADIR/gits/child-chunk" + git init . + touch child-file + git add . + git commit -m "Initial commit" + git submodule add -b master file://$DATADIR/gits/grandchild-chunk + git commit -m "Initial submodule" + git checkout -b new-work + git mv child-file child-file-renamed + git commit -m "Moar work" + + mkdir "$DATADIR/gits/chunk-with-submodules" + cd "$DATADIR/gits/chunk-with-submodules" + git init . + git add . + git commit --allow-empty -m "Initial commit" + git submodule add -b master file://$DATADIR/gits/child-chunk + #( cd child-chunk && git checkout master) + git add . + git commit -m "Add submodule" + + cd "$DATADIR/gits/morphs" + echo "version: 8" > VERSION + cat << EOF >> strata/core.morph + - name: chunk-with-submodules + morph: chunk-with-submodules.morph + repo: test:chunk-with-submodules + ref: master + extra-sources: + - repo: file://$DATADIR/gits/child-chunk + path: child-chunk + ref: new-work + extra-sources: + - repo: file://$DATADIR/gits/grandchild-chunk + path: grandchild-chunk + EOF + + cat << EOF >> chunk-with-submodules.morph + name: chunk-with-submodules + kind: chunk + build-system: manual + build-commands: + - file exists child-chunk/child-file-renamed + - file exists child-chunk/grandchild-chunk/grandchild-file + EOF + git add . + git commit -m "Add moar stuff" + IMPLEMENTS GIVEN a git server # Create a directory for all the git repositories. |