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.
This commit is contained in:
Maik Fischer
2011-11-29 13:48:04 +01:00
parent 55c474d864
commit 9a7d7919a6
4 changed files with 226 additions and 86 deletions

View File

@ -16,6 +16,10 @@ use SocketActivation;
use v5.10;
# preload
use Test::More ();
use Data::Dumper ();
use Exporter ();
our @EXPORT = qw(
get_workspace_names
@ -471,10 +475,6 @@ sub get_socket_path {
#
# launches a new i3 process with the given string as configuration file.
# useful for tests which test specific config file directives.
#
# be sure to use !NO_I3_INSTANCE! somewhere in the file to signal
# complete-run.pl that it should not create an instance of i3
#
sub launch_with_config {
my ($config, %args) = @_;