Testcases: Use Xephyr instead of XDummy
Replace the XDummy script with Xephyr. This is done because of some changes in the Xorg server that make XDummy difficult to use. Rename library internal variables and function names to replace "xdummy" with "xserver" to show this change (except for renaming the package and lib file for better git history). Rename the switch `--keep-xdummy-output` to `--keep-xserver-output`. This switch should now be rarely used because Xephyr requires less set up. Replace "xdummy" with "xephyr" in comments and utility help information. Update docs to show the new dependency. fixes #1367
This commit is contained in:
committed by
Michael Stapelberg
parent
ea2552e852
commit
2ddbc71e2b
@ -43,7 +43,7 @@ sub Log { say $log "@_" }
|
||||
|
||||
my %timings;
|
||||
my $help = 0;
|
||||
# Number of tests to run in parallel. Important to know how many Xdummy
|
||||
# Number of tests to run in parallel. Important to know how many Xephyr
|
||||
# instances we need to start (unless @displays are given). Defaults to
|
||||
# num_cores * 2.
|
||||
my $parallel = undef;
|
||||
@ -55,11 +55,11 @@ my %options = (
|
||||
coverage => 0,
|
||||
restart => 0,
|
||||
);
|
||||
my $keep_xdummy_output = 0;
|
||||
my $keep_xserver_output = 0;
|
||||
|
||||
my $result = GetOptions(
|
||||
"coverage-testing" => \$options{coverage},
|
||||
"keep-xdummy-output" => \$keep_xdummy_output,
|
||||
"keep-xserver-output" => \$keep_xserver_output,
|
||||
"valgrind" => \$options{valgrind},
|
||||
"strace" => \$options{strace},
|
||||
"xtrace" => \$options{xtrace},
|
||||
@ -86,6 +86,9 @@ foreach my $binary (@binaries) {
|
||||
die "$binary is not an executable" unless -x $binary;
|
||||
}
|
||||
|
||||
qx(Xephyr -help 2>&1);
|
||||
die "Xephyr was not found in your path. Please install Xephyr (xserver-xephyr on Debian)." if $?;
|
||||
|
||||
@displays = split(/,/, join(',', @displays));
|
||||
@displays = map { s/ //g; $_ } @displays;
|
||||
|
||||
@ -97,9 +100,9 @@ my @testfiles = @ARGV;
|
||||
|
||||
my $numtests = scalar @testfiles;
|
||||
|
||||
# No displays specified, let’s start some Xdummy instances.
|
||||
# No displays specified, let’s start some Xephyr instances.
|
||||
if (@displays == 0) {
|
||||
@displays = start_xdummy($parallel, $numtests, $keep_xdummy_output);
|
||||
@displays = start_xserver($parallel, $numtests, $keep_xserver_output);
|
||||
}
|
||||
|
||||
# 1: create an output directory for this test-run
|
||||
@ -115,8 +118,7 @@ symlink("$outdir", "latest") or die "Could not symlink latest to $outdir";
|
||||
# connect to all displays for two reasons:
|
||||
# 1: check if the display actually works
|
||||
# 2: keep the connection open so that i3 is not the only client. this prevents
|
||||
# the X server from exiting (Xdummy will restart it, but not quick enough
|
||||
# sometimes)
|
||||
# the X server from exiting
|
||||
my @single_worker;
|
||||
for my $display (@displays) {
|
||||
my $screen;
|
||||
@ -346,7 +348,7 @@ complete-run.pl [files...]
|
||||
|
||||
=head1 EXAMPLE
|
||||
|
||||
To run the whole testsuite on a reasonable number of Xdummy instances (your
|
||||
To run the whole testsuite on a reasonable number of Xephyr instances (your
|
||||
running X11 will not be touched), run:
|
||||
./complete-run.pl
|
||||
|
||||
@ -365,11 +367,11 @@ will parallelize the tests:
|
||||
# Run tests on the second X server
|
||||
./complete-run.pl -d :1
|
||||
|
||||
# Run four tests in parallel on some Xdummy servers
|
||||
# Run four tests in parallel on some Xephyr servers
|
||||
./complete-run.pl -d :1,:2,:3,:4
|
||||
|
||||
Note that it is not necessary to specify this anymore. If omitted,
|
||||
complete-run.pl will start (num_cores * 2) Xdummy instances.
|
||||
complete-run.pl will start (num_cores * 2) Xephyr instances.
|
||||
|
||||
=item B<--valgrind>
|
||||
|
||||
@ -392,8 +394,8 @@ Exits i3 cleanly (instead of kill -9) to make coverage testing work properly.
|
||||
|
||||
=item B<--parallel>
|
||||
|
||||
Number of Xdummy instances to start (if you don’t want to start num_cores * 2
|
||||
Number of Xephyr instances to start (if you don’t want to start num_cores * 2
|
||||
instances for some reason).
|
||||
|
||||
# Run all tests on a single Xdummy instance
|
||||
# Run all tests on a single Xephyr instance
|
||||
./complete-run.pl -p 1
|
||||
|
Reference in New Issue
Block a user