diff options
Diffstat (limited to 'tests.branching/setup')
-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 + |