Add an ostree-tests package, and use it for autopkgtest

This commit is contained in:
Simon McVittie 2016-01-29 11:23:42 +01:00
parent b63ecc385a
commit 7eee7ce2fe
7 changed files with 65 additions and 0 deletions

1
debian/changelog vendored
View File

@ -14,6 +14,7 @@ ostree (2016.1-1) UNRELEASED; urgency=medium
* Use dh_install --fail-missing to catch mistakes * Use dh_install --fail-missing to catch mistakes
* Add a symbols file * Add a symbols file
* Add missing dependency on libglib2.0-dev * Add missing dependency on libglib2.0-dev
* Add an ostree-tests package, and use it for autopkgtest
-- Simon McVittie <smcv@debian.org> Wed, 27 Jan 2016 13:04:34 +0100 -- Simon McVittie <smcv@debian.org> Wed, 27 Jan 2016 13:04:34 +0100

20
debian/control vendored
View File

@ -123,3 +123,23 @@ Description: GRUB 2 configuration for ostree
disadvantages) of both. disadvantages) of both.
. .
This package contains configuration snippets for using ostree with GRUB 2. This package contains configuration snippets for using ostree with GRUB 2.
Package: ostree-tests
Architecture: any
Depends:
${misc:Depends},
${shlibs:Depends},
attr,
ca-certificates,
gir1.2-gsystem-1.0,
gir1.2-ostree-1.0,
gjs,
ostree,
python,
Description: content-addressed filesystem for operating system binaries - tests
OSTree is a tool for managing bootable, immutable, versioned filesystem trees.
It is not a package system; nor is it a tool for managing full disk images.
Instead, it sits between those levels, offering a blend of the advantages (and
disadvantages) of both.
.
This package contains automated tests.

2
debian/ostree-tests.install vendored Normal file
View File

@ -0,0 +1,2 @@
usr/lib/*/ostree/installed-tests
usr/share/installed-tests/ostree

9
debian/rules vendored
View File

@ -15,11 +15,20 @@ override_dh_auto_configure:
dh_auto_configure -- \ dh_auto_configure -- \
--disable-silent-rules \ --disable-silent-rules \
--enable-gtk-doc \ --enable-gtk-doc \
--enable-installed-tests \
--with-dracut \ --with-dracut \
--with-grub2 \ --with-grub2 \
--with-systemdsystemunitdir=/lib/systemd/system \ --with-systemdsystemunitdir=/lib/systemd/system \
$(NULL) $(NULL)
chmod +x tests/*.js
override_dh_install: override_dh_install:
rm -f debian/tmp/usr/lib/*/*.la rm -f debian/tmp/usr/lib/*/*.la
rm -f debian/tmp/usr/lib/*/ostree/installed-tests/*.la
dh_install --fail-missing dh_install --fail-missing
override_dh_fixperms:
dh_fixperms -X'*.js'
chmod -v +x debian/tmp/usr/lib/*/ostree/installed-tests/*.js
chmod -v +x debian/tmp/usr/lib/*/ostree/installed-tests/*.py
chmod -v +x debian/tmp/usr/lib/*/ostree/installed-tests/*.sh

22
debian/tests/build vendored Executable file
View File

@ -0,0 +1,22 @@
#!/bin/sh
set -e
exec 2>&1
set -x
cd "$ADTTMP"
cat > trivial.c <<EOF
#include <ostree.h>
int main (void)
{
g_object_unref (ostree_repo_new_default ());
return 0;
}
EOF
gcc -o trivial trivial.c $(pkg-config --cflags --libs ostree-1 gobject-2.0)
test -x trivial
./trivial
echo "ok 3 run it"

5
debian/tests/control vendored Normal file
View File

@ -0,0 +1,5 @@
Tests: gnome-desktop-testing
Depends: gnome-desktop-testing, ostree-tests
Tests: build
Depends: build-essential, libostree-dev, pkg-config

6
debian/tests/gnome-desktop-testing vendored Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
set -e
exec 2>&1
exec gnome-desktop-testing-runner ostree