Lines Matching refs:Dir
60 my $Dir = shift;
62 Diag ("Preprocessed versions of these sources were deposited in '$Dir/failures'.\n");
108 my $Dir = shift @_;
110 if (!defined $Dir) {
112 $Dir = $ENV{'TMPDIR'};
113 if (!defined $Dir) { $Dir = "/tmp"; }
116 $Dir = "/tmp";
122 while ($Dir =~ /\/$/) { chop $Dir; }
134 if (-d $Dir) {
135 if (! -r $Dir) {
136 DieDiag("directory '$Dir' exists but is not readable.\n");
140 opendir(DIR, $Dir);
141 my @FILES = grep { -d "$Dir/$_" } readdir(DIR);
142 closedir(DIR);
166 if (-x $Dir) {
167 DieDiag("'$Dir' exists but is not a directory.\n");
174 # $Dir does not exist. It will be automatically created by the
185 $NewDir = "$Dir/$Prog-$DateString-$RunNumber";
188 $NewDir = "$Dir/$DateString-$RunNumber";
199 my $Dir = shift;
210 Diag("Emitting reports for this run to '$Dir'.\n");
213 $ENV{'CCC_ANALYZER_HTML'} = $Dir;
326 my $Dir = shift;
333 my $digest = ComputeDigest("$Dir/$FName");
337 system ("rm", "-f", "$Dir/$FName");
344 system ("chmod", "644", "$Dir/$FName");
347 open(IN, "$Dir/$FName") or DieDiag("Cannot open '$Dir/$FName'\n");
402 my $Dir = shift;
409 system ("cp", $JS, "$Dir");
411 DieDiag("Could not copy 'sorttable.js' to '$Dir'.\n")
412 if (! -r "$Dir/sorttable.js");
419 system ("cp", $CSS, "$Dir");
421 DieDiag("Could not copy 'scanview.css' to '$Dir'.\n")
478 my $Dir = shift;
482 die "No directory specified." if (!defined $Dir);
484 if (! -d $Dir) {
489 opendir(DIR, $Dir);
490 my @files = grep { /^report-.*\.html$/ } readdir(DIR);
491 closedir(DIR);
493 if (scalar(@files) == 0 and ! -e "$Dir/failures") {
494 Diag("Removing directory '$Dir' because it contains no reports.\n");
495 system ("rm", "-fR", $Dir);
502 foreach my $file (@files) { ScanFile(\@Index, $Dir, $file, \@Stats); }
508 if (-d "$Dir/failures") {
509 opendir(DIR, "$Dir/failures");
510 @failures = grep { /[.]info.txt$/ && !/attribute_ignored/; } readdir(DIR);
511 closedir(DIR);
512 opendir(DIR, "$Dir/failures");
513 @attributes_ignored = grep { /^attribute_ignored/; } readdir(DIR);
514 closedir(DIR);
516 open IN, "$Dir/failures/$file" or DieDiag("cannot open $file\n");
524 my $FName = "$Dir/index.html";
704 UpdateInFilePath("$Dir/$ReportFile", $InFileRegex, $InFilePrefix)
757 next if (!open (ATTR, "$Dir/failures/$file"));
761 next if (! -e "$Dir/failures/$ppfile");
763 open (INFO, "$Dir/failures/$ppfile.info.txt") or
764 die "Cannot open $Dir/failures/$ppfile.info.txt\n";
788 open (INFO, "$Dir/failures/$file") or
789 die "Cannot open $Dir/failures/$file\n";
810 CopyFiles($Dir);
812 # Make sure $Dir and $BaseDir are world readable/executable.
813 system("chmod", "755", $Dir);
821 if ($Num > 0 && -r "$Dir/index.html") {
822 Diag("Run 'scan-view $Dir' to examine bug reports.\n");
825 DiagCrashes($Dir) if (scalar @failures || scalar @attributes_ignored);