Commit Graph

50 Commits

Author SHA1 Message Date
Michael Stapelberg dd9743b272 tests: Implement multi-monitor tests using Xdmx 2011-12-26 20:48:57 +01:00
Michael Stapelberg 69b143e5ca complete-run: automatically display test output when running a single test 2011-12-17 11:20:32 +00:00
Michael Stapelberg 95508c3469 complete-run: fix uninitialized warning 2011-12-17 11:20:16 +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 1c72e8b69e Make complete-run store the timings, schedule tests and print time estimate
Yay for self-optimizing software and time estimates
2011-12-16 22:00:41 +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 43b8b8356d complete-run: add cleanup sighandler 2011-12-04 14:14:20 +01:00
Maik Fischer 2d188bfc9b complete-run: reorder code to make code flow more clear 2011-12-04 14:14:20 +01:00
Maik Fischer 6a5ca32c5a complete-run: die if X11::XCB couldn’t connect to a display 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 af793c9030 complete-run: wait for all jobs to be finished 2011-11-21 19:20:52 +00:00
Michael Stapelberg 3abd7ab073 complete-run: close all fds except for 0, 1, 2
running in a VIM subshell leads to one more fd, for example
2011-11-20 10:51:21 +00:00
Michael Stapelberg 77a9e4b18f complete-run: implement --strace, make --valgrind log to test-specific file 2011-11-15 23:30:17 +00:00
Michael Stapelberg 2c48280017 complete-run: remove Carp::Always, slipped in when debugging 2011-11-09 22:41:56 +00:00
Michael Stapelberg 316318c1fc complete-run: don’t print long logfile paths, they are useless by now anyway 2011-11-09 22:38:29 +00:00
Maik Fischer 7633aa67a1 complete-run: log verbose output, display statuslines instead 2011-11-09 23:00:10 +01:00
Michael Stapelberg afc488021f complete-run.pl: automatically start Xdummy instances unless -d is specified
This makes running the testsuite incredibly easy:
    $ ./complete-run.pl
:)
2011-11-07 23:04:45 +00:00
Michael Stapelberg 8b887e8447 complete-run: Bugfix: return condvar when $dont_start is true 2011-11-07 22:38:06 +00:00
Michael Stapelberg 0615cb3595 complete-run.pl: implement --help 2011-11-07 21:21:51 +00:00
Michael Stapelberg fdf7b1706c complete-run: Bugfix: Don’t call recv inside a callback when cleanly exiting i3 2011-11-07 20:56:36 +00:00
Michael Stapelberg dbd6440432 complete-run: Use Carp::Always to get nice stacktraces in case of errors 2011-11-07 20:56:04 +00:00
Michael Stapelberg 1c0d69d4e6 complete-run: implement --valgrind 2011-11-07 20:53:49 +00:00
Michael Stapelberg 389fdcf79f complete-run: pass outdir (not only logpath) to activate_i3() 2011-11-07 20:52:14 +00:00
Michael Stapelberg 1056ecc885 complete-run: eliminate dependency on EV 2011-10-05 23:52:19 +01:00
Michael Stapelberg 27a38a3917 complete-run: explicitly state why we need to overwrite SIGCHLD 2011-10-05 23:29:58 +01:00
Michael Stapelberg b9224634dd tests: eliminate Try::Tiny 2011-10-05 23:21:23 +01:00
Michael Stapelberg 689f3b8cf7 tests: Eliminate IO::Scalar 2011-10-05 23:17:09 +01:00
Michael Stapelberg bd33c09845 tests: move i3test.pm from t/lib to lib/ 2011-10-04 23:39:36 +01:00
Michael Stapelberg 8d9b4c3c04 tests: launch_with_config: use socket activation 2011-10-04 23:33:38 +01:00
Michael Stapelberg 6c7c4d52d0 tests: Refactor the socket activation into lib/SocketActivation.pm 2011-10-04 23:30:30 +01:00
Michael Stapelberg a94ec5ee4e tests: re-order dependencies in complete-run, make clear which are shipped with Perl 2011-10-04 20:10:11 +01:00
Michael Stapelberg 53121c746c tests: remove unused dependency Proc::Background from complete-run 2011-10-04 20:05:12 +01:00
Michael Stapelberg aa65b721b8 tests: eliminate dependency on the DateTime module by using POSIX::strftime 2011-10-04 20:03:08 +01:00
Michael Stapelberg 20d6ae4110 tests: make complete-run use POSIX::close(3) instead of reserving a file descriptor when starting
This makes it possible to run complete-run.pl with a "tainted" environment in
which fd 3 (and possibly others) are already present.
2011-10-04 19:58:17 +01:00
Michael Stapelberg 1eb011aae1 tests: make sure to leave no tempfiles behind 2011-09-24 16:28:21 +01:00
Michael Stapelberg c3eb9f6c45 tests: complete-run: remove debugging messages 2011-09-24 13:13:26 +01:00
Michael Stapelberg 1a438f12ed tests: complete-run: display time i3 took for starting up 2011-09-24 13:13:09 +01:00
Michael Stapelberg e244a75801 tests: complete_run: directly use X11::XCB instead of ::Connection
This saves about 0.5s wallclock time due to not starting up Moose/Mouse.
This is worthwhile when you develop a new feature and you are often invoking
complete_run for one specific test.
2011-09-24 13:09:20 +01:00
Michael Stapelberg 99168a84a9 tests: also make launch_with_config() log to LOGPATH 2011-09-18 15:35:04 +01:00
Michael Stapelberg 5524785877 testsuite: eliminate sleep, wait until i3 replies via IPC 2011-08-10 15:56:39 +02:00
Michael Stapelberg 26c1a463db tests: keep an X11 connection open to every display, fixes races
Otherwise, i3 is the only client and thus the X server shuts down after i3
disconnects. Xdummy restarts an X server, but that takes some time and
therefore sometimes the next testcase was unable to connect.
2011-07-27 14:34:35 +02:00
Michael Stapelberg 4dde5bb863 testsuite: allow parallel runs. decreases the test time by 60% when using 4 displays 2011-07-25 15:37:13 +02:00
Michael Stapelberg 1bd4c983db tests: add test for the for_window config directive, use separate config for tests
This test increases code coverage to 60.7%
2011-05-16 21:50:34 +02:00
Michael Stapelberg 098fc06942 tests: add --coverage-testing option to complete-run.pl 2011-05-08 20:08:35 +02:00
Michael Stapelberg 4fc26e7de0 tests: make complete-run.pl scan tests for !NO_I3_INSTANCE!, simplify code 2011-04-26 19:20:29 +02:00
Michael Stapelberg 773bc5ba6d fix typo in testcases/complete-run.pl 2011-01-28 01:18:30 +01:00
Michael Stapelberg 0e8fdab302 disable sighandler for testsuite runs 2011-01-28 00:48:22 +01:00
Michael Stapelberg 1a2134d4c3 add testcases/complete-run.pl, a script for conveniently running the testsuite (or parts of it) 2010-11-13 17:29:20 +01:00