Am Fri, 13 Nov 2020 21:11:07 +1300 schrieb "Sam Crawley" <s...@crawley.nz>:
> I've attached an updated patchset. > > As discussed, there's now a different parameter for "dialog-show compare" > called > "run-blocking", which is appropriate for calling from the command line. The > tests now > use this. A couple of other things tidied up too. > > Thanks, > Sam. > > On Sun, 8 Nov 2020, at 17:14, Sam Crawley wrote: > > Hi all, > > > > I've created a fairly basic test suite for the Compare function. It uses the > > lyx_batch.pl script to run compare on two files, and then does a comparison > > with an > > expected diff file. > > > > This is the first step in some changes I'd like to make to the compare > > function (see > > #6889). > > > > Comments welcome, and also happy to have suggestions for additional test > > cases. > > > > Thanks, > > Sam. Running the test I get: ... Can't exec "/usr2/src/lyx/lyx-git/development/batchtests/bin/compare_custom.pl": Permission denied at /BUILD/BUILDMint18/BuildLyxGitQt5.9.5local-gcc8.4.0/lyx_batch.pl line 195. ... The attached diff to your lyx_batch.pl.in cures it. Another idea is making compare_custom.pl a module. Kornel
--- lib/scripts/lyx_batch.pl.in.my 2020-11-13 12:05:14.906837305 +0100 +++ lib/scripts/lyx_batch.pl.in 2020-11-13 12:08:38.201504314 +0100 @@ -27,7 +27,6 @@ my $data = "$lyxsource/development/batchtests"; my $test_bin = "$lyxsource/development/batchtests/bin"; my $comparepdf = "@COMPAREPDF_EXECUTABLE@"; -my $perl = "@PERL_EXECUTABLE@"; # src_files := Files to be copied from lyx-source to build-dir @@ -87,7 +86,7 @@ "compare_test" => { src_files => ["old.lyx", "new.lyx"], check_type => 'custom', - check_script => ["$perl","$test_bin/compare_custom.pl"], + check_script => "$test_bin/compare_custom.pl", test_dir => "$lyxsource/development/batchtests/compare_tests/", check => [["diffs.lyx", "diffs.expected.lyx"]], commands => [ @@ -256,7 +255,7 @@ $result = 0; } elsif ($check_type eq 'custom') { - $result = system1(@{$check_script}, $expected, $created); + $result = system1($check_script, $expected, $created); } elsif ($check_type eq 'text') { # defaut text comparision
pgp1M7sZ1FowG.pgp
Description: Digitale Signatur von OpenPGP
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel