From: Kornel Benko Date: Wed, 19 Aug 2020 20:28:50 +0000 (+0200) Subject: Cmake export tests: Omit next group of possible conflicts while runnig test in parallel X-Git-Tag: lyx-2.4.0dev-acb2ca7b~346 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=4bb00e99fbc4e23075088dfdd8e3d566fbd9d187;p=lyx.git Cmake export tests: Omit next group of possible conflicts while runnig test in parallel Disable conversion cache because all lyx instances use the same cache without any locking between read and write to the cache. Thanks to Scott catching this case. --- diff --git a/lib/scripts/prefTest.pl.in b/lib/scripts/prefTest.pl.in index 4e0aab739f..d999b6a10b 100755 --- a/lib/scripts/prefTest.pl.in +++ b/lib/scripts/prefTest.pl.in @@ -30,6 +30,8 @@ my %allowedKeys = ( "use_converter_needauth_forbidden" => ["true", "false"], "use_converter_needauth" => ["true", "false"], "allow_geometry_session" => ["false"], + "use_converter_cache" => ["true", "false"], + "converter_cache_maxage" => "integer", ); my %Converter = (); @@ -53,14 +55,20 @@ if ($handle_argv eq "test") { @ctestpars = &getSubstitutes(\%allowedKeys, \%Subst, "allow_geometry_session=false", "use_converter_needauth_forbidden=false", - "use_converter_needauth=false", @ARGV); + "use_converter_needauth=false", + "use_converter_cache=false", + "converter_cache_maxage=" . 180*24*60*60, + @ARGV); } elsif ($handle_argv eq "default") { $shell_escapes = 0; @ctestpars = &getSubstitutes(\%allowedKeys, \%Subst, "allow_geometry_session=false", "use_converter_needauth_forbidden=true", - "use_converter_needauth=true", @ARGV); + "use_converter_needauth=true", + "use_converter_cache=true", + "converter_cache_maxage=" . 61*24*60*60, + @ARGV); } else { @ctestpars = &getSubstitutes(\%allowedKeys, \%Subst, diff --git a/lib/scripts/prefTest.pm b/lib/scripts/prefTest.pm index 814304fa50..8f88769134 100644 --- a/lib/scripts/prefTest.pm +++ b/lib/scripts/prefTest.pm @@ -31,12 +31,22 @@ sub getSubstitutes($$@) my $value = $2; my $valid = 0; if (defined($rAllowedKeys->{$key})) { - for my $val (@{$rAllowedKeys->{$key}}) { - if ($val eq $value) { + if (ref($rAllowedKeys->{$key}) eq "ARRAY") { + for my $val (@{$rAllowedKeys->{$key}}) { + if ($val eq $value) { + $valid = 1; + last; + } + } + } + elsif ($rAllowedKeys->{$key} eq "integer") { + if ($value =~ /^\d+$/) { $valid = 1; - last; } } + elsif ($rAllowedKeys->{$key} eq "string") { + $valid = 1; + } } if ($valid) { $rSubst->{$key} = [$value, 0]; @@ -82,15 +92,15 @@ sub getConverter($$) return undef if ($to !~ /^((dvi3?|pdf[23456]?)(log)?)$/); ($l, $cmd) = getNext($l); if ($add) { - if ($cmd !~ /\-shell-escape/) { + if ($cmd !~ /\-shell-(escape|restricted)/) { if ($cmd =~ /^(\S+)\s*(.*)$/) { - $cmd = "$1 -shell-escape $2"; + $cmd = "$1 -shell-restricted $2"; $cmd =~ s/\s+$//; } } } else { - $cmd =~ s/\s+\-shell\-escape//; + $cmd =~ s/\s+\-shell\-(escape|restricted)//; } ($l, $par) = getNext($l); return undef if ($par !~ /^latex/);