testcurl.pl: 82c344a3 follow-up
[platform/upstream/curl.git] / tests / testcurl.pl
1 #!/usr/bin/env perl
2 #***************************************************************************
3 #                                  _   _ ____  _
4 #  Project                     ___| | | |  _ \| |
5 #                             / __| | | | |_) | |
6 #                            | (__| |_| |  _ <| |___
7 #                             \___|\___/|_| \_\_____|
8 #
9 # Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
10 #
11 # This software is licensed as described in the file COPYING, which
12 # you should have received as part of this distribution. The terms
13 # are also available at http://curl.haxx.se/docs/copyright.html.
14 #
15 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
16 # copies of the Software, and permit persons to whom the Software is
17 # furnished to do so, under the terms of the COPYING file.
18 #
19 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 # KIND, either express or implied.
21 #
22 ###########################################################################
23
24 ###########################
25 #  What is This Script?
26 ###########################
27
28 # testcurl.pl is the master script to use for automatic testing of curl
29 # directly off its source repository.
30 # This is written for the purpose of being run from a crontab job or similar
31 # at a regular interval. The output is suitable to be mailed to
32 # curl-autocompile@haxx.se to be dealt with automatically (make sure the
33 # subject includes the word "autobuild" as the mail gets silently discarded
34 # otherwise).  The most current build status (with a resonable backlog) will
35 # be published on the curl site, at http://curl.haxx.se/auto/
36
37 # USAGE:
38 # testcurl.pl [options] [curl-daily-name] > output
39
40 # Options:
41 #
42 # --configure=[options]    Configure options
43 # --crosscompile           This is a crosscompile
44 # --desc=[desc]            Description of your test system
45 # --email=[email]          Set email address to report as
46 # --extvercmd=[command]    Command to use for displaying version with cross compiles.
47 # --mktarball=[command]    Command to run after completed test
48 # --name=[name]            Set name to report as
49 # --nocvsup                Don't pull from git even though it is a git tree
50 # --nogitpull              Don't pull from git even though it is a git tree
51 # --nobuildconf            Don't run buildconf
52 # --noconfigure            Don't run configure
53 # --runtestopts=[options]  Options to pass to runtests.pl
54 # --setup=[file name]      File name to read setup from (deprecated)
55 # --target=[your os]       Specify your target environment.
56 #
57 # if [curl-daily-name] is omitted, a 'curl' git directory is assumed.
58 #
59
60 use strict;
61
62 use Cwd;
63
64 # Turn on warnings (equivalent to -w, which can't be used with /usr/bin/env)
65 #BEGIN { $^W = 1; }
66
67 use vars qw($version $fixed $infixed $CURLDIR $git $pwd $build $buildlog
68             $buildlogname $configurebuild $targetos $confheader $binext
69             $libext);
70
71 use vars qw($name $email $desc $confopts $runtestopts $setupfile $mktarball
72             $extvercmd $nogitpull $nobuildconf $crosscompile
73             $timestamp $notes);
74
75 # version of this script
76 $version='2011-12-27';
77 $fixed=0;
78
79 # Determine if we're running from git or a canned copy of curl,
80 # or if we got a specific target option or setup file option.
81 $CURLDIR="curl";
82 if (-f ".git/config") {
83   $CURLDIR = "./";
84 }
85
86 $git=1;
87 $setupfile = 'setup';
88 $configurebuild = 1;
89 while ($ARGV[0]) {
90   if ($ARGV[0] =~ /--target=/) {
91     $targetos = (split(/=/, shift @ARGV))[1];
92   }
93   elsif ($ARGV[0] =~ /--setup=/) {
94     $setupfile = (split(/=/, shift @ARGV))[1];
95   }
96   elsif ($ARGV[0] =~ /--extvercmd=/) {
97     $extvercmd = (split(/=/, shift @ARGV))[1];
98   }
99   elsif ($ARGV[0] =~ /--mktarball=/) {
100     $mktarball = (split(/=/, shift @ARGV))[1];
101   }
102   elsif ($ARGV[0] =~ /--name=/) {
103     $name = (split(/=/, shift @ARGV))[1];
104   }
105   elsif ($ARGV[0] =~ /--email=/) {
106     $email = (split(/=/, shift @ARGV))[1];
107   }
108   elsif ($ARGV[0] =~ /--desc=/) {
109     $desc = (split(/=/, shift @ARGV))[1];
110   }
111   elsif ($ARGV[0] =~ /--configure=(.*)/) {
112     $confopts = $1;
113     shift @ARGV;
114   }
115   elsif (($ARGV[0] eq "--nocvsup") || ($ARGV[0] eq "--nogitpull")) {
116     $nogitpull=1;
117     shift @ARGV;
118   }
119   elsif ($ARGV[0] =~ /--nobuildconf/) {
120     $nobuildconf=1;
121     shift @ARGV;
122   }
123   elsif ($ARGV[0] =~ /--noconfigure/) {
124     $configurebuild=0;
125     shift @ARGV;
126   }
127   elsif ($ARGV[0] =~ /--crosscompile/) {
128     $crosscompile=1;
129     shift @ARGV;
130   }
131   elsif ($ARGV[0] =~ /--runtestopts=/) {
132     $runtestopts = (split(/=/, shift @ARGV, 2))[1];
133   }
134   else {
135     $CURLDIR=shift @ARGV;
136     $git=0; # a given dir, assume not using git
137   }
138 }
139
140 # Do the platform-specific stuff here
141 $confheader = 'curl_config.h';
142 $binext = '';
143 $libext = '.la'; # .la since both libcurl and libcares are made with libtool
144 if ($^O eq 'MSWin32' || $targetos) {
145   if (!$targetos) {
146     # If no target defined on Win32 lets assume vc
147     $targetos = 'vc';
148   }
149   if ($targetos =~ /vc/ || $targetos =~ /borland/ || $targetos =~ /watcom/) {
150     $binext = '.exe';
151     $libext = '.lib';
152   }
153   elsif ($targetos =~ /mingw/) {
154     $binext = '.exe';
155     if ($^O eq 'MSWin32') {
156       $libext = '.a';
157     }
158   }
159   elsif ($targetos =~ /netware/) {
160     $configurebuild = 0;
161     $binext = '.nlm';
162     if ($^O eq 'MSWin32') {
163       $libext = '.lib';
164     }
165     else {
166       $libext = '.a';
167     }
168   }
169 }
170
171 if (($^O eq 'MSWin32' || $^O eq 'msys') &&
172     ($targetos =~ /vc/ || $targetos =~ /mingw32/ ||
173      $targetos =~ /borland/ || $targetos =~ /watcom/)) {
174
175   # Set these things only when building ON Windows and for Win32 platform.
176   # FOR Windows since we might be cross-compiling on another system. Non-
177   # Windows builds still default to configure-style builds with curl_config.h.
178
179   $configurebuild = 0;
180   $confheader = 'config-win32.h';
181 }
182
183 $ENV{LC_ALL}="C" if (($ENV{LC_ALL}) && ($ENV{LC_ALL} !~ /^C$/));
184 $ENV{LC_CTYPE}="C" if (($ENV{LC_CTYPE}) && ($ENV{LC_CTYPE} !~ /^C$/));
185 $ENV{LANG}="C";
186
187 sub rmtree($) {
188     my $target = $_[0];
189     if ($^O eq 'MSWin32') {
190       foreach (glob($target)) {
191         s:/:\\:g;
192         system("rd /s /q $_");
193       }
194     } else {
195       system("rm -rf $target");
196     }
197 }
198
199 sub grepfile($$) {
200     my ($target, $fn) = @_;
201     open(F, $fn) or die;
202     while (<F>) {
203       if (/$target/) {
204         close(F);
205         return 1;
206       }
207     }
208     close(F);
209     return 0;
210 }
211
212 sub logit($) {
213     my $text=$_[0];
214     if ($text) {
215       print "testcurl: $text\n";
216     }
217 }
218
219 sub logit_spaced($) {
220     my $text=$_[0];
221     if ($text) {
222       print "\ntestcurl: $text\n\n";
223     }
224 }
225
226 sub mydie($){
227     my $text=$_[0];
228     logit "$text";
229     chdir $pwd; # cd back to the original root dir
230
231     if ($pwd && $build) {
232       # we have a build directory name, remove the dir
233       logit "removing the $build dir";
234       rmtree "$pwd/$build";
235     }
236     if (-r $buildlog) {
237       # we have a build log output file left, remove it
238       logit "removing the $buildlogname file";
239       unlink "$buildlog";
240     }
241     logit "ENDING HERE"; # last line logged!
242     exit 1;
243 }
244
245 sub get_host_triplet {
246   my $triplet;
247   my $configfile = "$pwd/$build/lib/curl_config.h";
248
249   if(-f $configfile && -s $configfile && open(LIBCONFIGH, "<$configfile")) {
250     while(<LIBCONFIGH>) {
251       if($_ =~ /^\#define\s+OS\s+"*([^"][^"]*)"*\s*/) {
252         $triplet = $1;
253         last;
254       }
255     }
256     close(LIBCONFIGH);
257   }
258   return $triplet;
259 }
260
261 if (open(F, "$setupfile")) {
262   while (<F>) {
263     if (/(\w+)=(.*)/) {
264       eval "\$$1=$2;";
265     }
266   }
267   close(F);
268   $infixed=$fixed;
269 } else {
270   $infixed=0;    # so that "additional args to configure" works properly first time...
271 }
272
273 if (!$name) {
274   print "please enter your name\n";
275   $name = <>;
276   chomp $name;
277   $fixed=1;
278 }
279
280 if (!$email) {
281   print "please enter your contact email address\n";
282   $email = <>;
283   chomp $email;
284   $fixed=2;
285 }
286
287 if (!$desc) {
288   print "please enter a one line system description\n";
289   $desc = <>;
290   chomp $desc;
291   $fixed=3;
292 }
293
294 if (!$confopts) {
295   if ($infixed < 4) {
296     print "please enter your additional arguments to configure\n";
297     print "examples: --with-ssl --enable-debug --enable-ipv6 --with-krb4\n";
298     $confopts = <>;
299     chomp $confopts;
300   }
301 }
302
303
304 if ($fixed < 4) {
305     $fixed=4;
306     open(F, ">$setupfile") or die;
307     print F "name='$name'\n";
308     print F "email='$email'\n";
309     print F "desc='$desc'\n";
310     print F "confopts='$confopts'\n";
311     print F "notes='$notes'\n";
312     print F "fixed='$fixed'\n";
313     close(F);
314 }
315
316 # Enable picky compiler warnings unless explicitly disabled
317 if (($confopts !~ /--enable-debug/) &&
318     ($confopts !~ /--enable-warnings/) &&
319     ($confopts !~ /--disable-warnings/)) {
320   $confopts .= " --enable-warnings";
321 }
322
323 my $str1066os = 'o' x 1066;
324
325 # Set timestamp to the UTC this script is running. Its value might
326 # be changed later in the script to the value present in curlver.h
327 $timestamp = scalar(gmtime)." UTC";
328
329 logit "STARTING HERE"; # first line logged, for scripts to trigger on
330 logit 'TRANSFER CONTROL ==== 1120 CHAR LINE' . $str1066os . 'LINE_END';
331 logit "NAME = $name";
332 logit "EMAIL = $email";
333 logit "DESC = $desc";
334 logit "NOTES = $notes";
335 logit "CONFOPTS = $confopts";
336 logit "CPPFLAGS = ".$ENV{CPPFLAGS};
337 logit "CFLAGS = ".$ENV{CFLAGS};
338 logit "LDFLAGS = ".$ENV{LDFLAGS};
339 logit "CC = ".$ENV{CC};
340 logit "MAKEFLAGS = ".$ENV{MAKEFLAGS};
341 logit "ACLOCAL_FLAGS = ".$ENV{ACLOCAL_FLAGS};
342 logit "PKG_CONFIG_PATH = ".$ENV{PKG_CONFIG_PATH};
343 logit "target = ".$targetos;
344 logit "version = $version"; # script version
345 logit "date = $timestamp";  # When the test build starts
346
347 $str1066os = undef;
348
349 # Make $pwd to become the path without newline. We'll use that in order to cut
350 # off that path from all possible logs and error messages etc.
351 $pwd = getcwd();
352
353 if (-d $CURLDIR) {
354   if ($git && -d "$CURLDIR/.git") {
355     logit "$CURLDIR is verified to be a fine git source dir";
356     # remove the generated sources to force them to be re-generated each
357     # time we run this test
358     unlink "$CURLDIR/src/hugehelp.c";
359   } elsif (!$git && -f "$CURLDIR/tests/testcurl.pl") {
360     logit "$CURLDIR is verified to be a fine daily source dir"
361   } else {
362     mydie "$CURLDIR is not a daily source dir or checked out from git!"
363   }
364 }
365 $build="build-$$";
366 $buildlogname="buildlog-$$";
367 $buildlog="$pwd/$buildlogname";
368
369 # remove any previous left-overs
370 rmtree "build-*";
371 rmtree "buildlog-*";
372
373 # this is to remove old build logs that ended up in the wrong dir
374 foreach (glob("$CURLDIR/buildlog-*")) { unlink $_; }
375
376 # create a dir to build in
377 mkdir $build, 0777;
378
379 if (-d $build) {
380   logit "build dir $build was created fine";
381 } else {
382   mydie "failed to create dir $build";
383 }
384
385 # get in the curl source tree root
386 chdir $CURLDIR;
387
388 # Do the git thing, or not...
389 if ($git) {
390   # update quietly to the latest git
391   if($nogitpull) {
392     logit "skipping git pull (--nogitpull)";
393   } else {
394     my $gitstat = 0;
395     my @commits;
396     logit "run git pull in curl";
397     system("git pull 2>&1");
398     $gitstat += $?;
399     logit "failed to update from curl git ($?), continue anyway" if ($?);
400     # get the last 5 commits for show (even if no pull was made)
401     @commits=`git log --pretty=oneline --abbrev-commit -5`;
402     logit "The most recent curl git commits:";
403     for (@commits) {
404       chomp ($_);
405       logit "  $_";
406     }
407     if (-d "ares/.git") {
408       chdir "ares";
409       logit "run git pull in ares";
410       system("git pull 2>&1");
411       $gitstat += $?;
412       logit "failed to update from ares git ($?), continue anyway" if ($?);
413       # get the last 5 commits for show (even if no pull was made)
414       @commits=`git log --pretty=oneline --abbrev-commit -5`;
415       logit "The most recent ares git commits:";
416       for (@commits) {
417         chomp ($_);
418         logit "  $_";
419       }
420       chdir "$pwd/$CURLDIR";
421     }
422     # Set timestamp to the UTC the git update took place.
423     $timestamp = scalar(gmtime)." UTC" if (!$gitstat);
424   }
425
426   if($nobuildconf) {
427     logit "told to not run buildconf";
428   }
429   elsif ($configurebuild) {
430     # remove possible left-overs from the past
431     unlink "configure";
432     unlink "autom4te.cache";
433
434     # generate the build files
435     logit "invoke buildconf";
436     open(F, "./buildconf 2>&1 |") or die;
437     open(LOG, ">$buildlog") or die;
438     while (<F>) {
439       my $ll = $_;
440       # ignore messages pertaining to third party m4 files we don't care
441       next if ($ll =~ /aclocal\/gtk\.m4/);
442       next if ($ll =~ /aclocal\/gtkextra\.m4/);
443       print $ll;
444       print LOG $ll;
445     }
446     close(F);
447     close(LOG);
448
449     if (grepfile("^buildconf: OK", $buildlog)) {
450       logit "buildconf was successful";
451     }
452     else {
453       mydie "buildconf was NOT successful";
454     }
455   }
456   else {
457     logit "buildconf was successful (dummy message)";
458   }
459 }
460
461 # Set timestamp to the one in curlver.h if this isn't a git test build.
462 if ((-f "include/curl/curlver.h") &&
463     (open(F, "<include/curl/curlver.h"))) {
464   while (<F>) {
465     chomp;
466     if ($_ =~ /^\#define\s+LIBCURL_TIMESTAMP\s+\"(.+)\".*$/) {
467       my $stampstring = $1;
468       if ($stampstring !~ /DEV/) {
469           $stampstring =~ s/\s+UTC//;
470           $timestamp = $stampstring." UTC";
471       }
472       last;
473     }
474   }
475   close(F);
476 }
477
478 # Show timestamp we are using for this test build.
479 logit "timestamp = $timestamp";
480
481 if ($configurebuild) {
482   if (-f "configure") {
483     logit "configure created (at least it exists)";
484   } else {
485     mydie "no configure created/found";
486   }
487 } else {
488   logit "configure created (dummy message)"; # dummy message to feign success
489 }
490
491 sub findinpath {
492   my $c;
493   my $e;
494   my $x = ($^O eq 'MSWin32') ? '.exe' : '';
495   my $s = ($^O eq 'MSWin32') ? ';' : ':';
496   my $p=$ENV{'PATH'};
497   my @pa = split($s, $p);
498   for $c (@_) {
499     for $e (@pa) {
500       if( -x "$e/$c$x") {
501         return $c;
502       }
503     }
504   }
505 }
506
507 my $make = findinpath("gmake", "make", "nmake");
508 if(!$make) {
509     mydie "Couldn't find make in the PATH";
510 }
511 # force to 'nmake' for VC builds
512 $make = "nmake" if ($targetos =~ /vc/);
513 # force to 'wmake' for Watcom builds
514 $make = "wmake" if ($targetos =~ /watcom/);
515 logit "going with $make as make";
516
517 # change to build dir
518 chdir "$pwd/$build";
519
520 if ($configurebuild) {
521   # run configure script
522   print `../$CURLDIR/configure $confopts 2>&1`;
523
524   if (-f "lib/Makefile") {
525     logit "configure seems to have finished fine";
526   } else {
527     mydie "configure didn't work";
528   }
529 } else {
530   logit "copying files to build dir ...";
531   if (($^O eq 'MSWin32') && ($targetos !~ /netware/)) {
532     system("xcopy /s /q ..\\$CURLDIR .");
533     system("buildconf.bat");
534   }
535   elsif ($targetos =~ /netware/) {
536     system("cp -afr ../$CURLDIR/* .");
537     system("cp -af ../$CURLDIR/Makefile.dist Makefile");
538     system("$make -i -C lib -f Makefile.netware prebuild");
539     system("$make -i -C src -f Makefile.netware prebuild");
540     if (-d "../$CURLDIR/ares") {
541       system("$make -i -C ares -f Makefile.netware prebuild");
542     }
543   }
544   elsif ($^O eq 'linux') {
545     system("cp -afr ../$CURLDIR/* .");
546     system("cp -af ../$CURLDIR/Makefile.dist Makefile");
547     system("cp -af ../$CURLDIR/include/curl/curlbuild.h.dist ./include/curl/curlbuild.h");
548     system("$make -i -C lib -f Makefile.$targetos prebuild");
549     system("$make -i -C src -f Makefile.$targetos prebuild");
550     if (-d "../$CURLDIR/ares") {
551       system("cp -af ../$CURLDIR/ares/ares_build.h.dist ./ares/ares_build.h");
552       system("$make -i -C ares -f Makefile.$targetos prebuild");
553     }
554   }
555 }
556
557 if(-f "./libcurl.pc") {
558   logit_spaced "display libcurl.pc";
559   if(open(F, "<./libcurl.pc")) {
560     while(<F>) {
561       my $ll = $_;
562       print $ll if(($ll !~ /^ *#/) && ($ll !~ /^ *$/));
563     }
564     close(F);
565   }
566 }
567
568 if(-f "./include/curl/curlbuild.h") {
569   logit_spaced "display include/curl/curlbuild.h";
570   if(open(F, "<./include/curl/curlbuild.h")) {
571     while(<F>) {
572       my $ll = $_;
573       print $ll if(($ll =~ /^ *# *define *CURL_/) && ($ll !~ /__CURL_CURLBUILD_H/));
574     }
575     close(F);
576   }
577 }
578 else {
579   mydie "no curlbuild.h created/found";
580 }
581
582 logit_spaced "display lib/$confheader";
583 open(F, "lib/$confheader") or die "lib/$confheader: $!";
584 while (<F>) {
585   print if /^ *#/;
586 }
587 close(F);
588
589 if (grepfile("^#define USE_ARES", "lib/$confheader")) {
590   print "\n";
591   logit "setup to build ares";
592
593   if(-f "./ares/libcares.pc") {
594     logit_spaced  "display ares/libcares.pc";
595     if(open(F, "<./ares/libcares.pc")) {
596       while(<F>) {
597         my $ll = $_;
598         print $ll if(($ll !~ /^ *#/) && ($ll !~ /^ *$/));
599       }
600       close(F);
601     }
602   }
603
604   if(-f "./ares/ares_build.h") {
605     logit_spaced "display ares/ares_build.h";
606     if(open(F, "<./ares/ares_build.h")) {
607       while(<F>) {
608         my $ll = $_;
609         print $ll if(($ll =~ /^ *# *define *CARES_/) && ($ll !~ /__CARES_BUILD_H/));
610       }
611       close(F);
612     }
613   }
614   else {
615     mydie "no ares_build.h created/found";
616   }
617
618   $confheader =~ s/curl/ares/;
619   logit_spaced "display ares/$confheader";
620   if(open(F, "ares/$confheader")) {
621       while (<F>) {
622           print if /^ *#/;
623       }
624       close(F);
625   }
626
627   print "\n";
628   logit "build ares";
629   chdir "ares";
630
631   if ($targetos && !$configurebuild) {
632       logit "$make -f Makefile.$targetos";
633       open(F, "$make -f Makefile.$targetos 2>&1 |") or die;
634   }
635   else {
636       logit "$make";
637       open(F, "$make 2>&1 |") or die;
638   }
639   while (<F>) {
640     s/$pwd//g;
641     print;
642   }
643   close(F);
644
645   if (-f "libcares$libext") {
646     logit "ares is now built successfully (libcares$libext)";
647   } else {
648     mydie "ares build failed (libcares$libext)";
649   }
650
651   # cd back to the curl build dir
652   chdir "$pwd/$build";
653 }
654
655 my $mkcmd = "$make -i" . ($targetos && !$configurebuild ? " $targetos" : "");
656 logit "$mkcmd";
657 open(F, "$mkcmd 2>&1 |") or die;
658 while (<F>) {
659   s/$pwd//g;
660   print;
661 }
662 close(F);
663
664 if (-f "lib/libcurl$libext") {
665   logit "libcurl was created fine (libcurl$libext)";
666 }
667 else {
668   mydie "libcurl was not created (libcurl$libext)";
669 }
670
671 if (-f "src/curl$binext") {
672   logit "curl was created fine (curl$binext)";
673 }
674 else {
675   mydie "curl was not created (curl$binext)";
676 }
677
678 if (!$crosscompile || (($extvercmd ne '') && (-x $extvercmd))) {
679   logit "display curl${binext} --version output";
680   my $cmd = ($extvercmd ne '' ? $extvercmd.' ' : '')."./src/curl${binext} --version|";
681   open(F, $cmd);
682   while(<F>) {
683     # strip CR from output on non-win32 platforms (wine on Linux)
684     s/\r// if ($^O ne 'MSWin32');
685     print;
686   }
687   close(F);
688 }
689
690 if ($configurebuild && !$crosscompile) {
691   my $o;
692   if($runtestopts) {
693       $o = "TEST_F=\"$runtestopts\" ";
694   }
695   logit "$make -k ${o}test-full";
696   open(F, "$make -k ${o}test-full 2>&1 |") or die;
697   open(LOG, ">$buildlog") or die;
698   while (<F>) {
699     s/$pwd//g;
700     print;
701     print LOG;
702   }
703   close(F);
704   close(LOG);
705
706   if (grepfile("^TEST", $buildlog)) {
707     logit "tests were run";
708   } else {
709     mydie "test suite failure";
710   }
711
712   if (grepfile("^TESTFAIL:", $buildlog)) {
713     logit "the tests were not successful";
714   } else {
715     logit "the tests were successful!";
716   }
717 }
718 else {
719   if($crosscompile) {
720     # build test harness programs for selected cross-compiles
721     my $host_triplet = get_host_triplet();
722     if($host_triplet =~ /([^-]+)-([^-]+)-mingw(.*)/) {
723       chdir "$pwd/$build/tests";
724       logit_spaced "build test harness";
725       open(F, "$make -i 2>&1 |") or die;
726       open(LOG, ">$buildlog") or die;
727       while (<F>) {
728         s/$pwd//g;
729         print;
730         print LOG;
731       }
732       close(F);
733       close(LOG);
734       chdir "$pwd/$build";
735     }
736     logit_spaced "cross-compiling, can't run tests";
737   }
738   # dummy message to feign success
739   print "TESTDONE: 1 tests out of 0 (dummy message)\n";
740 }
741
742 # create a tarball if we got that option.
743 if (($mktarball ne '') && (-x $mktarball)) {
744   system($mktarball);
745 }
746
747 # mydie to cleanup
748 mydie "ending nicely";