Lines Matching refs:DIR
101 my $Dir = shift;
103 Diag ("Preprocessed versions of these sources were deposited in '$Dir/failures'.\n");
150 my $Dir = shift @_;
152 if (!defined $Dir) {
153 $Dir = $ENV{'TMPDIR'} || $ENV{'TEMP'} || $ENV{'TMP'} || "/tmp";
158 while ($Dir =~ /\/$/) { chop $Dir; }
176 if (-d $Dir) {
177 if (! -r $Dir) {
178 DieDiag("directory '$Dir' exists but is not readable.\n");
182 opendir(DIR, $Dir);
183 my @FILES = grep { -d "$Dir/$_" } readdir(DIR);
184 closedir(DIR);
210 if (-x $Dir) {
211 DieDiag("'$Dir' exists but is not a directory.\n");
218 # $Dir does not exist. It will be automatically created by the
229 $NewDir = "$Dir/$Prog-$DateString-$RunNumber";
232 $NewDir = "$Dir/$DateString-$RunNumber";
249 my $Dir = shift;
260 Diag("Emitting reports for this run to '$Dir'.\n");
263 $ENV{'CCC_ANALYZER_HTML'} = $Dir;
377 my $Dir = shift;
384 my $digest = ComputeDigest("$Dir/$FName");
388 unlink("$Dir/$FName");
395 chmod(0644, "$Dir/$FName");
398 open(IN, "$Dir/$FName") or DieDiag("Cannot open '$Dir/$FName'\n");
463 my $Dir = shift;
470 copy($JS, "$Dir");
472 DieDiag("Could not copy 'sorttable.js' to '$Dir'.\n")
473 if (! -r "$Dir/sorttable.js");
480 copy($CSS, "$Dir");
482 DieDiag("Could not copy 'scanview.css' to '$Dir'.\n")
553 my $Dir = shift;
558 die "No directory specified." if (!defined $Dir);
560 if (! -d $Dir) {
565 $baseDir = $Dir . "/";
566 find({ wanted => \&FileWanted, follow => 0}, $Dir);
568 if (scalar(@filesFound) == 0 and ! -e "$Dir/failures") {
570 Diag("Removing directory '$Dir' because it contains no reports.\n");
571 rmtree($Dir) or die "Cannot rmtree '$Dir' : $!";
580 foreach my $file (@filesFound) { ScanFile(\@Index, $Dir, $file, \@Stats); }
586 if (-d "$Dir/failures") {
587 opendir(DIR, "$Dir/failures");
588 @failures = grep { /[.]info.txt$/ && !/attribute_ignored/; } readdir(DIR);
589 closedir(DIR);
590 opendir(DIR, "$Dir/failures");
591 @attributes_ignored = grep { /^attribute_ignored/; } readdir(DIR);
592 closedir(DIR);
594 open IN, "$Dir
602 my $FName = "$Dir/index.html";
784 UpdateInFilePath("$Dir/$ReportFile", $InFileRegex, $InFilePrefix)
841 next if (!open (ATTR, "$Dir/failures/$file"));
845 next if (! -e "$Dir/failures/$ppfile");
847 open (INFO, "$Dir/failures/$ppfile.info.txt") or
848 die "Cannot open $Dir/failures/$ppfile.info.txt\n";
872 open (INFO, "$Dir/failures/$file") or
873 die "Cannot open $Dir/failures/$file\n";
894 CopyFiles($Dir);
896 # Make sure $Dir and $BaseDir are world readable/executable.
897 chmod(0755, $Dir);
909 if ($Num > 0 && -r "$Dir/index.html") {
910 Diag("Run 'scan-view $Dir' to examine bug reports.\n");
913 DiagCrashes($Dir) if (scalar @failures || scalar @attributes_ignored);
1482 mkpath($OutDir) unless (-e $OutDir); # abs_path wants existing dir