testcases/lib: Add inject_randr15_outputinfo argument

Allow tests to specify a file name for inject_randr15's
--getoutputinfo_reply command-line parameter.
This commit is contained in:
Vladimir Panteleev 2017-09-12 08:41:00 +00:00 committed by Michael Stapelberg
parent 7fb027ad37
commit 21dd8c475a
2 changed files with 7 additions and 1 deletions

View File

@ -145,7 +145,12 @@ sub activate_i3 {
if ($args{inject_randr15}) { if ($args{inject_randr15}) {
# See comment in $args{strace} branch. # See comment in $args{strace} branch.
$cmd = 'test.inject_randr15 --getmonitors_reply="' . $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 . '"'; 'sh -c "export LISTEN_PID=\$\$; ' . $cmd . '"';
} }

View File

@ -863,6 +863,7 @@ sub launch_with_config {
dont_create_temp_dir => $args{dont_create_temp_dir}, dont_create_temp_dir => $args{dont_create_temp_dir},
validate_config => $args{validate_config}, validate_config => $args{validate_config},
inject_randr15 => $args{inject_randr15}, 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 # If we called i3 with -C, we wait for it to exit and then return as