summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2017-04-28 09:32:35 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2017-04-28 19:56:48 +0000
commite60b9bc0492358d41e9646df608a40c3f6729f7c (patch)
tree2a62e4c94a70a0bb803466942e6ccca7dd7c3279 /ci
parent838cbab58593e1c94b158714e26cd6433717f32e (diff)
downloadostree-e60b9bc0492358d41e9646df608a40c3f6729f7c.tar.gz
ci: Add a context for testing flatpak
This was part of the philosophy behind https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests - libraries like libostree don't need to replicate everything in unit tests, we can use the tests from our dependencies directly too. We'll also get API break coverage testing too. Closes: #818 Approved by: jlebon
Diffstat (limited to 'ci')
-rwxr-xr-xci/flatpak.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/ci/flatpak.sh b/ci/flatpak.sh
new file mode 100755
index 00000000..f7edba3e
--- /dev/null
+++ b/ci/flatpak.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+# Build and run flatpak's unit tests using the just-built ostree for this PR.
+
+set -xeuo pipefail
+
+build() {
+ env NOCONFIGURE=1 ./autogen.sh
+ ./configure --prefix=/usr --libdir=/usr/lib64 "$@"
+ make -j 8
+}
+
+codedir=$(pwd)
+
+# Core prep
+dnf -y install dnf-plugins-core
+dnf install -y @buildsys-build
+dnf install -y 'dnf-command(builddep)'
+
+# build+install ostree
+dnf builddep -y ostree
+build
+make install
+tmpd=$(mktemp -d)
+cd ${tmpd}
+# Frozen to a tag for now on general principle
+git clone --recursive --depth=1 -b 0.9.3 https://github.com/flatpak/flatpak
+cd flatpak
+dnf builddep -y flatpak
+# And runtime deps
+dnf install -y flatpak && rpm -e flatpak
+dnf install which attr fuse parallel # for the test suite
+build
+# We want to capture automake results from flatpak
+cleanup() {
+ mv test-suite.log ${codedir} || true
+}
+trap cleanup EXIT
+make -j 8 check