r35510 - in /desktop/experimental/pygobject/debian: changelog tests/build tests/control

mpitt at users.alioth.debian.org mpitt at users.alioth.debian.org
Wed Jul 4 13:32:43 UTC 2012


Author: mpitt
Date: Wed Jul  4 13:32:43 2012
New Revision: 35510

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=35510
Log:
Add debian/tests/build: Build and run a program against pygobject, to
verify that the headers and pkg-config file are installed correctly.

Added:
    desktop/experimental/pygobject/debian/tests/build   (with props)
Modified:
    desktop/experimental/pygobject/debian/changelog
    desktop/experimental/pygobject/debian/tests/control

Modified: desktop/experimental/pygobject/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/pygobject/debian/changelog?rev=35510&op=diff
==============================================================================
--- desktop/experimental/pygobject/debian/changelog [utf-8] (original)
+++ desktop/experimental/pygobject/debian/changelog [utf-8] Wed Jul  4 13:32:43 2012
@@ -2,6 +2,8 @@
 
   * Add debian/tests/: autopkgtest for using GI modules with Python 2 and 3.
   * debian/control.in: Add XS-Testsuite header as per current DEP-8.
+  * Add debian/tests/build: Build and run a program against pygobject, to
+    verify that the headers and pkg-config file are installed correctly.
 
  -- Martin Pitt <mpitt at debian.org>  Wed, 04 Jul 2012 13:36:12 +0200
 

Added: desktop/experimental/pygobject/debian/tests/build
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/pygobject/debian/tests/build?rev=35510&op=file
==============================================================================
--- desktop/experimental/pygobject/debian/tests/build (added)
+++ desktop/experimental/pygobject/debian/tests/build [utf-8] Wed Jul  4 13:32:43 2012
@@ -1,0 +1,32 @@
+#!/bin/sh
+# autopkgtest check: Build and run a program against pygobject, to verify that
+# the headers and pkg-config file are installed correctly
+# (C) 2012 Canonical Ltd.
+# Author: Martin Pitt <martin.pitt at ubuntu.com>
+
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+cat <<EOF > pytest.c
+#include <Python.h>
+#include <pygobject.h>
+#include <assert.h>
+
+int main()
+{
+    PyObject *gobject;
+
+    Py_InitializeEx (FALSE);
+    gobject = pygobject_init (-1, -1, -1);
+    assert (gobject != NULL);
+    return 0;
+}
+EOF
+
+gcc -o pytest pytest.c `pkg-config --cflags --libs python3 pygobject-3.0`
+echo "build: OK"
+[ -x pytest ]
+./pytest
+echo "run: OK"

Propchange: desktop/experimental/pygobject/debian/tests/build
------------------------------------------------------------------------------
    svn:executable = *

Modified: desktop/experimental/pygobject/debian/tests/control
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/pygobject/debian/tests/control?rev=35510&op=diff
==============================================================================
--- desktop/experimental/pygobject/debian/tests/control [utf-8] (original)
+++ desktop/experimental/pygobject/debian/tests/control [utf-8] Wed Jul  4 13:32:43 2012
@@ -1,2 +1,2 @@
-Tests: python2 python3
-Depends: python-gi, python3-gi, gir1.2-glib-2.0
+Tests: python2 python3 build
+Depends: python-gi, python3-gi, gir1.2-glib-2.0, python-gi-dev, python3-dev




More information about the pkg-gnome-commits mailing list