mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-24 22:07:36 +00:00
$HopeName$ -> $Id$ space -> arena mps_arena_create now takes three arguments /usr/local/perl -> /usr/bin/perl -w Missing #include <stdio.h> in several tests Bogus closedir(DIR); in script/clib Copied from Perforce Change: 182199 ServerID: perforce.ravenbrook.com
54 lines
875 B
Perl
54 lines
875 B
Perl
#!/usr/bin/perl -w
|
|
# $Id$
|
|
# Various subroutines that the MMQA harness finds useful.
|
|
#
|
|
|
|
1;
|
|
|
|
sub debug {
|
|
local ($text) = @_;
|
|
if ($DEBUG_INFO eq "on") {
|
|
print $text."\n";
|
|
}
|
|
}
|
|
|
|
sub mysystem {
|
|
local ($command) = @_;
|
|
$command = &convdirseps($command);
|
|
&debug("SYSTEM >>$command<<");
|
|
system($command);
|
|
}
|
|
|
|
sub convdirseps {
|
|
local ($a) = @_;
|
|
$a =~ s/(\S)\//$1$dirsep/g;
|
|
return $a;
|
|
}
|
|
|
|
sub mailfile {
|
|
local ($file, $subj) = @_;
|
|
|
|
if ($MAIL_RESULTS eq "on") {
|
|
&$platmailfile($file, $MAIL_TO, $subj);
|
|
}
|
|
}
|
|
|
|
#
|
|
# comparison of harness version numbers
|
|
#
|
|
|
|
sub vleq {
|
|
local ($a, $b, @a, @b) = @_;
|
|
@a = split /\./, $a;
|
|
@b = split /\./, $b;
|
|
while (defined $a[0] && defined $b[0]) {
|
|
if ($a[0] == $b[0]) {
|
|
shift @a; shift @b;
|
|
} else {
|
|
return ($a[0] < $b[0]);
|
|
}
|
|
}
|
|
if (! defined $a[0]) { $a[0] = -1 }
|
|
if (! defined $b[0]) { $b[0] = -1 }
|
|
return ($a[0] <= $b[0]);
|
|
}
|