Commit Graph

79 Commits

Author SHA1 Message Date
Tony Crisci 9b03be644f Add valgrind suppression file to testcases
The suppression file makes valgrind output more readable by hiding
reports of memory leaks for GObject-related initialization functions in
Pango and Cairo.
2014-03-10 17:37:41 +01:00
Michael Stapelberg 6800524f2e GET_TREE: serialize container type into a string
So far, this was blessed for internal use only (by virtue of not being
in the documentation), but we want to expose it for the stored layouts.
2013-12-22 21:52:49 +01:00
Tony Crisci 1b640ae3be Testcases: init pointer in a predictable position
Tests may disturb the pointer in their normal operation that may lead to
unexpected results in later tests using that display. Reset the pointer
before a test begins to (0, 0) to save test developers from related
"gotchas" and reduce multi-monitor test boilerplate.
2013-12-04 19:51:05 +01:00
Tony Crisci f9d8a1b4d6 Testcases: ignore Xorg config dir when starting Xdummy
Start Xdummy with '-configdir /dev/null' to avoid conflicting settings
in xorg.conf.d.
2013-10-13 17:17:54 +02:00
Michael Stapelberg d6b1f1a1b2 i3test: get rid of the smartmatch operator, it’s experimental since perl 5.18 2013-09-24 06:35:51 +02:00
Michael Stapelberg 80e7d2d346 lib/i3test: clarify how to identify open_window() windows in i3 commands (Thanks vandannen) 2013-06-08 12:49:02 +02:00
Michael Stapelberg 7f0065e1b1 tests: unset $ENV{SHELL} to avoid breakage with fish (Thanks dRbiG) 2013-02-15 16:41:28 +01:00
Michael Stapelberg a1774e78fc i3test: fix get_focused() docs (Thanks knopwob) 2013-02-07 15:57:15 +01:00
Quentin Glidic 783fd66b58 complete-run: Unset I3SOCK 2012-11-07 13:40:51 +01:00
Michael Stapelberg d745b47269 fix typo 2012-09-10 14:08:52 +02:00
Michael Stapelberg 71607ccdd3 tests: document each and every i3test function 2012-09-10 13:30:47 +02:00
Michael Stapelberg 0626c637aa tests: move does_i3_live to i3test::Test 2012-09-10 13:29:50 +02:00
Michael Stapelberg 6bfbec9da3 tests: make cmp_float a real test instruction 2012-09-10 13:24:11 +02:00
Michael Stapelberg 232d6ccce9 tests: introduce is_num_children test
This makes it clearer what the tests are actually doing and kills quite
a bit of useless repetitions
2012-09-04 22:24:13 +02:00
Michael Stapelberg 6e75dc7e0e testsuite: add hint about missing DUMMY Xorg module 2012-08-22 17:22:20 +02:00
Michael Stapelberg be6190a516 complete-run: check whether Xdummy dies, add a flag to keep the Xdummy output 2012-08-18 16:27:00 +02:00
Michael Stapelberg ae88accf6f testworker: handle EAGAIN
Hopefully this fixes the case where a testworker would die and leave the
whole testsuite run hanging in the air, never completing.
2012-08-12 00:22:17 +02:00
Michael Stapelberg 077e021e26 tests: implement --xtrace in complete-run.pl 2012-08-04 03:12:06 +02:00
Pavel Löbl 8557b05a2c t/141-resize.t: do not compare float values directly. use i3test.pm::cmp_float which compares using precision of 1e-6. 2012-05-05 19:15:43 +02:00
Michael Stapelberg 0f10ccdf12 Implement fake-outputs option (cmdline, cfg) for multi-monitor testing
This kills the dependency on xdmx and makes the testsuite simpler
and more flexible (in the output sizes / configurations).
2012-04-09 14:28:36 +02:00
Michael Stapelberg 941267e98e testsuite: explicitly start Xdummy with -nolisten tcp 2012-03-26 17:00:44 +02:00
Michael Stapelberg d085e88d02 t/158-wm_take_focus: use sync_with_i3 instead of a timeout 2012-02-21 14:37:55 +01:00
Michael Stapelberg 41400d8a16 t/164-kill-win-vs-client: get rid of sleep()s 2012-02-21 14:28:37 +01:00
Michael Stapelberg e114b3dba2 Refactor the interface of commands.c
This change has two implications:

1) tree_render() will now be called precisely once for input which consists of
   multiple commands (like "focus left; focus right"). Also, the caller of
   parse_command() has to call it. This makes us able to fix tickets such as
   ticket #608 (where multiple tree_render() calls are noticable).

