summaryrefslogtreecommitdiff
path: root/yarns
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2015-11-23 10:15:49 +0000
committerTiago Gomes <tiago.gomes@codethink.co.uk>2015-11-25 17:01:58 +0000
commit38f356088ff85a2ca186704173f8a9fb5cf9db66 (patch)
treec5165e3e36835e34b46ba891baa101e3d19b3a15 /yarns
parentd71d4824ef57a97266eebc11320cfb38295f484a (diff)
downloadmorph-38f356088ff85a2ca186704173f8a9fb5cf9db66.tar.gz
Tests: rename git repository
Rename the git repository where the morphologies used for testing are kept, from morphs to definitions. Change-Id: Icd5fa6609ddec3993dd4c772cd916359843ef500
Diffstat (limited to 'yarns')
-rw-r--r--yarns/architecture.yarn2
-rw-r--r--yarns/branches-workspaces.yarn6
-rw-r--r--yarns/implementations.yarn104
-rw-r--r--yarns/regression.yarn12
-rw-r--r--yarns/splitting.yarn30
5 files changed, 77 insertions, 77 deletions
diff --git a/yarns/architecture.yarn b/yarns/architecture.yarn
index faa0f291..ec5207c2 100644
--- a/yarns/architecture.yarn
+++ b/yarns/architecture.yarn
@@ -18,7 +18,7 @@ Morph Cross-Bootstrap Tests
GIVEN a git server
AND a system called base-system-testarch.morph for the test architecture in the git server
WHEN the user clones definitions
- THEN the user cross-bootstraps the system base-system-testarch.morph in branch master of repo test:morphs to the arch testarch
+ THEN the user cross-bootstraps the system base-system-testarch.morph in branch master of repo test:definitions to the arch testarch
FINALLY the git server is shut down
Architecture validation Tests
diff --git a/yarns/branches-workspaces.yarn b/yarns/branches-workspaces.yarn
index 42ff1226..c15f4147 100644
--- a/yarns/branches-workspaces.yarn
+++ b/yarns/branches-workspaces.yarn
@@ -159,7 +159,7 @@ A CSV manifest can also be generated.
SCENARIO morph generates a csv manifest
GIVEN a git server
- WHEN morph generates a manifest for system systems/test-system.morph at ref HEAD in repository test:morphs
+ WHEN morph generates a manifest for system systems/test-system.morph at ref HEAD in repository test:definitions
THEN morph succeeded
AND the csv manifest is generated
@@ -193,7 +193,7 @@ a system is likely to have a reproducible result.
SCENARIO using morph certify
GIVEN a git server
- WHEN the user certifies the system systems/test-system.morph at ref HEAD in repository test:morphs
+ WHEN the user certifies the system systems/test-system.morph at ref HEAD in repository test:definitions
THEN morph succeeded
AND morph output Reproducibility certification PASSED
@@ -206,5 +206,5 @@ artifact in a system. This name includes the cache key of the artifact.
SCENARIO using morph list-artifacts
GIVEN a git server
- WHEN the user lists the artifacts which make up the system systems/test-system.morph at ref HEAD in repository test:morphs
+ WHEN the user lists the artifacts which make up the system systems/test-system.morph at ref HEAD in repository test:definitions
THEN morph succeeded
diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn
index e18f02eb..794c7c52 100644
--- a/yarns/implementations.yarn
+++ b/yarns/implementations.yarn
@@ -214,8 +214,8 @@ another to hold a chunk.
# Create a repo for the morphologies.
- mkdir "$DATADIR/gits/morphs"
- cd "$DATADIR/gits/morphs"
+ mkdir "$DATADIR/gits/definitions"
+ cd "$DATADIR/gits/definitions"
git init .
echo 'version: 7' > VERSION
@@ -261,8 +261,8 @@ another to hold a chunk.
morph: strata/core.morph
EOF
- mkdir "$DATADIR/gits/morphs/clusters"
- cd "$DATADIR/gits/morphs"
+ mkdir "$DATADIR/gits/definitions/clusters"
+ cd "$DATADIR/gits/definitions"
install -m644 -D /dev/stdin << EOF "clusters/test-cluster.morph"
name: test-cluster
kind: cluster
@@ -413,7 +413,7 @@ another to hold a chunk.
--enable=receive-pack #allow push
GIT_DAEMON_PORT="$(cat "$port_file")"
- echo "git://127.0.0.1:$GIT_DAEMON_PORT/morphs" > "$DATADIR/definitions-repo-url"
+ echo "git://127.0.0.1:$GIT_DAEMON_PORT/definitions" > "$DATADIR/definitions-repo-url"
# Create the Morph configuration file so we can access the repos
# using test:foo URL aliases.
@@ -445,7 +445,7 @@ have a morphology using the test architecture.
IMPLEMENTS GIVEN a system called (\S+) for the test architecture in the git server
name="$(basename "${MATCH_1%.*}")"
- cat << EOF > "$DATADIR/gits/morphs/$MATCH_1"
+ cat << EOF > "$DATADIR/gits/definitions/$MATCH_1"
arch: testarch
configuration-extensions: []
description: A system called $name for test architecture
@@ -458,16 +458,16 @@ have a morphology using the test architecture.
morph: strata/core.morph
EOF
- run_in "$DATADIR/gits/morphs" git add "strata/build-essential.morph"
- run_in "$DATADIR/gits/morphs" git add "strata/core.morph"
- run_in "$DATADIR/gits/morphs" git add "$MATCH_1"
- run_in "$DATADIR/gits/morphs" git commit -m "Added $MATCH_1 and strata morphologies."
+ run_in "$DATADIR/gits/definitions" git add "strata/build-essential.morph"
+ run_in "$DATADIR/gits/definitions" git add "strata/core.morph"
+ run_in "$DATADIR/gits/definitions" git add "$MATCH_1"
+ run_in "$DATADIR/gits/definitions" git commit -m "Added $MATCH_1 and strata morphologies."
You need an architecture to build a system, we don't default to the host architecture.
IMPLEMENTS GIVEN a system called (\S+) with no architecture in the git server
name="$(basename "${MATCH_1%.*}")"
- cat << EOF > "$DATADIR/gits/morphs/$MATCH_1"
+ cat << EOF > "$DATADIR/gits/definitions/$MATCH_1"
configuration-extensions: []
description: A system called $name for test architecture
kind: system
@@ -479,8 +479,8 @@ You need an architecture to build a system, we don't default to the host archite
morph: strata/core.morph
EOF
- run_in "$DATADIR/gits/morphs" git add "$MATCH_1"
- run_in "$DATADIR/gits/morphs" git commit -m "Added $MATCH_1."
+ run_in "$DATADIR/gits/definitions" git add "$MATCH_1"
+ run_in "$DATADIR/gits/definitions" git commit -m "Added $MATCH_1."
IMPLEMENTS THEN the repo for chunk (\S+) was cloned into the directory (\S+)
if [[ -d "$DATADIR/$MATCH_2" ]]; then
@@ -843,12 +843,12 @@ Altering morphologies in their source repositories
IMPLEMENTS GIVEN system (\S+) uses (.+) from (\S+)
"$SRCDIR/scripts/edit-morph" set-system-artifact-depends \
- "$DATADIR/gits/morphs/$MATCH_1" "$MATCH_3" "$MATCH_2"
- run_in "$DATADIR/gits/morphs" git add "$MATCH_1"
- run_in "$DATADIR/gits/morphs" git commit -m "Make $MATCH_1 only use $MATCH_2"
+ "$DATADIR/gits/definitions/$MATCH_1" "$MATCH_3" "$MATCH_2"
+ run_in "$DATADIR/gits/definitions" git add "$MATCH_1"
+ run_in "$DATADIR/gits/definitions" git commit -m "Make $MATCH_1 only use $MATCH_2"
IMPLEMENTS GIVEN stratum (\S+) has match rules: (.*)
- cd "$DATADIR/gits/morphs"
+ cd "$DATADIR/gits/definitions"
"$SRCDIR/scripts/edit-morph" set-stratum-match-rules \
"$MATCH_1" "$MATCH_2"
git add "$MATCH_1"
@@ -859,62 +859,62 @@ Altering morphologies in their source repositories
IMPLEMENTS GIVEN a cluster called (\S+) in branch (\S+)
cluster="$MATCH_1"
branch="$MATCH_2"
- run_in "$DATADIR/gits/morphs" git checkout "$branch"
+ run_in "$DATADIR/gits/definitions" git checkout "$branch"
"$SRCDIR/scripts/edit-morph" cluster-init \
- "$DATADIR/gits/morphs/$cluster"
- run_in "$DATADIR/gits/morphs" git add "$cluster"
- run_in "$DATADIR/gits/morphs" git commit -m "Add cluster $cluster"
- run_in "$DATADIR/gits/morphs" git checkout -
+ "$DATADIR/gits/definitions/$cluster"
+ run_in "$DATADIR/gits/definitions" git add "$cluster"
+ run_in "$DATADIR/gits/definitions" git commit -m "Add cluster $cluster"
+ run_in "$DATADIR/gits/definitions" git checkout -
IMPLEMENTS GIVEN a (sub)?system in cluster (\S+) in branch (\S+) called (\S+)
cluster="$MATCH_2"
branch="$MATCH_3"
name="$MATCH_4"
- run_in "$DATADIR/gits/morphs" git checkout "$branch"
+ run_in "$DATADIR/gits/definitions" git checkout "$branch"
"$SRCDIR/scripts/edit-morph" cluster-system-init \
- "$DATADIR/gits/morphs/$cluster" "$name"
- run_in "$DATADIR/gits/morphs" git add "$cluster"
- run_in "$DATADIR/gits/morphs" git commit -m "Add system/subsystem $name to cluster $cluster"
- run_in "$DATADIR/gits/morphs" git checkout -
+ "$DATADIR/gits/definitions/$cluster" "$name"
+ run_in "$DATADIR/gits/definitions" git add "$cluster"
+ run_in "$DATADIR/gits/definitions" git commit -m "Add system/subsystem $name to cluster $cluster"
+ run_in "$DATADIR/gits/definitions" git checkout -
IMPLEMENTS GIVEN (sub)?system (\S+) in cluster (\S+) in branch (\S+) builds (\S+)
name="$MATCH_2"
cluster="$MATCH_3"
branch="$MATCH_4"
morphology="$MATCH_5"
- run_in "$DATADIR/gits/morphs" git checkout "$branch"
+ run_in "$DATADIR/gits/definitions" git checkout "$branch"
"$SRCDIR/scripts/edit-morph" cluster-system-set-morphology \
- "$DATADIR/gits/morphs/$cluster" "$name" \
+ "$DATADIR/gits/definitions/$cluster" "$name" \
"$morphology"
- run_in "$DATADIR/gits/morphs" git add "$cluster"
- run_in "$DATADIR/gits/morphs" git commit -m "Make system $name in cluster $cluster build $morphology"
- run_in "$DATADIR/gits/morphs" git checkout -
+ run_in "$DATADIR/gits/definitions" git add "$cluster"
+ run_in "$DATADIR/gits/definitions" git commit -m "Make system $name in cluster $cluster build $morphology"
+ run_in "$DATADIR/gits/definitions" git checkout -
IMPLEMENTS GIVEN (sub)?system (\S+) in cluster (\S+) in branch (\S+) has deployment type: (\S+)
name="$MATCH_2"
cluster="$MATCH_3"
branch="$MATCH_4"
type="$MATCH_5"
- run_in "$DATADIR/gits/morphs" git checkout "$branch"
+ run_in "$DATADIR/gits/definitions" git checkout "$branch"
"$SRCDIR/scripts/edit-morph" cluster-system-set-deploy-type \
- "$DATADIR/gits/morphs/$cluster" "$name" \
+ "$DATADIR/gits/definitions/$cluster" "$name" \
"$type"
- run_in "$DATADIR/gits/morphs" git add "$cluster"
- run_in "$DATADIR/gits/morphs" git commit -m "Add system $name to cluster $cluster"
- run_in "$DATADIR/gits/morphs" git checkout -
+ run_in "$DATADIR/gits/definitions" git add "$cluster"
+ run_in "$DATADIR/gits/definitions" git commit -m "Add system $name to cluster $cluster"
+ run_in "$DATADIR/gits/definitions" git checkout -
IMPLEMENTS GIVEN (sub)?system (\S+) in cluster (\S+) in branch (\S+) has deployment location: (\S+)
name="$MATCH_2"
cluster="$MATCH_3"
branch="$MATCH_4"
location="$MATCH_5"
- run_in "$DATADIR/gits/morphs" git checkout "$branch"
+ run_in "$DATADIR/gits/definitions" git checkout "$branch"
"$SRCDIR/scripts/edit-morph" cluster-system-set-deploy-location \
- "$DATADIR/gits/morphs/$cluster" "$name" \
+ "$DATADIR/gits/definitions/$cluster" "$name" \
"$location"
- run_in "$DATADIR/gits/morphs" git add "$cluster"
- run_in "$DATADIR/gits/morphs" git commit -m "Set deploy location of system $name in cluster $cluster"
- run_in "$DATADIR/gits/morphs" git checkout -
+ run_in "$DATADIR/gits/definitions" git add "$cluster"
+ run_in "$DATADIR/gits/definitions" git commit -m "Set deploy location of system $name in cluster $cluster"
+ run_in "$DATADIR/gits/definitions" git checkout -
IMPLEMENTS GIVEN (sub)?system (\S+) in cluster (\S+) in branch (\S+) has deployment variable: ([^=]+)=(.*)
name="$MATCH_2"
@@ -922,21 +922,21 @@ Altering morphologies in their source repositories
branch="$MATCH_4"
key="$MATCH_5"
val="$MATCH_6"
- run_in "$DATADIR/gits/morphs" git checkout "$branch"
+ run_in "$DATADIR/gits/definitions" git checkout "$branch"
"$SRCDIR/scripts/edit-morph" cluster-system-set-deploy-variable \
- "$DATADIR/gits/morphs/$cluster" "$name" \
+ "$DATADIR/gits/definitions/$cluster" "$name" \
"$key" "$val"
- run_in "$DATADIR/gits/morphs" git add "$cluster"
- run_in "$DATADIR/gits/morphs" git commit -m "Set deploy variable for system $name in cluster $cluster"
- run_in "$DATADIR/gits/morphs" git checkout -
+ run_in "$DATADIR/gits/definitions" git add "$cluster"
+ run_in "$DATADIR/gits/definitions" git commit -m "Set deploy variable for system $name in cluster $cluster"
+ run_in "$DATADIR/gits/definitions" git checkout -
IMPLEMENTS GIVEN stratum (\S+) in branch (\S+) has match rules: (.*)
- run_in "$DATADIR/gits/morphs" git checkout "$MATCH_2"
+ run_in "$DATADIR/gits/definitions" git checkout "$MATCH_2"
"$SRCDIR/scripts/edit-morph" set-stratum-match-rules \
- "$DATADIR/gits/morphs/$MATCH_1" "$MATCH_3"
- run_in "$DATADIR/gits/morphs" git add "$MATCH_1"
- run_in "$DATADIR/gits/morphs" git commit -m "Make $MATCH_1 match $MATCH_2"
- run_in "$DATADIR/gits/morphs" git checkout -
+ "$DATADIR/gits/definitions/$MATCH_1" "$MATCH_3"
+ run_in "$DATADIR/gits/definitions" git add "$MATCH_1"
+ run_in "$DATADIR/gits/definitions" git commit -m "Make $MATCH_1 match $MATCH_2"
+ run_in "$DATADIR/gits/definitions" git checkout -
Altering morphologies in the definitions repo
diff --git a/yarns/regression.yarn b/yarns/regression.yarn
index 784d6b3e..151f60d6 100644
--- a/yarns/regression.yarn
+++ b/yarns/regression.yarn
@@ -54,7 +54,7 @@ Implementations
IMPLEMENTS GIVEN a system containing only bootstrap chunks called (\S+)
arch=$(run_morph print-architecture)
name="$(basename "${MATCH_1%.*}")"
- install -m644 -D /dev/stdin <<EOF "$DATADIR/gits/morphs/$MATCH_1"
+ install -m644 -D /dev/stdin <<EOF "$DATADIR/gits/definitions/$MATCH_1"
name: $name
kind: system
arch: $arch
@@ -62,7 +62,7 @@ Implementations
- morph: strata/bootstrap-stratum.morph
EOF
- install -m644 -D /dev/stdin << EOF "$DATADIR/gits/morphs/strata/bootstrap-stratum.morph"
+ install -m644 -D /dev/stdin << EOF "$DATADIR/gits/definitions/strata/bootstrap-stratum.morph"
name: bootstrap-stratum
kind: stratum
chunks:
@@ -75,8 +75,8 @@ Implementations
build-depends: []
EOF
sed -e 's/name: test-chunk/name: bootstrap-chunk/g' \
- "$DATADIR/gits/morphs/test-chunk.morph" \
- > "$DATADIR/gits/morphs/bootstrap-chunk.morph"
+ "$DATADIR/gits/definitions/test-chunk.morph" \
+ > "$DATADIR/gits/definitions/bootstrap-chunk.morph"
- run_in "$DATADIR/gits/morphs" git add .
- run_in "$DATADIR/gits/morphs" git commit -m "Add bootstrap-system"
+ run_in "$DATADIR/gits/definitions" git add .
+ run_in "$DATADIR/gits/definitions" git commit -m "Add bootstrap-system"
diff --git a/yarns/splitting.yarn b/yarns/splitting.yarn
index d38eb48d..562c226c 100644
--- a/yarns/splitting.yarn
+++ b/yarns/splitting.yarn
@@ -90,7 +90,7 @@ Implementations
IMPLEMENTS GIVEN chunk (\S+) includes the default splitting rules
# Append default products rules
name="$(basename "${MATCH_1%.*}")"
- cat <<EOF >>"$DATADIR/gits/morphs/$MATCH_1.morph"
+ cat <<EOF >>"$DATADIR/gits/definitions/$MATCH_1.morph"
products:
- artifact: $name-bins
include: [ "(usr/)?s?bin/.*" ]
@@ -117,12 +117,12 @@ Implementations
- artifact: $name-misc
include: [ .* ]
EOF
- run_in "$DATADIR/gits/morphs" git add "$MATCH_1.morph"
- run_in "$DATADIR/gits/morphs" git commit -m 'Add default splitting rules'
+ run_in "$DATADIR/gits/definitions" git add "$MATCH_1.morph"
+ run_in "$DATADIR/gits/definitions" git commit -m 'Add default splitting rules'
IMPLEMENTS GIVEN stratum (\S+) includes the default splitting rules
name=$(basename "${MATCH_1%.*}")
- cat <<EOF >"$DATADIR/gits/morphs/$MATCH_1"
+ cat <<EOF >"$DATADIR/gits/definitions/$MATCH_1"
name: $name
kind: stratum
build-depends:
@@ -155,11 +155,11 @@ Implementations
test-chunk-devel: $name-devel
test-chunk-doc: $name-devel
EOF
- run_in "$DATADIR/gits/morphs" git add "$MATCH_1"
- run_in "$DATADIR/gits/morphs" git commit -m 'Add default splitting rules'
+ run_in "$DATADIR/gits/definitions" git add "$MATCH_1"
+ run_in "$DATADIR/gits/definitions" git commit -m 'Add default splitting rules'
IMPLEMENTS GIVEN system (\S+) includes the default splitting rules
- cat << EOF >> "$DATADIR/gits/morphs/$MATCH_1"
+ cat << EOF >> "$DATADIR/gits/definitions/$MATCH_1"
strata:
- name: build-essential
morph: strata/build-essential.morph
@@ -169,23 +169,23 @@ Implementations
- core-runtime
- core-devel
EOF
- run_in "$DATADIR/gits/morphs" git add "$MATCH_1"
- run_in "$DATADIR/gits/morphs" git commit -m 'Add default splitting rules'
+ run_in "$DATADIR/gits/definitions" git add "$MATCH_1"
+ run_in "$DATADIR/gits/definitions" git commit -m 'Add default splitting rules'
IMPLEMENTS GIVEN stratum (\S+) has chunks that aren't used in (\S+)
# Create an extra chunk that will never successfully build
- cat >"$DATADIR/gits/morphs/unbuildable-chunk.morph" <<EOF
+ cat >"$DATADIR/gits/definitions/unbuildable-chunk.morph" <<EOF
name: unbuildable-chunk
kind: chunk
install-commands:
- "false"
EOF
- run_in "$DATADIR/gits/morphs" git add unbuildable-chunk.morph
- run_in "$DATADIR/gits/morphs" git commit -m 'Add unbuildable chunk'
+ run_in "$DATADIR/gits/definitions" git add unbuildable-chunk.morph
+ run_in "$DATADIR/gits/definitions" git commit -m 'Add unbuildable chunk'
# Create a stratum that has an artifact that doesn't include any
# artifacts from unbuildable-chunk
- cat >>"$DATADIR/gits/morphs/$MATCH_1" <<EOF
+ cat >>"$DATADIR/gits/definitions/$MATCH_1" <<EOF
products:
- artifact: $MATCH_2
include:
@@ -205,5 +205,5 @@ Implementations
build-depends:
- test-chunk
EOF
- run_in "$DATADIR/gits/morphs" git add "$MATCH_1"
- run_in "$DATADIR/gits/morphs" git commit -m "add $MATCH_2 to stratum"
+ run_in "$DATADIR/gits/definitions" git add "$MATCH_1"
+ run_in "$DATADIR/gits/definitions" git commit -m "add $MATCH_2 to stratum"