aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/test/xi2/protocol-common.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-10-12 21:11:32 +0200
committermarha <marha@users.sourceforge.net>2014-10-12 21:38:35 +0200
commit1a83b8e49a75e2dab63805de25e384e0e38c27ed (patch)
tree5280fe2a1bd2ce227e4bce9ce06134986e181de1 /xorg-server/test/xi2/protocol-common.c
parent4aea4b223604c589828beb1145875a5fbcc41eed (diff)
parent9480392b8817f8bfa79cbc694ff039a73fc0a57f (diff)
downloadvcxsrv-1a83b8e49a75e2dab63805de25e384e0e38c27ed.tar.gz
vcxsrv-1a83b8e49a75e2dab63805de25e384e0e38c27ed.tar.bz2
vcxsrv-1a83b8e49a75e2dab63805de25e384e0e38c27ed.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/glsl/glsl_symbol_table.h mesalib/src/mesa/drivers/common/meta_blit.c xorg-server/dix/dispatch.c xorg-server/glx/indirect_dispatch.c xorg-server/glx/indirect_dispatch_swap.c xorg-server/mi/miexpose.c
Diffstat (limited to 'xorg-server/test/xi2/protocol-common.c')
-rw-r--r--xorg-server/test/xi2/protocol-common.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/xorg-server/test/xi2/protocol-common.c b/xorg-server/test/xi2/protocol-common.c
index 9a429e49f..9265ba390 100644
--- a/xorg-server/test/xi2/protocol-common.c
+++ b/xorg-server/test/xi2/protocol-common.c
@@ -25,6 +25,7 @@
#include <dix-config.h>
#endif
+#include <errno.h>
#include <stdint.h>
#include "extinit.h" /* for XInputExtensionInit */
#include "exglobals.h"
@@ -137,6 +138,18 @@ init_devices(void)
{
ClientRec client;
struct devices local_devices;
+ int ret;
+
+ /*
+ * Put a unique name in display pointer so that when tests are run in
+ * parallel, their xkbcomp outputs to /tmp/server-<display>.xkm don't
+ * stomp on each other.
+ */
+#ifdef HAVE_GETPROGNAME
+ display = getprogname();
+#elif HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+ display = program_invocation_short_name;
+#endif
client = init_client(0, NULL);
@@ -145,15 +158,20 @@ init_devices(void)
inputInfo.pointer = local_devices.vcp;
inputInfo.keyboard = local_devices.vck;
- ActivateDevice(local_devices.vcp, FALSE);
- ActivateDevice(local_devices.vck, FALSE);
+ ret = ActivateDevice(local_devices.vcp, FALSE);
+ assert(ret == Success);
+ /* This may fail if xkbcomp fails or xkb-config is not found. */
+ ret = ActivateDevice(local_devices.vck, FALSE);
+ assert(ret == Success);
EnableDevice(local_devices.vcp, FALSE);
EnableDevice(local_devices.vck, FALSE);
AllocDevicePair(&client, "", &local_devices.mouse, &local_devices.kbd,
TestPointerProc, CoreKeyboardProc, FALSE);
- ActivateDevice(local_devices.mouse, FALSE);
- ActivateDevice(local_devices.kbd, FALSE);
+ ret = ActivateDevice(local_devices.mouse, FALSE);
+ assert(ret == Success);
+ ret = ActivateDevice(local_devices.kbd, FALSE);
+ assert(ret == Success);
EnableDevice(local_devices.mouse, FALSE);
EnableDevice(local_devices.kbd, FALSE);