diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-07-28 15:23:09 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-10-14 14:34:29 +0000 |
commit | b8b8de2b123ff96e6469196934359485bcd06b04 (patch) | |
tree | 2bb774dcaf3db88d6dafb8ab34322b5df4550ce0 /tests.build/setup-build-essential | |
parent | 3c59628c80ffe47992bf7347268ca587fc6d368d (diff) | |
download | morph-b8b8de2b123ff96e6469196934359485bcd06b04.tar.gz |
Add support for Baserock definitions version 7
This adds a new 'Defaults' class to represent definitions defaults
The Python 'jsonschema' module is used to validate the contents of the
Defaults file. This module is already included in Baserock 'build' and
'devel' reference systems by way of the 'openstack-common' stratum.
This commit embeds a copy of the JSON-Schema schema for the DEFAULTS
file. I think the canonical location of this schema should be in the
reference definitions.git, for now. In future, the schemas should maybe
have their own repos. Either way, Morph should embed a copy for the time
being so that we are sure the schema matches how Morph expects to parse
the file.
Morph's automated tests are all updated to use definitions version 7.
I removed most of the tests for built-in build systems, because the
built-ins themselves are no longer part of Morph. Only the mechanism for
defining them needs to be tested now.
Change-Id: I65f8f1c967683ef605852bfae5c68518e53f9981
Diffstat (limited to 'tests.build/setup-build-essential')
-rwxr-xr-x | tests.build/setup-build-essential | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests.build/setup-build-essential b/tests.build/setup-build-essential index 8868db68..28847d76 100755 --- a/tests.build/setup-build-essential +++ b/tests.build/setup-build-essential @@ -17,6 +17,7 @@ # Set up a stratum which resembles Baserock's 'build-essential' slightly. Used # for testing 'morph cross-bootstrap' and the 'bootstrap' build mode. +# Add a mock compiler chunk. mkdir -p "$DATADIR/cc-repo" cd "$DATADIR/cc-repo" @@ -32,9 +33,6 @@ git commit -q -m "Create compiler chunk" cd "$DATADIR/morphs-repo" -# Require 'cc' in hello-chunk. We should have the second version available -# but *not* the first one. - cat <<EOF > "stage1-cc.morph" name: stage1-cc kind: chunk @@ -53,6 +51,11 @@ install-commands: - install -m 755 morph-test-cc "\$DESTDIR\$PREFIX/bin/morph-test-cc" EOF +git add cc.morph stage1-cc.morph +git commit -q -m "Add build instructions for mock compiler." + +# Require 'cc' in hello-chunk. We should have the second version available +# but *not* the first one. cat <<EOF > "hello.morph" name: hello kind: chunk @@ -76,6 +79,7 @@ name: build-essential kind: stratum chunks: - name: stage1-cc + morph: stage1-cc.morph repo: test:cc-repo ref: master morph: stage1-cc.morph @@ -83,6 +87,7 @@ chunks: build-mode: bootstrap prefix: /tools - name: cc + morph: cc.morph repo: test:cc-repo ref: master morph: cc.morph @@ -98,6 +103,7 @@ build-depends: - morph: build-essential chunks: - name: hello + morph: hello.morph repo: test:chunk-repo ref: farrokh morph: hello.morph |