summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2013-11-03uterm: input: use shl_llog instead of shl_logDavid Herrmann2-2/+3
We should use library-logging in uterm to avoid cluttering stderr for applications. Hence, use llog instead of log directly. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-03-12kmscon: add --xkb-keymap option for predefined keymapsRan Benita2-2/+17
This adds an --xkb-keymap <FILE> option to kmscon. When given, kmscon will try to compile the keymap from the file before trying the other options (like the XkbKeymap option in xorg.conf). This is useful for users who have a customized XKB keymap, which is usually kept in a single file. Example, in X: xkbcomp $DISPLAY my_keymap.xkb Customize my_keymap.xkb to your liking, and then in .xinitrc, or xorg.conf: xkbcomp my_keymap.xkb $DISPLAY Now you can also do this in kmscon.conf. Additionally, lacking such an option, kmscon is quite difficult to use without an installed xkeyboard-config package, which provides the infrastructure for the "rules" configuration mechanism. We might even want to distribute some plain xkb file as a last ditch, for robustness, if even the default RMLVO fails... without a keyboard a terminal is not very useful. (changed Ran's patch to use *_from_string() instead of *_from_file()) Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-03-04tests: use new shl_log.hDavid Herrmann4-4/+4
log.h was moved to shl so use it in all tests. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-02-16tests: fix compilation with new eloop APIDavid Herrmann1-1/+1
We added llog-data pointers so fix the tests helpers to set it to NULL by default. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-24uterm: drm: rename to drm3dDavid Herrmann1-2/+2
This renames the video-drm backend to drm3d (which was already used internally). This is a pure rename, the code-logic stays the same. This also puts the drm3d backend into a module so we can more easily load it during runtime. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-24uterm: rename drm-dumb backend into drm2d moduleDavid Herrmann1-2/+2
This moves all the drm-dumb code into a new module that is now called drm2d (which was already used internally before). No conceptual changes, just renames and moves. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-13uterm: video: add support for immediate buffer-swapsDavid Herrmann1-1/+1
Internally, we already support immediate buffer-swaps but this hasn't been exported in the API. This patch adds an "immediate" argument that causes the flip to be immediate and not synchronized with vertical-blanks. Please note that this might block if there is a pending page-flip. However, this is mostly a delay of 16ms so we can ignore it as this is acceptable if you want immediate swaps while there is still a pending-buffer. You can listen for the UTERM_PAGE_FLIP event if you don't want this behavior. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-12tests: fix build with new uterm headersDavid Herrmann3-7/+9
These tests still use uterm.h which builds fine if you have an old uterm version installed, however, with a new version this will fail horribly. Hence, fix them to use the new headers. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-12-06kmscon: run only on VT-less seats in listen-modeDavid Herrmann1-1/+2
If we run in listen mode, we are supposed to take over a seat. If a seat supports VTs (like kernel VTs or kmscon cdev fake VTs) we assume that there is some manager for these VTs (the one who created them). Therefore, there is no need to run kmscon in listen mode on these seats. Instead, you should run kmscon in default mode on these seats. We enforce this limitation because if the VT-master on those seats dies and causes a HUP, they have no way to notify us when they startup again. Therefore, this kind of setup is broken. Furthermore, no-one would every want such setups. Instead use the startup mechanism of the VT/seat-manager to start kmscon in default mode on those seats. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-11-26test_output: use uterm_display directlyDavid Herrmann1-14/+6
uterm_screen is scheduled for removal so use the display API directly. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-11-11test_vt: add --switchvt optionDavid Herrmann1-9/+16
This has the same effect as for kmscon but is disabled by default. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-11-11test_vt: add --vt=<path> optionDavid Herrmann1-3/+9
This new option allows specifying a path to the VT that should be used. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-11-11test_vt: remove trailing newline in log-messageDavid Herrmann1-1/+1
The log-subsystem adds these automatically so we shouldn't use them. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-11-11test_vt: use a dummy input-objectDavid Herrmann1-3/+12
We cannot allocate VT objects without an associated input object. Therefore, allocate a dummy device with no input devices assigned to it and use it for the test-vt object. Note that this makes switching from/to this VT via command-line impossible. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-27kmscon: add --xkb-model optionDavid Herrmann1-0/+4
This option now allows the user to change the XkbModel from the command line or configuration file. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-27build: fix "make check" build failuresDavid Herrmann3-14/+20
I forgot again to keep these up to date. The conf-layer updates broke them horribly. However, we now build them correctly without kmscon-core by including all required layers directly. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-27xkb: use system defaults instead of "us" for layoutRan Benita1-2/+2
libxkbcommon has a configure option to set the default values for the RMLVO's (if they are passed as NULL or "" - we use "" so it'd be safe to print). If they are not specified there, it's just "us" like we currently do have. But if they are specified, we should most likely defer to it. We do the same for the model field, instead of hardcoding "evdev". The rules field remains hardcoded to "evdev", because we rely on it when doing the evdev scancode-to-keycode +8 mapping. Signed-off-by: Ran Benita <ran234@gmail.com> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-09test_input: fix using XKB directlyDavid Herrmann1-6/+8
We removed a lot of helpers from uterm-input because XKB is now a mandatory dependency. So use it directly from test_input to avoid all the uterm helpers. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-10-01test_input: fix compilation with changed input APIDavid Herrmann1-10/+4
We dropped unused modifiers so we have to fix test_input not to print them out. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-30kmscon: allow paths with --vt=<xy>David Herrmann1-2/+1
The getty variants out there (including agetty) require an relative path to the /dev directory as argument. This is really odd but we want to be backwards-compatible to them so we allow this, too. --vt now accepts: * A positive number which is internally converted into /dev/ttyXY * A string that does not start with '/' or '.' which is interpreted relative to /dev as /dev/%s * Everything else is interpreted as path This option still selects only the TTY on seat0. On all other seats we do not use controlling TTYs. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-30test_vt: fix compilation with new allocation APIDavid Herrmann1-1/+2
We changed the uterm API so we need to fix this test again. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-09-20test_key: add small helper for client-side key-inputDavid Herrmann1-0/+78
We sometimes need to test what keys a client receives when specific keys are pressed. This small helper simply runs in a terminal and receives raw keyboard input and prints it to stdout with debugging information. This can definitely be improved with the help of the TSM state-machine to print more useful information and directly parse the input. However, this is better than nothing. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-29test_vt: fix using correct uterm APIDavid Herrmann1-1/+1
This still uses the old VT API which now fails as we added a new parameter. As a side-effect, this test will not work if used on a VT-less system or on a seat without VTs. But we actually don't care, yet, as any other VT-replacement isn't really production-ready, yet. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-12test_output: add --dev parameterDavid Herrmann1-1/+7
The --dev parameter is used to specify the device that is used for testing. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11tests: make all tests use the new conf-parsersDavid Herrmann4-29/+236
This allows the tests to have their own command-line parsers. Finally! Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-08-11test_output: always use blitting backendDavid Herrmann1-96/+1
This removes the currently non-working OpenGL test and always uses the blitting functions. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-07-31test_output: add blitting supportDavid Herrmann1-9/+91
When opengl rendering is not available on the target device, we now fall back to software rendering. Instead of drawing a nice gradient we now draw a white screen to the target device to avoid heavy calculations. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-07-31test_input: fix compilation for kbd_keysym_to_string()David Herrmann1-3/+1
Since we moved to a runtime backend system for the input subsystem, we cannot access the internal keysym_to_string() helpers anymore. Hence, use the recently introduced uterm-input forwarding helper. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-07-07tests: fix tests to compile againDavid Herrmann1-1/+1
Whoops, I totally forgot about them. Fix the headers to be compatible with eloop again. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-27test_input: always print keysymDavid Herrmann1-5/+4
Print keysym even if we have a UCS4 representation. This makes debugging keyboard issues much easier. Also increase buffer size to 32 as there are many symbols longer than 16 characters. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-26kbd: remove "dev" from kbd_dev_keysym_to_stringRan Benita1-2/+2
Both dumb and xkb don't actually need the kbd_dev for that. The dumb backend already omits the "dev". Signed-off-by: Ran Benita <ran234@gmail.com> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-26test_vt: use new uterm vt masterDavid Herrmann1-9/+11
Use uterm vt master to allocate an VT on seat0 for testing purposes. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-17test_output: explicitely activate GL contextDavid Herrmann1-0/+4
We now support multiple GL contexts in uterm so we need to explicitely enable them before using them. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05test_output: fix build failureDavid Herrmann1-1/+1
Use new uterm_video constructor. This requires hard-coding the DRM card but this is needed until we use the uterm_monitor interface. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-05-05test_input: use new input APIDavid Herrmann1-43/+66
Use new uterm_monitor and input API instead. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22test_input: use new test_include.h infrastructureDavid Herrmann1-50/+27
test_input compiles again and uses the same helpers as the other tests do. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22tests: remove unneeded testsDavid Herrmann2-451/+0
test_buffer and test_terminal no longer compile and are not needed so remove them. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22test_vt: use new test_include.h codeDavid Herrmann1-44/+18
test_vt now compiles again and uses the new infrastructure. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-22test_console: removeDavid Herrmann1-345/+0
This test doesn't compile and is no longer needed. We can now use the kmscon program or test_terminal for the same functionality. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-14test_output: always enable all outputsDavid Herrmann1-28/+15
Instead of accepting a list of outputs we now enable all outputs when testing the video subsystem. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-14test_output: run eloop for 5s instead of sleep()David Herrmann1-2/+4
The new eloop implementation allows to run the eloop for a fixed amount of time. Use this instead of sleeping for 5s which would prevent us from catching signals as the eloop blocks them in favor of signalfd. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-14test_output: use new test_include.h headerDavid Herrmann2-12/+108
The test_include.h header now provides the basic initialization that will later be used in all other tests. This allows us to use the same program-parameters that kmscon uses and makes sure everything is initialized properly before we run the tests. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-04-14test_output: remove signal handlerDavid Herrmann1-11/+0
It will be replaced by the event loop signal handler. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-03-29unicode: use static global symbol tableDavid Herrmann1-12/+4
A symbol table should never be created twice therefore we can make it static and global. We add locks so it is totally thread-safe, too. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-03-24test_terminal: parse command line argumentsDavid Herrmann1-0/+3
Parse command line arguments so the input subsystem recognizes the XKB values. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-03-23vt: fix callback enum typeDavid Herrmann2-2/+6
We should use the enum type instead of plain "int" to be more verbose here. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-03-23Move to new uterm infrastructureDavid Herrmann2-57/+55
This fixes all compositor/output/context/etc. uses and replaces them by the new uterm API. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-03-23test_output: use new uterm/log/etc. subsystemsDavid Herrmann1-68/+94
Convert the test_output test to use the new subsystems. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-03-20eloop: move prefix to "ev_" instead of "kmscon_"David Herrmann4-59/+59
The long "kmscon_" prefix is horrible so move everything to "ev_" now. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-03-20build: implicitly include config.hRan Benita1-2/+0
config.h is meant to be around in all files, as it contains stuff like _GNU_SOURCE, NDEBUG and HAVE_*. Make these definitions available without needing to #include config.h every single time. Signed-off-by: Ran Benita <ran234@gmail.com> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>