tests: implement restart testing (actual option still missing)
This commit is contained in:
parent
622b94f176
commit
311b9e24df
@ -92,6 +92,10 @@ sub activate_i3 {
|
|||||||
my $outdir = $args{outdir};
|
my $outdir = $args{outdir};
|
||||||
my $test = $args{testname};
|
my $test = $args{testname};
|
||||||
|
|
||||||
|
if ($args{restart}) {
|
||||||
|
$i3cmd .= ' -L ' . abs_path('restart-state.golden');
|
||||||
|
}
|
||||||
|
|
||||||
if ($args{valgrind}) {
|
if ($args{valgrind}) {
|
||||||
$i3cmd =
|
$i3cmd =
|
||||||
qq|valgrind -v --log-file="$outdir/valgrind-for-$test.log" | .
|
qq|valgrind -v --log-file="$outdir/valgrind-for-$test.log" | .
|
||||||
|
@ -101,8 +101,8 @@ sub worker_wait {
|
|||||||
$test->failure_output(\*STDERR);
|
$test->failure_output(\*STDERR);
|
||||||
$test->todo_output(\*STDOUT);
|
$test->todo_output(\*STDOUT);
|
||||||
|
|
||||||
@ENV{qw(DISPLAY TESTNAME OUTDIR VALGRIND STRACE COVERAGE)}
|
@ENV{qw(DISPLAY TESTNAME OUTDIR VALGRIND STRACE COVERAGE RESTART)}
|
||||||
= ($self->{display}, basename($file), $outdir, 0, 0, 0);
|
= ($self->{display}, basename($file), $outdir, 0, 0, 0, 0);
|
||||||
|
|
||||||
package main;
|
package main;
|
||||||
local $@;
|
local $@;
|
||||||
|
@ -505,6 +505,7 @@ sub launch_with_config {
|
|||||||
testname => $ENV{TESTNAME},
|
testname => $ENV{TESTNAME},
|
||||||
valgrind => $ENV{VALGRIND},
|
valgrind => $ENV{VALGRIND},
|
||||||
strace => $ENV{STRACE},
|
strace => $ENV{STRACE},
|
||||||
|
restart => $ENV{RESTART},
|
||||||
cv => $cv,
|
cv => $cv,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
1
testcases/restart-state.golden
Normal file
1
testcases/restart-state.golden
Normal 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":[]}
|
Loading…
Reference in New Issue
Block a user