diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-03-22 18:33:00 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-03-22 18:33:00 +0000 |
commit | b64a08879c6c6c7e57625ce8c339ce33af193cc4 (patch) | |
tree | 285033917a1aaff8edb3ac9948bf6a8b0acaab32 /tests.branching | |
parent | 7286464a9feed92910fa57185d9eeefcb4da8a3c (diff) | |
download | morph-b64a08879c6c6c7e57625ce8c339ce33af193cc4.tar.gz |
Create dummy git repositories for morphs, hello
Diffstat (limited to 'tests.branching')
-rwxr-xr-x | tests.branching/setup | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/tests.branching/setup b/tests.branching/setup index cb1c2f4a..61f966e2 100755 --- a/tests.branching/setup +++ b/tests.branching/setup @@ -16,7 +16,62 @@ # Set up $DATADIR. +# +# - an empty morph mine directory +# - a git repository called "morphs" for fake system, stratum morphologies +# - a git repository calle "hello" for a dummy chunk set -eu + +# Create an empty directory to be used as a morph mine mkdir "$DATADIR/mine" + + +# Create a fake morphs repository +mkdir "$DATADIR/morphs" + +cat <<EOF > "$DATADIR/morphs/hello-system.chunk" +{ + "name": "hello-system", + "kind": "system", + "disk-size": "1G", + "strata": [ + "hello-stratum" + ] +} +EOF + +cat <<EOF > "$DATADIR/morphs/hello-stratum.chunk" +{ + "name": "hello-stratum", + "kind": "stratum", + "sources": [ + { + "name": "hello", + "ref": "master" + } + ] +} +EOF + +scripts/run-git-in "$DATADIR/morphs" init +scripts/run-git-in "$DATADIR/morphs" add . +scripts/run-git-in "$DATADIR/morphs" commit -m initial + + +# Create a dummy chunk repository +mkdir "$DATADIR/hello" + +cat <<EOF > "$DATADIR/hello/hello.chunk" +{ + "name": "hello", + "kind": "chunk", + "build-system": "dummy" +} +EOF + +scripts/run-git-in "$DATADIR/hello" init +scripts/run-git-in "$DATADIR/hello" add . +scripts/run-git-in "$DATADIR/hello" commit -m initial + |