summaryrefslogtreecommitdiff
path: root/tests.build/build-system-qmake.script
diff options
context:
space:
mode:
authorRichard Dale <richard.dale@codethink.co.uk>2013-05-21 11:11:04 +0100
committerRichard Dale <richard.dale@codethink.co.uk>2013-05-29 16:13:48 +0100
commit70f21759d03cfc930d26f8abac0d56a8279276b8 (patch)
tree54fd95dd8450536cc8c359498227c52ce5964a2d /tests.build/build-system-qmake.script
parent5a29d98c43fdb637947af893b8604b5d6adcd113 (diff)
downloadmorph-70f21759d03cfc930d26f8abac0d56a8279276b8.tar.gz
Add detection for cmake and qmake build systems
Add tests for cmake and qmake build systems
Diffstat (limited to 'tests.build/build-system-qmake.script')
-rwxr-xr-xtests.build/build-system-qmake.script61
1 files changed, 61 insertions, 0 deletions
diff --git a/tests.build/build-system-qmake.script b/tests.build/build-system-qmake.script
new file mode 100755
index 00000000..c9175b99
--- /dev/null
+++ b/tests.build/build-system-qmake.script
@@ -0,0 +1,61 @@
+#!/bin/sh
+#
+# Copyright (C) 2011-2013 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
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+
+## Convert the hello-chunk project to something qmake-like, then
+## build it.
+
+set -eu
+
+chunkrepo="$DATADIR/chunk-repo"
+cd "$chunkrepo"
+
+git checkout --quiet farrokh
+
+cat <<'EOF' >hello.pro
+TEMPLATE = app
+TARGET = hello
+DEPENDPATH += .
+INCLUDEPATH += .
+
+SOURCES += hello.c
+hello.path = /usr/bin
+hello.files = hello
+INSTALLS += hello
+EOF
+git add hello.pro
+
+cat <<EOF > hello.morph
+{
+ "name": "hello",
+ "kind": "chunk",
+ "build-system": "qmake",
+ "install-commands": ["make INSTALL_ROOT=\"\$DESTDIR\" install"]
+}
+EOF
+git add hello.morph
+git commit --quiet -m "Convert hello to an qmake project"
+
+"$SRCDIR/scripts/test-morph" build-morphology \
+ test:morphs-repo master hello-system
+
+for chunk in "$DATADIR/cache/artifacts/"*.chunk.*
+do
+ echo "$chunk:" | sed 's/[^.]*//'
+ tar -tf "$chunk" | LC_ALL=C sort | sed '/^\.\/./s:^\./::'
+ echo
+done