Lines Matching refs:the
3 # Licensed under the Apache License 2.0 (the "License"). You may not use
4 # this file except in compliance with the License. You can obtain a copy
5 # in the file LICENSE in the source distribution or at
51 In addition to the Test::More functions, it also provides functions that
52 easily find the diverse programs within a OpenSSL build tree, as well as
55 This module I<depends> on the environment variables C<$TOP> or C<$SRCTOP>
56 and C<$BLDTOP>. Without one of the combinations it refuses to work.
59 With each test recipe, a parallel data directory with (almost) the same name
60 as the recipe is possible in the source directory tree. For example, for a
76 # The name of the test. This is set by setup() and is used in the other
80 # Directories we want to keep track of TOP, APPS, TEST and RESULTS are the
81 # ones we're interested in, corresponding to the environment variables TOP
85 # The environment variables that gave us the contents in %directories. These
87 # the values of those environment variables as well
90 # A bool saying if we shall stop all testing if the current recipe has failing
91 # tests or not. This is set by setup() if the environment variable STOPTEST
100 # it receives the exit code from that command and is expected to return
101 # 1 (for success) or 0 (for failure). This is the status value that run()
102 # will give back (through the |statusvar| reference and as returned value
122 If it's not used in a OpenSSL test recipe, the rest of the recipe will
127 into the results directory (defined by the C<$RESULT_D> environment
153 BAIL_OUT("setup() expects the file Configure in the source top directory")
166 C<indir> is used to run a part of the recipe in a different directory than
167 the one C<setup> moved into, usually a subdirectory, given by SUBDIR.
168 The part of the recipe that's run there is given by the codeblock BLOCK.
170 C<indir> takes some additional options OPTS that affect the subdirectory:
176 When set to 1 (or any value that perl perceives as true), the subdirectory
216 This functions build up a platform dependent command based on the
217 input. It takes a reference to a list that is the executable or
219 further on). Where necessary, the command will be wrapped in a
220 suitable environment to make sure the correct shared libraries are
226 are in the form of hash values:
236 In all three cases, the corresponding standard input, output or error is
237 redirected from (for stdin) or to (for the others) a file given by the
238 string PATH, I<or>, if the value is C<undef>, C</dev/null> or similar.
249 C<app> expects to find the given command (the first item in the given list
253 C<test> expects to find the given command (the first item in the given list
257 Also, for both C<app> and C<test>, the command may be prefixed with
258 the content of the environment variable C<$EXE_SHELL>, which is useful
265 These are also specific applications of C<cmd>, where the interpreter
266 is predefined to be C<perl>, and they expect the script to be
267 interpreted to reside in the same location as C<app> and C<test>.
269 C<perlapp> and C<perltest> will also take the following option:
275 The array reference is a set of arguments for the interpreter rather
276 than the script. Take care so that none of them can be seen as a
290 One might wonder over the complexity of C<apps>, C<fuzz>, C<test>, ...
291 with all the lazy evaluations and all that. The reason for this is that
292 we want to make sure the directory in which those programs are found are
293 correct at the time these commands are used. Consider the following code
302 If there wasn't this lazy evaluation, the directory where C<openssl> is
303 found would be incorrect at the time C<run> is called, because it was
304 calculated before we moved into the directory "foo".
315 # Make a copy to not destroy the caller's array
389 CODEREF is expected to be the value return by C<cmd> or any of its
393 C<run> executes the command returned by CODEREF and return either the
394 resulting standard output (if the option C<capture> is set true) or a boolean
395 indicating if the command succeeded or not.
397 The options that C<run> can take are in the form of hash values:
403 If true, the command will be executed with a perl backtick,
404 and C<run> will return the resulting standard output as an array of lines.
405 If false or not given, the command will be executed with C<system()>,
406 and C<run> will return 1 if the command was successful or 0 if it wasn't.
410 If specified, EXPR will be used as a string to prefix the output from the
411 command. This is useful if the output contains lines starting with C<ok >
417 assigned a boolean indicating if the command succeeded or not. This is
422 Usually 1 indicates that the command was successful and 0 indicates failure.
424 the function C<with> further down.
454 # In non-verbose, we want to shut up the command interpreter, in case
467 # The dance we do with $? is the same dance the Unix shells appear to
469 # SIGABRT = 6) will appear to exit with the code 134. We mimic this
470 # to make it easier to compare with a manual run of the command.
535 # To only get the bldtop_file and srctop_file functions.
538 # To only get the bldtop_file function in addition to the default ones.
549 LIST is a list of directories that make up a path from the top of the OpenSSL
550 build directory (as indicated by the environment variable C<$TOP> or
552 C<bldtop_dir> returns the resulting directory as a string, adapted to the local
568 LIST is a list of directories that make up a path from the top of the OpenSSL
569 build directory (as indicated by the environment variable C<$TOP> or
570 C<$BLDTOP>) and FILENAME is the name of a file located in that directory path.
571 C<bldtop_file> returns the resulting file path as a string, adapted to the local
586 LIST is a list of directories that make up a path from the top of the OpenSSL
587 source directory (as indicated by the environment variable C<$TOP> or
589 C<srctop_dir> returns the resulting directory as a string, adapted to the local
605 LIST is a list of directories that make up a path from the top of the OpenSSL
606 source directory (as indicated by the environment variable C<$TOP> or
607 C<$SRCTOP>) and FILENAME is the name of a file located in that directory path.
608 C<srctop_file> returns the resulting file path as a string, adapted to the local
623 LIST is a list of directories that make up a path from the data directory
624 associated with the test (see L</DESCRIPTION> above).
625 C<data_dir> returns the resulting directory as a string, adapted to the local
640 LIST is a list of directories that make up a path from the data directory
641 associated with the test (see L</DESCRIPTION> above) and FILENAME is the name
642 of a file located in that directory path. C<data_file> returns the resulting
643 file path as a string, adapted to the local operating system.
657 C<result_dir> returns the directory where test output files should be placed
658 as a string, adapted to the local operating system.
674 FILENAME is the name of a test output file.
675 C<result_file> returns the path of the given file as a string,
676 prepending to the file name the path to the directory where test output files
677 should be placed, adapted to the local operating system.
695 creates a new command composed of all the given commands put together in a
696 pipe. C<pipe> returns a new CODEREF in the same manner as C<app> or C<test>,
732 C<with> will temporarily install hooks given by the HASHREF and then execute
733 the given CODEREF. Hooks are usually expected to have a coderef as value.
742 CODEREF receives the exit code as only argument and is expected to return
743 1 (if the exit code indicated success) or 0 (if the exit code indicated
775 C<cmdstr> takes a CODEREF from C<app> or C<test> and simply returns the
778 C<cmdstr> takes some additional options OPTS that affect the string returned:
784 When set to 0, the returned string will be with all decorations, such as a
785 possible redirect of stderr to the null device. This is suitable if the
788 When set to 1, the returned string will be without extra decorations. This
817 Returns a list of two version numbers, the first representing the build
818 version, the second representing the library version. See opensslv.h for
842 C<ok_nofips> is equivalent to using C<ok> when the environment variable
845 are the same as used by C<ok> which is an expression EXPR followed by the test
854 C<is_nofips> is equivalent to using C<is> when the environment variable
857 are the same as used by C<is> which has 2 arguments EXPR1 and EXPR2 that can be
866 C<isnt_nofips> is equivalent to using C<isnt> when the environment variable
869 parameters are the same as used by C<isnt> which has 2 arguments EXPR1 and EXPR2
907 defined and that it's a directory that contains the file C<Configure>.
912 If defined, its value should be the directory where the openssl application
913 is located. Defaults to C<$TOP/apps> (adapted to the operating system).
917 If defined, its value should be the directory where the test applications
918 are located. Defaults to C<$TOP/test> (adapted to the operating system).
923 failures will result in a C<BAIL_OUT> at the end of its run.
927 If defined it indicates that the FIPS provider is being tested. Tests may use
970 # names on top of the source directory. They depend on $SRCTOP, and
971 # therefore on the proper use of setup() and when needed, indir().
972 # __bldtop_file and __bldtop_dir do the same thing but relative to $BLDTOP.
973 # __srctop_file and __bldtop_file take the same kind of argument as
975 # Similarly, __srctop_dir and __bldtop_dir take the same kind of argument
1003 # __exeext is a function that returns the platform dependent file extension
1004 # for executable binaries, or the value of the environment variable $EXE_EXT
1016 # __test_file, __apps_file and __fuzz_file return the full path to a file
1017 # relative to the test/, apps/ or fuzz/ directory in the build tree or the
1018 # source tree, depending on where the file is found. Note that when looking
1019 # in the build tree, the file name with an added extension is looked for, if
1021 # the build tree) or possibly scripts (in the source tree).
1022 # These functions all take the same arguments as File::Spec::Functions::catfile,
1075 # __cwd changes directory to DIR (string) and changes all the relative
1085 # If the directory is to be created, we must do that before using
1105 # If someone happened to give a directory that leads back to the current,
1111 # We are recalculating the directories we keep track of, but need to save
1112 # away the result for after having moved into the new directory.
1117 # to the directory we want to move to if they aren't absolute (if they are,
1133 # Treat each environment variable that was used to get us the values in
1134 # %directories the same was as the paths in %directories, so any sub
1152 # We put back new values carefully. Doing the obvious
1177 print STDERR " the way back is \"$reverse\"\n";
1187 # the command gets executed with an appropriate environment. If EXE_SHELL
1188 # is given, it is used as the beginning command.
1204 # Otherwise, use the standard wrapper
1208 # On VMS and Windows, we run the perl executable explicitly,
1210 # but that depends on if the user has associated the '.pl'
1214 # Otherwise, we assume Unix semantics, and trust that the #!
1228 # __fixup_prg returns a string with the possibly prefixed program path spec.
1240 # __decorate_cmd returns a list of two strings, one with the command
1241 # string to actually be used, the other to be displayed for the user.
1243 # the null device unless we're verbose and unless the user has