tests: implement restart testing (actual option still missing)

next
Michael Stapelberg 2011-12-21 23:15:06 +00:00
parent 622b94f176
commit 311b9e24df
4 changed files with 8 additions and 2 deletions

View File

@ -92,6 +92,10 @@ sub activate_i3 {
my $outdir = $args{outdir};
my $test = $args{testname};
if ($args{restart}) {
$i3cmd .= ' -L ' . abs_path('restart-state.golden');
}
if ($args{valgrind}) {
$i3cmd =
qq|valgrind -v --log-file="$outdir/valgrind-for-$test.log" | .

View File

@ -101,8 +101,8 @@ sub worker_wait {
$test->failure_output(\*STDERR);
$test->todo_output(\*STDOUT);
@ENV{qw(DISPLAY TESTNAME OUTDIR VALGRIND STRACE COVERAGE)}
= ($self->{display}, basename($file), $outdir, 0, 0, 0);
@ENV{qw(DISPLAY TESTNAME OUTDIR VALGRIND STRACE COVERAGE RESTART)}
= ($self->{display}, basename($file), $outdir, 0, 0, 0, 0);
package main;
local $@;

View File

@ -505,6 +505,7 @@ sub launch_with_config {
testname => $ENV{TESTNAME},
valgrind => $ENV{VALGRIND},
strace => $ENV{STRACE},
restart => $ENV{RESTART},
cv => $cv,
);

View File

@ -0,0 +1 @@
{"id":6752976,"type":0,"orientation":"none","percent":null,"urgent":false,"focused":false,"layout":"default","border":"none","rect":{"x":0,"y":0,"width":1280,"height":1024},"window_rect":{"x":0,"y":0,"width":0,"height":0},"geometry":{"x":0,"y":0,"width":0,"height":0},"name":"root","window":null,"nodes":[{"id":6809472,"type":1,"orientation":"none","percent":1,"urgent":false,"focused":false,"layout":"output","border":"none","rect":{"x":0,"y":0,"width":1280,"height":1024},"window_rect":{"x":0,"y":0,"width":0,"height":0},"geometry":{"x":0,"y":0,"width":0,"height":0},"name":"xroot-0","window":null,"nodes":[{"id":6810064,"type":5,"orientation":"vertical","percent":null,"urgent":false,"focused":false,"layout":"dockarea","border":"none","rect":{"x":0,"y":0,"width":1280,"height":0},"window_rect":{"x":0,"y":0,"width":0,"height":0},"geometry":{"x":0,"y":0,"width":0,"height":0},"name":"topdock","window":null,"nodes":[],"floating_nodes":[],"focus":[],"fullscreen_mode":0,"swallows":[{"dock":2,"insert_where":2}]},{"id":6831664,"type":2,"orientation":"none","percent":null,"urgent":false,"focused":false,"layout":"default","border":"none","rect":{"x":0,"y":0,"width":1280,"height":1024},"window_rect":{"x":0,"y":0,"width":0,"height":0},"geometry":{"x":0,"y":0,"width":0,"height":0},"name":"content","window":null,"nodes":[{"id":6832880,"type":4,"orientation":"horizontal","percent":null,"urgent":false,"focused":true,"layout":"default","border":"none","rect":{"x":0,"y":0,"width":1280,"height":1024},"window_rect":{"x":0,"y":0,"width":0,"height":0},"geometry":{"x":0,"y":0,"width":0,"height":0},"name":"1","num":1,"window":null,"nodes":[],"floating_nodes":[],"focus":[],"fullscreen_mode":1,"swallows":[]}],"floating_nodes":[],"focus":[6832880],"fullscreen_mode":0,"swallows":[]},{"id":6832224,"type":5,"orientation":"vertical","percent":null,"urgent":false,"focused":false,"layout":"dockarea","border":"none","rect":{"x":0,"y":1024,"width":1280,"height":0},"window_rect":{"x":0,"y":0,"width":0,"height":0},"geometry":{"x":0,"y":0,"width":0,"height":0},"name":"bottomdock","window":null,"nodes":[],"floating_nodes":[],"focus":[],"fullscreen_mode":0,"swallows":[{"dock":3,"insert_where":2}]}],"floating_nodes":[],"focus":[6831664,6810064,6832224],"fullscreen_mode":0,"swallows":[]}],"floating_nodes":[],"focus":[6809472],"fullscreen_mode":0,"swallows":[]}