summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2014-08-08 11:10:25 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2014-08-14 13:28:50 +0000
commitbba1d9e9f17edf885e857d0ddcf5b6f41e956b10 (patch)
treea5e5da0b1c02c7c39679d5d8fbba7599b71ab67b /tests
parenta87d850a3b96010dd272bba1624fcf0b230afc6d (diff)
downloadmorph-bba1d9e9f17edf885e857d0ddcf5b6f41e956b10.tar.gz
cmdtests: Use YAML not JSON to represent morphologies
Diffstat (limited to 'tests')
-rwxr-xr-xtests/setup60
-rwxr-xr-xtests/show-dependencies.setup452
2 files changed, 202 insertions, 310 deletions
diff --git a/tests/setup b/tests/setup
index 07643ddc..02ddb3af 100755
--- a/tests/setup
+++ b/tests/setup
@@ -10,7 +10,7 @@
# The stratum repository contains a single branch, "master", with a
# stratum and a system morphology that include the chunk above.
#
-# Copyright (C) 2011-2013 Codethink Limited
+# Copyright (C) 2011-2014 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -57,19 +57,15 @@ EOF
git add hello.c
cat <<EOF > hello.morph
-{
- "name": "hello",
- "kind": "chunk",
- "build-system": "dummy",
- "build-commands": [
- "gcc -o hello hello.c"
- ],
- "install-commands": [
- "install -d \\"\$DESTDIR\\"/etc",
- "install -d \\"\$DESTDIR\\"/bin",
- "install hello \\"\$DESTDIR\\"/bin/hello"
- ]
-}
+name: hello
+kind: chunk
+build-system: dummy
+build-commands:
+ - gcc -o hello hello.c
+install-commands:
+ - install -d "\$DESTDIR/etc"
+ - install -d "\$DESTDIR/bin"
+ - install hello "\$DESTDIR/bin/hello"
EOF
git add hello.morph
@@ -87,34 +83,22 @@ cd "$morphsrepo"
git init --quiet
cat <<EOF > hello-stratum.morph
-{
- "name": "hello-stratum",
- "kind": "stratum",
- "chunks": [
- {
- "name": "hello",
- "repo": "test:chunk-repo",
- "ref": "farrokh",
- "build-mode": "test",
- "build-depends": []
- }
- ]
-}
+name: hello-stratum
+kind: stratum
+chunks:
+ - name: hello
+ repo: test:chunk-repo
+ ref: farrokh
+ build-mode: test
+ build-depends: []
EOF
git add hello-stratum.morph
cat <<EOF > hello-system.morph
-{
- "name": "hello-system",
- "kind": "system",
- "strata": [
- {
- "morph": "hello-stratum",
- "repo": "test:morphs-repo",
- "ref": "master"
- }
- ]
-}
+name: hello-system
+kind: system
+strata:
+ - morph: hello-stratum
EOF
git add hello-system.morph
diff --git a/tests/show-dependencies.setup b/tests/show-dependencies.setup
index 510656e6..c99e90a9 100755
--- a/tests/show-dependencies.setup
+++ b/tests/show-dependencies.setup
@@ -42,18 +42,14 @@ gtkcomponents=(freetype fontconfig cairo pango glib gdk-pixbuf gtk
for component in "${gtkcomponents[@]}"
do
cat <<EOF > $component.morph
-{
- "name": "$component",
- "kind": "chunk",
- "build-commands": [
- "gcc -o hello hello.c"
- ],
- "install-commands": [
- "install -d \\"\$DESTDIR\\"/etc",
- "install -d \\"\$DESTDIR\\"/bin",
- "install hello \\"\$DESTDIR\\"/bin/$component"
- ]
-}
+name: $component
+kind: chunk
+build-commands:
+ - gcc -o hello hello.c
+install-commands:
+ - install -d "\$DESTDIR"/etc
+ - install -d "\$DESTDIR"/bin
+ - install hello "\$DESTDIR"/bin/$component
EOF
git add $component.morph
done
@@ -61,95 +57,64 @@ git commit --quiet -m "add .c source file and GTK chunk morphologies"
# Define a stratum for the GTK stack
cat <<EOF > gtk-stack.morph
-{
- "name": "gtk-stack",
- "kind": "stratum",
- "build-depends": [
- ],
- "chunks": [
- {
- "name": "freetype",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- ]
- },
- {
- "name": "fontconfig",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- ]
- },
- {
- "name": "cairo",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- ]
- },
- {
- "name": "pango",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- "freetype",
- "fontconfig"
- ]
- },
- {
- "name": "glib",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- ]
- },
- {
- "name": "gdk-pixbuf",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- "glib"
- ]
- },
- {
- "name": "gtk",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- "cairo",
- "gdk-pixbuf",
- "glib",
- "pango"
- ]
- },
- {
- "name": "dbus",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- ]
- },
- {
- "name": "dbus-glib",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- "dbus",
- "glib"
- ]
- }
- ]
-}
+name: gtk-stack
+kind: stratum
+build-depends: []
+chunks:
+ - name: freetype
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends: []
+ - name: fontconfig
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends: []
+ - name: cairo
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends: []
+ - name: pango
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends:
+ - freetype
+ - fontconfig
+ - name: glib
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends: []
+ - name: gdk-pixbuf
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends:
+ - glib
+ - name: gtk
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends:
+ - cairo
+ - gdk-pixbuf
+ - glib
+ - pango
+ - name: dbus
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends: []
+ - name: dbus-glib
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends:
+ - dbus
+ - glib
EOF
git add gtk-stack.morph
git commit --quiet -m "add gtk-stack.morph stratum"
@@ -172,18 +137,14 @@ xfcecomponents=(xfce4-dev-tools libxfce4util libxfce4ui exo xfconf garcon
for component in "${xfcecomponents[@]}"
do
cat <<EOF > $component.morph
-{
- "name": "$component",
- "kind": "chunk",
- "build-commands": [
- "gcc -o hello hello.c"
- ],
- "install-commands": [
- "install -d \\"\$DESTDIR\\"/etc",
- "install -d \\"\$DESTDIR\\"/bin",
- "install hello \\"\$DESTDIR\\"/bin/$component"
- ]
-}
+name: $component
+kind: chunk
+build-commands:
+ - gcc -o hello hello.c
+install-commands:
+ - install -d "\$DESTDIR"/etc
+ - install -d "\$DESTDIR"/bin
+ - install hello "\$DESTDIR"/bin/$component
EOF
git add $component.morph
done
@@ -191,170 +152,117 @@ git commit --quiet -m "add .c source file and GTK chunk morphologies"
# Define a stratum for the Xfce core
cat <<EOF > xfce-core.morph
-{
- "name": "xfce-core",
- "kind": "stratum",
- "build-depends": [
- {
- "morph": "gtk-stack",
- }
- ],
- "chunks": [
- {
- "name": "libxfce4util",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- ]
- },
- {
- "name": "xfconf",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- "libxfce4util"
- ]
- },
- {
- "name": "libxfce4ui",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- "xfconf"
- ]
- },
- {
- "name": "exo",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- "libxfce4util"
- ]
- },
- {
- "name": "garcon",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- "libxfce4util"
- ]
- },
- {
- "name": "thunar",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- "libxfce4ui",
- "exo"
- ]
- },
- {
- "name": "tumbler",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- ]
- },
- {
- "name": "xfce4-panel",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- "libxfce4ui",
- "exo",
- "garcon"
- ]
- },
- {
- "name": "xfce4-settings",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- "libxfce4ui",
- "exo",
- "xfconf"
- ]
- },
- {
- "name": "xfce4-session",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- "libxfce4ui",
- "exo",
- "xfconf"
- ]
- },
- {
- "name": "xfwm4",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- "libxfce4ui",
- "xfconf"
- ]
- },
- {
- "name": "xfdesktop",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- "libxfce4ui",
- "xfconf"
- ]
- },
- {
- "name": "xfce4-appfinder",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- "libxfce4ui",
- "garcon",
- "xfconf"
- ]
- },
- {
- "name": "gtk-xfce-engine",
- "repo": "test:test-repo",
- "ref": "master",
- "build-mode": "test",
- "build-depends": [
- "libxfce4ui",
- "garcon",
- "xfconf"
- ]
- }
- ]
-}
+name: xfce-core
+kind: stratum
+build-depends:
+ - morph: gtk-stack
+chunks:
+ - name: libxfce4util
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends: []
+ - name: xfconf
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends:
+ - libxfce4util
+ - name: libxfce4ui
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends:
+ - xfconf
+ - name: exo
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends:
+ - libxfce4util
+ - name: garcon
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends:
+ - libxfce4util
+ - name: thunar
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends:
+ - libxfce4ui
+ - exo
+ - name: tumbler
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends: []
+ - name: xfce4-panel
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends:
+ - libxfce4ui
+ - exo
+ - garcon
+ - name: xfce4-settings
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends:
+ - libxfce4ui
+ - exo
+ - xfconf
+ - name: xfce4-session
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends:
+ - libxfce4ui
+ - exo
+ - xfconf
+ - name: xfwm4
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends:
+ - libxfce4ui
+ - xfconf
+ - name: xfdesktop
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends:
+ - libxfce4ui
+ - xfconf
+ - name: xfce4-appfinder
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends:
+ - libxfce4ui
+ - garcon
+ - xfconf
+ - name: gtk-xfce-engine
+ repo: test:test-repo
+ ref: master
+ build-mode: test
+ build-depends:
+ - libxfce4ui
+ - garcon
+ - xfconf
EOF
git add xfce-core.morph
git commit --quiet -m "add xfce-core.morph stratum"
cat <<EOF > xfce-system.morph
-{
- "name": "xfce-system",
- "kind": "system",
- "arch": "$("$SRCDIR/scripts/test-morph" print-architecture)",
- "strata": [
- {
- "build-mode": "test",
- "morph": "xfce-core"
- }
- ]
-}
+name: xfce-system
+kind: system
+arch: $("$SRCDIR/scripts/test-morph" print-architecture)
+strata:
+ - build-mode: test
+ morph: xfce-core
EOF
git add xfce-system.morph
git commit --quiet -m "add xfce-system"