7 # Syntax: prefTest.pl [test|default] [<var1>=<Subst1> [<var2>=<Subst> ...]] [[ctest parameters]]
8 # If the first parameter is "test"
9 # allow use of -shell-escape in converters and
10 # allow use of external programs
11 # If the first parameter is "default"
12 # remove "-shell-escape" from converters and
13 # forbid use of external programs
15 # allow use of -shell-escape in converters and
16 # do not change handling the use of external programs
17 ############################################################
20 unshift(@INC, "@CMAKE_CURRENT_SOURCE_DIR@");
25 my $bindir = "@CMAKE_BINARY_DIR@";
27 my $userdir = "$bindir/Testing/.lyx";
30 "use_converter_needauth_forbidden" => ["true", "false"],
31 "use_converter_needauth" => ["true", "false"],
32 "allow_geometry_session" => ["false"],
39 # Parse Arguments for strings to substitute
45 my $shell_escapes = 1;
47 if (defined($ARGV[0]) && ($ARGV[0] =~ /^(test|default)$/)) {
52 if ($handle_argv eq "test") {
53 @ctestpars = &getSubstitutes(\%allowedKeys, \%Subst,
54 "allow_geometry_session=false",
55 "use_converter_needauth_forbidden=false",
56 "use_converter_needauth=false", @ARGV);
58 elsif ($handle_argv eq "default") {
60 @ctestpars = &getSubstitutes(\%allowedKeys, \%Subst,
61 "allow_geometry_session=false",
62 "use_converter_needauth_forbidden=true",
63 "use_converter_needauth=true", @ARGV);
66 @ctestpars = &getSubstitutes(\%allowedKeys, \%Subst,
67 "allow_geometry_session=false", @ARGV);
70 &getConverters($userdir, \%Converter, $shell_escapes);
72 &applyChanges($userdir, \%Subst, \%Converter, $shell_escapes);
76 $res = system("ctest", @ctestpars);