From bba1d9e9f17edf885e857d0ddcf5b6f41e956b10 Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Fri, 8 Aug 2014 11:10:25 +0000 Subject: cmdtests: Use YAML not JSON to represent morphologies --- tests/setup | 60 ++---- tests/show-dependencies.setup | 452 +++++++++++++++++------------------------- 2 files changed, 202 insertions(+), 310 deletions(-) (limited to 'tests') 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 < 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 < 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 < 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 < $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 < 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 < $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 < 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 < 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" -- cgit v1.2.1