From 3c27e08f558bd55b9a39ee8a0a43a08881126f1c Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Wed, 24 Sep 2014 20:54:18 +0000 Subject: Move architecture existing test to yarn --- yarns/architecture.yarn | 12 ++++++++++++ yarns/implementations.yarn | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+) (limited to 'yarns') diff --git a/yarns/architecture.yarn b/yarns/architecture.yarn index d4de308e..07274ec3 100644 --- a/yarns/architecture.yarn +++ b/yarns/architecture.yarn @@ -22,3 +22,15 @@ Morph Cross-Bootstrap Tests WHEN the user checks out the system branch called master THEN the user cross-bootstraps the system base-system-testarch.morph in branch master of repo test:morphs to the arch testarch FINALLY the git server is shut down + +Architecture validation Tests +============================= + + SCENARIO building a system with no architecture + GIVEN a workspace + AND a git server + AND a system called base-system-noarch.morph with no architecture in the git server + WHEN the user checks out the system branch called master + AND the user attempts to build the system base-system-testarch.morph in branch master + THEN morph failed + FINALLY the git server is shut down diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn index 9cf497fc..86c3a9c4 100644 --- a/yarns/implementations.yarn +++ b/yarns/implementations.yarn @@ -363,6 +363,25 @@ have a morphology using the test architecture. run_in "$DATADIR/gits/morphs" git add "$MATCH_1" run_in "$DATADIR/gits/morphs" 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" + configuration-extensions: [] + description: A system called $name for test architecture + kind: system + name: $name + strata: + - name: build-essential + morph: strata/build-essential.morph + - name: core + 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." + Implementation sections for system branch operations ---------------------------------------------------- -- cgit v1.2.1