Commit 3627b194 authored by Peter Hutterer's avatar Peter Hutterer
Browse files

Unconditionally require evemu



This condition was introduced when evemu was a new project and not available
everywhere. That hasn't been true for years anymore, let's just make this
unconditional and drop some of the ifdefs.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent d0847fc2
......@@ -61,7 +61,7 @@ AC_DEFUN([CHECK_XORG_GTEST],
[have_xorg_gtest_evemu=yes],
[have_xorg_gtest_evemu=no])])
AS_IF([test "x$have_xorg_gtest_evemu" = xyes],
[XORG_GTEST_CPPFLAGS="$XORG_GTEST_CPPFLAGS -DHAVE_EVEMU"])
[XORG_GTEST_CPPFLAGS="$XORG_GTEST_CPPFLAGS"])
AS_IF([test "x$have_xorg_gtest" = xyes],
[AC_SUBST(GTEST_SOURCE)]
......
......@@ -26,27 +26,14 @@ XORG_ENABLE_INTEGRATION_TESTS([yes])
XORG_WITH_DOXYGEN
PKG_CHECK_MODULES(X11, x11 xi)
PKG_CHECK_MODULES(EVEMU, evemu)
AC_ARG_WITH(logfile-dir, [AS_HELP_STRING([--with-logfile-dir=/tmp]),
[Base path for log files used as defaults and during tests (default: /tmp)]],
[LOGFILE_DIR="$withval"], [LOGFILE_DIR="/tmp"])
AC_DEFINE_DIR(LOGFILE_DIR, LOGFILE_DIR, [Log file path])
AC_SUBST(DUMMY_CONF_PATH, ['${LOGFILE_DIR}'])
# Check if we should include support for evemu
AC_ARG_WITH([evemu],
[AS_HELP_STRING([--with-evemu],
[support Linux input device recording playback (default: enabled if available)])],
[],
[with_evemu=check])
PKG_CHECK_MODULES(EVEMU, [evemu >= 1.0.10] , [have_evemu=yes], [have_evemu=no])
AS_IF([test "x$with_evemu" == xyes && test "x$have_evemu" != xyes],
AC_MSG_ERROR([package 'evemu' not found]))
AM_CONDITIONAL([HAVE_EVEMU], [test "x$have_evemu" = "xyes"])
AS_IF([test "x$have_evemu" = xyes], [AC_DEFINE([HAVE_EVEMU])])
AC_SUBST(SOURCEDIR, ['${prefix}/src/xorg-gtest'])
AC_SUBST(DUMMY_CONF_PATH, ['${datarootdir}/xorg/gtest/dummy.conf'])
......
......@@ -32,10 +32,7 @@
#include "xorg-gtest-process.h"
#include "xorg-gtest-xserver.h"
#include "xorg-gtest-test.h"
#ifdef HAVE_EVEMU
#include "evemu/xorg-gtest-device.h"
#endif
#define XORG_TESTCASE(message) \
SCOPED_TRACE("\n::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\n" \
......
......@@ -29,7 +29,4 @@
#include "src/process.cpp"
#include "src/xserver.cpp"
#include "src/test.cpp"
#ifdef HAVE_EVEMU
#include "src/device.cpp"
#endif
#include <gtest/gtest.h>
#include <xorg/gtest/xorg-gtest.h>
#ifdef HAVE_EVEMU
#ifndef BTN_TOOL_QUINTTAP
#define BTN_TOOL_QUINTTAP 0x148
#endif
......@@ -190,9 +189,6 @@ TEST(Device, AbsAxisData) {
}
}
#endif
int main(int argc, char *argv[]) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
......
......@@ -166,7 +166,6 @@ TEST(XServer, WaitForDeviceEventMask)
delete m.mask;
}
#ifdef HAVE_EVEMU
TEST(XServer, WaitForExistingDevice)
{
XORG_TESTCASE("WaitForDevice() returns true for already existing device");
......@@ -202,7 +201,6 @@ TEST(XServer, WaitForNewDevice)
ASSERT_TRUE(XServer::WaitForDevice(dpy, "PIXART USB OPTICAL MOUSE", 1000));
}
#endif
TEST(XServer, IOErrorException)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment