From: Eric S. Raymond Date: Mon, 14 Jan 2013 22:21:00 +0000 (-0500) Subject: Support having a Coverity name different from the directory name. X-Git-Tag: 1.5~1 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=73b63f44cb892032eac803102c6ab4099cc75a63;p=coverity-submit.git Support having a Coverity name different from the directory name. --- diff --git a/NEWS b/NEWS index d929e23..2e4ba81 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ NEWS file for coverty-submit +1.5 @ + Support having the Coverity name to be different from the project name. + 1.4 @ 20132-01-12 Make it safe for multiple users on the same machine. Implement a verbosity option. diff --git a/coverity-submit b/coverity-submit index 5158d6a..77d29ef 100755 --- a/coverity-submit +++ b/coverity-submit @@ -49,6 +49,10 @@ if __name__ == '__main__': die("No such project as %s" % project) # Collect project-specific variables + if config.has_option(project, "name"): + covname = config.get(project, "name") + else: + covname = project if config.has_option(project, "password"): password = config.get(project, "password") else: @@ -101,7 +105,7 @@ if __name__ == '__main__': readme = """\ Name: %(name)s Email: %(email)s - Project: %(project)s + Project: %(covname)s Submitted-by: coverity-submit """ % globals() if verbose: @@ -110,12 +114,12 @@ if __name__ == '__main__': if not noexec: with open(os.path.join(tmpdir, "README"), "w") as wfp: wfp.write(readme) - tarball = "%s-scan.tgz" % project + tarball = "%s-scan.tgz" % covname do_or_die("mv cov-int %s; (cd %s; tar -czf %s README cov-int; rm -fr README cov-int)" % (tmpdir, tmpdir, tarball)) print("Posting the analysis request...") do_or_die('''curl \ --form file=@/tmp/%(tarball)s \ - --form project=%(project)s \ + --form project=%(covname)s \ --form password=%(password)s \ --form email=%(email)s \ http://scan5.coverity.com/cgi-bin/upload.py \ diff --git a/coverity-submit.xml b/coverity-submit.xml index 339f8b5..98ac5f5 100644 --- a/coverity-submit.xml +++ b/coverity-submit.xml @@ -59,6 +59,14 @@ password: YYYYYYY prebuild: autogen.sh && make clean build: make -k postbuild: + +[cvs-fast-export] +name: parsecvs +password: ZZZZZZZ +prebuild: make clean +build: make +postbuild: + Begin with an [ALL] section giving your name and userid on the @@ -70,11 +78,19 @@ or specify different addresses per-project. 'tools' option to tell coverity-submit where to find it. -This configuration describes two different (real) projects, one -with an scons-based build and one with an autotools-based build. For -each project you must specifty the Coverity build password and the -local build command to pass to cov-build. You may optionally specify -local prebuild and postbuild commands. +This configuration describes three different (real) projects; +one with an scons-based build, one with an autotools-based build, and +one with a plain makefile build. For each project you must specify the +Coverity build password and the local build command to pass to +cov-build. You may optionally specify local prebuild and postbuild +commands. + +The third example also illustrates how to describe a project +that is known to Coverity by a different name (in this case +parsecvs) from the basename of the directory you keep +it in (in this case cvs-fast-export). This can of +course easily happen if your project's public name changes after +you register it. The and options of versions 1.1 and previously are no longer needed, as