[LLVMbugs] [Bug 6985] New: RFE: scan-build should take env variables for repository name, sha1, etc.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Apr 30 00:25:15 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=6985

           Summary: RFE: scan-build should take env variables for
                    repository name, sha1, etc.
           Product: clang
           Version: 2.6
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: amitshah at gmx.net
                CC: llvmbugs at cs.uiuc.edu


I run scan-build nightly on the qemu repository. Recording the sha-1 of the
working tree and the repository name is nice. I carry this patch locally for
scan-build doing this:

--- /usr/bin/scan-build 2009-08-04 22:35:18.000000000 +0530
+++ /home/amit/bin/scan-build   2010-01-12 22:37:37.871876419 +0530
@@ -22,6 +22,8 @@
 use Cwd qw/ getcwd abs_path /;
 use Sys::Hostname;

+my $RealBin = "/usr/lib64/clang-analyzer";
+
 my $Verbose = 0;       # Verbose output from this script.
 my $Prog = "scan-build";
 my $BuildName;
@@ -36,6 +38,9 @@
 my $HostName = HtmlEscape(hostname() || 'unknown');
 my $CurrentDir = HtmlEscape(getcwd());
 my $CurrentDirSuffix = basename($CurrentDir);
+my $RepoName = $ENV{'CLANG_REPONAME'};
+my $BranchName = $ENV{'CLANG_BRANCHNAME'};
+my $CommitHash = $ENV{'CLANG_COMMITHASH'};

 my $CmdArgs;

@@ -560,8 +565,9 @@
 <h1>${HtmlTitle}</h1>

 <table>
-<tr><th>User:</th><td>${UserName}\@${HostName}</td></tr>
-<tr><th>Working Directory:</th><td>${CurrentDir}</td></tr>
+<tr><th>Repository:</th><td>${RepoName}</td></tr>
+<tr><th>Branch:</th><td>${BranchName}</td></tr>
+<tr><th>Commit Hash:</th><td>${CommitHash}</td></tr>
 <tr><th>Command Line:</th><td>${CmdArgs}</td></tr>
 <tr><th>Date:</th><td>${Date}</td></tr>
 ENDTEXT

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list