5 use File::Spec::Functions;
11 setup("check_testalltests");
13 my $Makefile = top_file("test","Makefile");
16 if (ok(open(FH,$Makefile), "test/Makefile exists")) {
17 subtest 'Finding test scripts for the alltests target' => sub {
18 find_tests(\*FH); close FH;
21 diag("Expected to find $Makefile");
37 $line =~ s/\\\s*$/$l/;
38 last if $line !~ /\\\s*$/;
41 $line =~ s/^alltests:\s*//;
43 # It's part of the test_ssl recipe
44 $line =~ s/\s+test_ss\s+/ /;
46 # It's split into sha1, sha256 and sha512
47 $line =~ s/\s+test_sha\s+/ test_sha1 test_sha256 test_sha512 /;
52 $_ => top_file("test",
53 "recipes/[0-9][0-9]-test_$_.t"); } split(/\s+/,
56 plan tests => scalar (keys %foundfiles);
58 foreach (sort keys %foundfiles) {
59 my @check = glob($foundfiles{$_});
60 ok(scalar @check, "check that a test for $_ exists")
61 || diag("Expected to find something matching $foundfiles{$_}");