From c6e3fbcf1915779838e8ea06291194b0b2421de9 Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Tue, 12 Sep 2017 08:41:00 +0000 Subject: [PATCH] testcases/lib: Add inject_randr15_outputinfo argument Allow tests to specify a file name for inject_randr15's --getoutputinfo_reply command-line parameter. --- testcases/lib/SocketActivation.pm | 7 ++++++- testcases/lib/i3test.pm.in | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/testcases/lib/SocketActivation.pm b/testcases/lib/SocketActivation.pm index 0f307eb3..5951fd26 100644 --- a/testcases/lib/SocketActivation.pm +++ b/testcases/lib/SocketActivation.pm @@ -145,7 +145,12 @@ sub activate_i3 { if ($args{inject_randr15}) { # See comment in $args{strace} branch. $cmd = 'test.inject_randr15 --getmonitors_reply="' . - $args{inject_randr15} . '" -- ' . + $args{inject_randr15} . '" ' . + ($args{inject_randr15_outputinfo} + ? '--getoutputinfo_reply="' . + $args{inject_randr15_outputinfo} . '" ' + : '') . + '-- ' . 'sh -c "export LISTEN_PID=\$\$; ' . $cmd . '"'; } diff --git a/testcases/lib/i3test.pm.in b/testcases/lib/i3test.pm.in index 4046e620..683f3d39 100644 --- a/testcases/lib/i3test.pm.in +++ b/testcases/lib/i3test.pm.in @@ -864,6 +864,7 @@ sub launch_with_config { dont_create_temp_dir => $args{dont_create_temp_dir}, validate_config => $args{validate_config}, inject_randr15 => $args{inject_randr15}, + inject_randr15_outputinfo => $args{inject_randr15_outputinfo}, ); # If we called i3 with -C, we wait for it to exit and then return as -- 2.39.5