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.
This commit is contained in:
@ -1,10 +1,9 @@
|
||||
#!perl
|
||||
# vim:ts=4:sw=4:expandtab
|
||||
# !NO_I3_INSTANCE! will prevent complete-run.pl from starting i3
|
||||
#
|
||||
# Tests if the various ipc_socket_path options are correctly handled
|
||||
#
|
||||
use i3test;
|
||||
use i3test i3_autostart => 0;
|
||||
use File::Temp qw(tempfile tempdir);
|
||||
use POSIX qw(getuid);
|
||||
use v5.10;
|
||||
@ -20,7 +19,7 @@ EOT
|
||||
|
||||
# ensure XDG_RUNTIME_DIR is not set
|
||||
delete $ENV{XDG_RUNTIME_DIR};
|
||||
my $pid = launch_with_config($config, 1);
|
||||
my $pid = launch_with_config($config, dont_add_socket_path => 1);
|
||||
|
||||
my $folder = "/tmp/i3-" . getpwuid(getuid());
|
||||
ok(-d $folder, "folder $folder exists");
|
||||
@ -39,7 +38,7 @@ ok(! -e "$rtdir/i3", "$rtdir/i3 does not exist yet");
|
||||
|
||||
$ENV{XDG_RUNTIME_DIR} = $rtdir;
|
||||
|
||||
$pid = launch_with_config($config, 1);
|
||||
$pid = launch_with_config($config, dont_add_socket_path => 1);
|
||||
|
||||
ok(-d "$rtdir/i3", "$rtdir/i3 exists and is a directory");
|
||||
$socketpath = "$rtdir/i3/ipc-socket." . $pid;
|
||||
@ -61,7 +60,7 @@ font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
|
||||
ipc-socket $socketpath
|
||||
EOT
|
||||
|
||||
$pid = launch_with_config($config, 1);
|
||||
$pid = launch_with_config($config, dont_add_socket_path => 1);
|
||||
|
||||
ok(-S $socketpath, "file $socketpath exists and is a socket");
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
#!perl
|
||||
# vim:ts=4:sw=4:expandtab
|
||||
# !NO_I3_INSTANCE! will prevent complete-run.pl from starting i3
|
||||
#
|
||||
#
|
||||
use i3test;
|
||||
use i3test i3_autostart => 0;
|
||||
use X11::XCB qw(PROP_MODE_REPLACE);
|
||||
|
||||
##############################################################
|
||||
|
@ -1,10 +1,9 @@
|
||||
#!perl
|
||||
# vim:ts=4:sw=4:expandtab
|
||||
# !NO_I3_INSTANCE! will prevent complete-run.pl from starting i3
|
||||
#
|
||||
# Tests if assignments work
|
||||
#
|
||||
use i3test;
|
||||
use i3test i3_autostart => 0;
|
||||
use X11::XCB qw(PROP_MODE_REPLACE);
|
||||
|
||||
# TODO: move to X11::XCB
|
||||
|
@ -1,11 +1,10 @@
|
||||
#!perl
|
||||
# vim:ts=4:sw=4:expandtab
|
||||
# !NO_I3_INSTANCE! will prevent complete-run.pl from starting i3
|
||||
#
|
||||
# Tests the workspace_layout config option.
|
||||
#
|
||||
|
||||
use i3test;
|
||||
use i3test i3_autostart => 0;
|
||||
|
||||
#####################################################################
|
||||
# 1: check that with an empty config, cons are place next to each
|
||||
|
@ -1,10 +1,9 @@
|
||||
#!perl
|
||||
# vim:ts=4:sw=4:expandtab
|
||||
# !NO_I3_INSTANCE! will prevent complete-run.pl from starting i3
|
||||
#
|
||||
# Tests if the 'force_focus_wrapping' config directive works correctly.
|
||||
#
|
||||
use i3test;
|
||||
use i3test i3_autostart => 0;
|
||||
|
||||
#####################################################################
|
||||
# 1: test the wrapping behaviour without force_focus_wrapping
|
||||
|
@ -1,11 +1,10 @@
|
||||
#!perl
|
||||
# vim:ts=4:sw=4:expandtab
|
||||
# !NO_I3_INSTANCE! will prevent complete-run.pl from starting i3
|
||||
#
|
||||
# Tests if i3-migrate-config-to-v4 correctly migrates all config file
|
||||
# directives and commands
|
||||
#
|
||||
use i3test;
|
||||
use i3test i3_autostart => 0;
|
||||
use Cwd qw(abs_path);
|
||||
use File::Temp qw(tempfile tempdir);
|
||||
use v5.10;
|
||||
|
@ -1,10 +1,8 @@
|
||||
#!perl
|
||||
# vim:ts=4:sw=4:expandtab
|
||||
# !NO_I3_INSTANCE! will prevent complete-run.pl from starting i3
|
||||
#
|
||||
# checks if i3 starts up on workspace '1' or the first configured named workspace
|
||||
#
|
||||
use i3test;
|
||||
use i3test i3_autostart => 0;
|
||||
|
||||
##############################################################
|
||||
# 1: i3 should start with workspace '1'
|
||||
|
@ -1,11 +1,10 @@
|
||||
#!perl
|
||||
# vim:ts=4:sw=4:expandtab
|
||||
# !NO_I3_INSTANCE! will prevent complete-run.pl from starting i3
|
||||
#
|
||||
# Regression: Checks if focus is stolen when a window is managed which is
|
||||
# assigned to an invisible workspace
|
||||
#
|
||||
use i3test;
|
||||
use i3test i3_autostart => 0;
|
||||
use X11::XCB qw(PROP_MODE_REPLACE);
|
||||
|
||||
# TODO: move to X11::XCB
|
||||
|
@ -1,11 +1,10 @@
|
||||
#!perl
|
||||
# vim:ts=4:sw=4:expandtab
|
||||
# !NO_I3_INSTANCE! will prevent complete-run.pl from starting i3
|
||||
#
|
||||
# Tests the new_window and new_float config option.
|
||||
#
|
||||
|
||||
use i3test;
|
||||
use i3test i3_autostart => 0;
|
||||
|
||||
#####################################################################
|
||||
# 1: check that new windows start with 'normal' border unless configured
|
||||
|
@ -1,12 +1,10 @@
|
||||
#!perl
|
||||
# vim:ts=4:sw=4:expandtab
|
||||
# !NO_I3_INSTANCE! will prevent complete-run.pl from starting i3
|
||||
#
|
||||
# Checks if the 'workspace back_and_forth' command and the
|
||||
# 'workspace_auto_back_and_forth' config directive work correctly.
|
||||
#
|
||||
|
||||
use i3test;
|
||||
use i3test i3_autostart => 0;
|
||||
|
||||
my $config = <<EOT;
|
||||
# i3 config file (v4)
|
||||
|
@ -1,11 +1,10 @@
|
||||
#!perl
|
||||
# vim:ts=4:sw=4:expandtab
|
||||
# !NO_I3_INSTANCE! will prevent complete-run.pl from starting i3
|
||||
#
|
||||
# Checks that the bar config is parsed correctly.
|
||||
#
|
||||
|
||||
use i3test;
|
||||
use i3test i3_autostart => 0;
|
||||
|
||||
#####################################################################
|
||||
# test a config without any bars
|
||||
|
Reference in New Issue
Block a user