Skip to content

Commit

Permalink
ci: Add a context for testing flatpak
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cgwalters committed Apr 28, 2017
1 parent 838cbab commit 54e7e6d
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .redhat-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,23 @@ tests:

artifacts:
- test-suite.log

---

inherit: false
branches:
- master
- auto
- try

context: f25-flatpak
required: false

# This test case wants an "unprivileged container with bubblewrap",
# which we don't have right now; so just provision a VM and do a
# docker --privileged run.
host:
distro: fedora/25/atomic

tests:
- docker run --rm --privileged -v $(pwd):/srv/code registry.fedoraproject.org/fedora:25 /bin/sh -c "cd /srv/code && ./ci/flatpak.sh"
22 changes: 22 additions & 0 deletions ci/flatpak.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/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
}

# build+install ostree
build
sudo 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
build
make -j 8 check

0 comments on commit 54e7e6d

Please sign in to comment.