]> sjero.net Git - wget/blob - tests/run-px
Automated merge.
[wget] / tests / run-px
1 #!/usr/bin/env perl
2 use warnings;
3
4 die "Please specify the top source directory.\n" if (!@ARGV);
5 my $top_srcdir = shift @ARGV;
6
7 my @tests = (
8     'Test-auth-basic.px',
9     'Test-proxy-auth-basic.px',
10     'Test-proxied-https-auth.px',
11     'Test-N-HTTP-Content-Disposition.px',
12     'Test--spider.px',
13     'Test-c-full.px',
14     'Test-c-partial.px',
15     'Test-c.px',
16     'Test-E-k-K.px',
17     'Test-E-k.px',
18     'Test-ftp.px',
19     'Test-HTTP-Content-Disposition-1.px',
20     'Test-HTTP-Content-Disposition-2.px',
21     'Test-HTTP-Content-Disposition.px',
22     'Test-N-current.px',
23     'Test-N-smaller.px',
24     'Test-N-no-info.px',
25     'Test-N--no-content-disposition.px',
26     'Test-N--no-content-disposition-trivial.px',
27     'Test--no-content-disposition.px',
28     'Test--no-content-disposition-trivial.px',
29     'Test-N-old.px',
30     'Test-nonexisting-quiet.px',
31     'Test-noop.px',
32     'Test-np.px',
33     'Test-N.px',
34     'Test-O-HTTP-Content-Disposition.px',
35     'Test-O--no-content-disposition.px',
36     'Test-O--no-content-disposition-trivial.px',
37     'Test-O-nonexisting.px',
38     'Test-O.px',
39     'Test-Restrict-Lowercase.px',
40     'Test-Restrict-Uppercase.px',
41     'Test--spider-fail.px',
42     'Test--spider-r-HTTP-Content-Disposition.px',
43     'Test--spider-r--no-content-disposition.px',
44     'Test--spider-r--no-content-disposition-trivial.px',
45     'Test--spider-r.px',
46 );
47
48 my @results;
49
50 for my $test (@tests) {
51     print "Running $test\n\n";
52     system("$top_srcdir/tests/$test");
53     push @results, $?;
54 }
55
56 for (my $i=0; $i != @tests; ++$i) {
57     if ($results[$i] == 0) {
58         print "pass: ";
59     } else {
60         print "FAIL: ";
61     }
62     print "$tests[$i]\n";
63 }
64
65 print "\n";
66 print scalar(@results) . " tests were run\n";
67 print scalar(grep $_ == 0, @results) . " PASS\n";
68 print scalar(grep $_ != 0, @results) . " FAIL\n";
69
70 exit scalar (grep $_ != 0, @results);