1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-15 15:50:57 -08:00
emacs/mps/qa/test/script/dirs
Richard Tucker b6a5d5ca29 Add hopename
Copied from Perforce
 Change: 19336
 ServerID: perforce.ravenbrook.com
1998-02-23 16:12:09 +00:00

33 lines
679 B
Perl

#!/usr/local/perl
# $HopeName$
#
# set directories up for testing
# n.b. this must happen _after_ options have been
# parsed, so we know what the value of $PLATFORM is
#
$testlib_dir = $test_dir."/testlib";
$obj_dir = $test_dir."/obj/".$PLATFORM;
&ensuredir($obj_dir);
$report_dir = $test_dir."/report";
&ensuredir($report_dir);
sub ensuredir {
local ($dir, $tdir, $odir) = @_;
until (-e $dir) {
$tdir = $dir;
$odir = $dir;
until (-e $tdir) {
$odir = $tdir;
unless ($tdir =~ /\/[^\/]*$/) {
die "Failed to create dir: $dir.\n";
}
$tdir =~ s/\/[^\/]*$//; # assume / is separator;
}
mkdir($odir, 0777) || die "Failed to create dir: $dir.\n";
}
}