1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-14 07:20:35 -08:00
emacs/mps/qa/test/script/dirs
Richard Tucker ad4502ed36 New unit
becos

Copied from Perforce
 Change: 18183
 ServerID: perforce.ravenbrook.com
1997-05-16 15:33:31 +01:00

32 lines
666 B
Perl

#!/usr/local/perl
#
# 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";
}
}