From 88e29e90485a1fc183f6448e0e2de2d33bf3763a Mon Sep 17 00:00:00 2001
From: Julien Cristau <jcristau@debian.org>
Date: Mon, 10 Feb 2014 20:22:10 +0100
Subject: [PATCH] Run tests under Xvfb.

---
 debian/changelog | 6 ++++++
 debian/control   | 7 ++++++-
 debian/rules     | 4 ++--
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 8368896..c7cf7de 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libepoxy (1.1-2) UNRELEASED; urgency=medium
+
+  * Run tests under Xvfb.
+
+ -- Julien Cristau <jcristau@debian.org>  Fri, 07 Feb 2014 22:21:17 +0100
+
 libepoxy (1.1-1) unstable; urgency=low
 
   * Initial release (Closes: #737273)
diff --git a/debian/control b/debian/control
index aa7d096..625c94a 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,12 @@ Build-Depends: debhelper (>= 9),
                pkg-config,
                libx11-dev,
                libegl1-mesa-dev,
-               python
+               libgl1-mesa-dev,
+               libgles2-mesa,
+               python,
+               xvfb,
+               xauth,
+               libgles1-mesa,
 Standards-Version: 3.9.5
 Section: libs
 Homepage: https://github.com/anholt/libepoxy
diff --git a/debian/rules b/debian/rules
index a256756..c9b3471 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,6 +5,6 @@
 %:
 	dh $@ --with autoreconf
 
-# Running make check is unsuitable because the tests require a working
-# X environment currently, so we disable dh_auto_test.
+# Run the tests under a 24-bit Xvfb
 override_dh_auto_test:
+	xvfb-run -s '-screen 0 640x480x24' -a dh_auto_test -- VERBOSE=1
-- 
1.8.5.3