2) The output of a command is now a JSON array of return values of the
   individual subcommands. In the case of "focus left; focus right", this is:

   [{"success":true}, {"success":true}]

   While this is incompatible with what i3 returned before, the return value of
   commands was undocumented and therefore not subject to our API stability.
2012-02-15 20:57:25 +00:00
Michael Stapelberg efa1cada29 tests: Make i3 create its temporary files in /tmp/i3-testsuite
This behavior can be avoided by passing dont_create_temp_dir => 1 to
launch_with_config (or activate_i3).

This commit fixes t/159-socketpaths.t being flaky on non-systemd computers.
2012-02-07 17:38:45 -05:00
Michael Stapelberg d22458cde0 complete-run: make --valgrind, --strace, --coverage-testing work again 2012-01-27 21:36:40 +00:00
Michael Stapelberg 318d4fdeef make in-place restarts use socket activation, too (for faster/less flaky tests) 2012-01-21 23:03:09 +00:00
Michael Stapelberg 6e4a86b7d1 tests: make focused_ws multi-monitor-safe, document it 2012-01-08 16:32:58 +00:00
Michael Stapelberg 3254188cda Bugfix: Show scratchpad on the correct output (+test)
Fixes: #596
2012-01-07 16:53:37 +00:00
Michael Stapelberg dd9743b272 tests: Implement multi-monitor tests using Xdmx 2011-12-26 20:48:57 +01:00
Michael Stapelberg 08986a1798 Implement scratchpad functionality (see userguide) 2011-12-21 23:15:32 +00:00
Michael Stapelberg 311b9e24df tests: implement restart testing (actual option still missing) 2011-12-21 23:15:30 +00:00
Michael Stapelberg 81f4b6fc1a complete-run: don’t parallelize more than the number of tests 2011-12-17 11:19:31 +00:00
Michael Stapelberg 87d98a128f tests: disable SHM logging, we redirect anyways 2011-12-10 11:32:15 +00:00
Maik Fischer 9a7d7919a6 testcases: introduce TestWorker.pm
instead of executing a new perl interpreter (via TAP::Parser)
each time we start a testfile, fork a TestWorker for each display.

Each worker preloads i3test via 'require', blocking waits on its ipc
to get a new filename, forks itself upon arrival and 'do'es this
testscript.
2011-12-04 14:14:20 +01:00
Maik Fischer 55c474d864 testcases: move Xdummy cleanup code to StartXDummy 2011-12-04 14:14:20 +01:00
Maik Fischer 8349190e09 testcases: always start i3 through i3test::launch_with_config
this will pave the way to just call BAIL_OUT and stop the currently
running testfile if i3 died for whatever reason.
2011-12-04 14:14:20 +01:00
Maik Fischer 423b891995 StartXdummy.pm: make Xdummy startup a bit more robust 2011-12-04 14:14:20 +01:00
Maik Fischer 475dc3c532 testcases: use open_window everywhere 2011-11-23 20:33:44 +00:00
Maik Fischer ec877f2ec4 i3test.pm: add before_map hook to open_window 2011-11-23 20:33:44 +00:00
Maik Fischer 9b8d9f7303 i3test.pm: open_(floating_)window: take arguments as hashref or key-value list 2011-11-23 20:33:44 +00:00
Maik Fischer 372b98d08e testcases: drop EV dependency 2011-11-23 00:03:00 +00:00
Maik Fischer 8d83697cc2 testcases: use Test::More is_deeply, don't depend on Test::Deep 2011-11-23 00:02:57 +00:00
Maik Fischer 3a9d94bba4 testcases: don't sync_with_i3() before $x->input_focus
since input_focus calls it anyways
2011-11-23 00:02:54 +00:00
Maik Fischer 0702f1fb7b testcases: drop sync_with_i3()s $x parameter, use global 2011-11-23 00:02:50 +00:00
Maik Fischer 293517fb2e testcases: drop open_floating_window()s $x parameter, use global 2011-11-23 00:02:47 +00:00
Maik Fischer fce7570f96 testcases: drop open_window()s $x parameter, use global one instead 2011-11-21 23:51:04 +00:00
Maik Fischer da403b3667 testcases: use $x in wait_for_(un)map change to wait_for_(un)map($win)
wait_for_unmap currently ignores its $window parameter, since
X11::XCB doesn't provide $event->{window} for unmap events yet.
2011-11-21 23:50:58 +00:00
Maik Fischer 65471a6b18 testcases: only export eq_deeply, cmp_deeply from Test::Deep 2011-11-21 23:50:55 +00:00
Maik Fischer db6de84d0b testcases: use global $x in wait_for_event, drop $x parameter 2011-11-21 23:50:48 +00:00