Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Every so-often, the server doesn't terminate fast enough and we fail the
test. Put a wait loop in.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
export XORG_GTEST_USE_VALGRIND="valgrind --leak-check=full"
./run-some-test
But really, can be used with any wrapper binary. Given that valgrind is the
main use-case here, keep the USE_VALGRIND naming instead of something more
generic like USE_PROCESS_WRAPPER or so.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Need to actually use X11_CFLAGS and EVEMU_CFLAGS in CPPFLAGS, CXXFLAGS
(and presumably CFLAGS if that were relevant).
Also must search local directories before system directories for our
header files, otherwise installed versions will override local
versions which would be bad.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Xlib's default error handler prints the error and calls exit(1). Tests that
accidentally trigger an error thus quit without cleaning up properly.
Install a default error handler that prints the basic info and continue with
the test. Clients that expect to trigger errors should set a custom error
handler.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
|
|
make distcheck fails since the tests are not run from the test/ directory
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Fixes distcheck
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
/tmp is fine in most cases, but make it configurable through a configure
option
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This was moved out of the Environment when the XServer class was added, but
it really doesn't belong there. Users of XServer should set custom config
and log file paths (if any) directly instead of having to undo the
libraries' defaults.
Move it back into the environment to avoid breaking users of that, but
really, this shouldn't even be in the environment either but rather in the caller
that needs those defaults.
Also move default path and display settings. Note that these are the same
defaults in the environment and in the server.
Since we can't rely on -displayfd yet, I'll leave the default display in
XServer to ensure the server always starts up (:133 is not likely to be in
use) and to auto-compose the display string for XOpenDisplay().
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Allow removing an option from the command list too.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Otherwise the child will continue to run tests in parallel with the parent,
causing conflicts.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
If set, XServer will ignore Terminate() and Kill() requests, and will not
die if the parent process dies. This enables a user to hook up gdb to a
server, wait for the test case to trigger some code in the server and
continue debugging from there, without the test case terminating the server.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
|
|
Process::Start() will fork() and execvp() the child process. For use-cases
where the child process must have specific signal masks or other properties
before the execvp() call this is unfeasable, the caller cannot control the
properties of the child between forking and execvp.
Split the fork() call out into Process::Fork(), making it optional. Start()
will fork on demand if it hasn't been called before. Behaviour stays the
same for callers of Start(), only those that call Fork() first need to pay
attention to details.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
|
|
Conflicts:
test/xserver-test.cpp
|
|
Once a server is started, set the X IO error handler to throw an exception.
This way our test cases will survive a server crash and googletest will just
continue with the next test case instead of exiting the process completely.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Don't rely on the caller to set up the mask correctly, modify its current
mask to include the hierarchy mask and then un-do that modification (if
needed)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
|
|
With the SIGUSR1 patch, an XOpenDisplay() after XServer::Start() should
always succeed.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
|
|
Termination can have different meaning for a process, rename the test cases
to be more explicit
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
|
|
Drop the CHECK_GTEST macro, we can assume it's there now. We
still build the gtest bits as convenience libraries, leave the various flags
in there.
Add $includedir/xorg to pgkconfig CPPFLAGS, as we install gtest.h in
includedir/xorg/gtest/gtest.h to avoid overwriting or conflicts with a
system-installed gtest.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
|
|
uinput can be too slow, leaving us with GuessDeviceNode() failing and an
empty device string. Use inotify to tell us when a /dev/input/event device
appeared and then continue. However, even when inotify tells us the device
is there, the EVIOCGNAME may still fail on the device, so we need to keep
the backup GuessDeviceNode() in place.
This leaves us with a race condition - if a different device pops up while
we're waiting, then we may still not get the device name. Chance of that
happening is tiny.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
It's annoying to have the forked X server linger around when the test
segfaults, so make sure we take it down with us.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|