Lines Matching +full:sub +full:- +full:system
1 # Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
31 OpenSSL::Test - a private extension of Test::More
43 indir "subdir" => sub {
61 recipe C<$SRCTOP/test/recipes/99-foo.t>, there could be a directory
62 C<$SRCTOP/test/recipes/99-foo_data/>.
92 # is defined with a non-empty value.
104 exit_checker => sub { return shift == 0 ? 1 : 0 },
128 variable if defined, otherwise C<$BLDTOP/test-runs> or C<$TOP/test-runs>,
135 sub setup {
154 unless -f srctop_file("Configure");
164 =item B<indir "SUBDIR" =E<gt> sub BLOCK, OPTS>
184 indir "foo" => sub {
198 sub indir {
207 $codeblock->();
284 interpreter_args => [ "-I", srctop_dir("test") ])));
298 indir "foo", sub {
310 sub cmd {
313 return sub {
324 sub app {
327 return sub {
331 exe_shell => $ENV{EXE_SHELL}, %opts) -> (shift);
335 sub fuzz {
338 return sub {
342 exe_shell => $ENV{EXE_SHELL}, %opts) -> (shift);
346 sub test {
349 return sub {
353 exe_shell => $ENV{EXE_SHELL}, %opts) -> (shift);
357 sub perlapp {
360 return sub {
367 @prog, @cmdargs ], %opts) -> (shift);
371 sub perltest {
374 return sub {
381 @prog, @cmdargs ], %opts) -> (shift);
405 If false or not given, the command will be executed with C<system()>,
430 sub run {
431 my ($cmd, $display_cmd) = shift->(0);
454 # In non-verbose, we want to shut up the command interpreter, in case
475 open($pipe, '-|', "$prefix$cmd") or die "Can't start command: $!";
487 system("$prefix$cmd");
491 $r = $hooks{exit_checker}->($e);
513 # non-zero.
524 my $tb = Test::More->builder;
525 my $failure = scalar(grep { $_ == 0; } $tb->summary);
553 operating system.
559 sub bldtop_dir {
572 operating system.
578 sub bldtop_file {
590 operating system.
596 sub srctop_dir {
609 operating system.
615 sub srctop_file {
626 operating system.
632 sub data_dir {
643 file path as a string, adapted to the local operating system.
649 sub data_file {
658 as a string, adapted to the local operating system.
664 sub result_dir {
677 should be placed, adapted to the local operating system.
683 sub result_file {
703 sub pipe {
706 sub {
712 my ($c, $dc, @el) = $_->(++$counter);
752 sub with {
764 $codeblock->();
800 sub cmdstr {
801 my ($cmd, $display_cmd) = shift->(0);
826 sub openssl_versions {
880 sub ok_nofips {
885 sub is_nofips {
890 sub isnt_nofips {
913 is located. Defaults to C<$TOP/apps> (adapted to the operating system).
918 are located. Defaults to C<$TOP/test> (adapted to the operating system).
935 sub __env {
948 $directories{RESULTTOP} = $ENV{RESULT_D} || __bldtop_dir("test-runs");
957 delete $directories{SRCDATA} unless -d $directories{SRCDATA};
977 sub __srctop_file {
984 sub __srctop_dir {
990 sub __bldtop_file {
997 sub __bldtop_dir {
1006 sub __exeext {
1025 sub __test_file {
1031 $out = catfile($directories{SRCTEST},@_,$f) unless -f $out;
1035 sub __apps_file {
1041 $out = catfile($directories{SRCAPPS},@_,$f) unless -f $out;
1045 sub __fuzz_file {
1051 $out = catfile($directories{SRCFUZZ},@_,$f) unless -f $out;
1055 sub __data_file {
1064 sub __data_dir {
1081 sub __cwd {
1134 # %directories the same was as the paths in %directories, so any sub
1194 sub __wrap_cmd {
1229 sub __fixup_prg {
1245 sub __decorate_cmd {
1254 my $fileornull = sub { $_[0] ? $_[0] : $null; };
1259 $stdin = " < ".$fileornull->($opts{stdin}) if exists($opts{stdin});
1260 $stdout= " > ".$fileornull->($opts{stdout}) if exists($opts{stdout});
1261 $stderr=" 2> ".$fileornull->($opts{stderr}) if exists($opts{stderr});
1293 sub subtest {
1298 $level--;