password = config.get(project, "password")
else:
die("Every project requires a password option.")
+if config.has_option(project, "email"):
+ email = config.get(project, "email")
+else:
+ die("Every project requires an email option.")
if config.has_option(project, "upload"):
upload = config.get(project, "upload")
else:
print(cmd)
if not noexec:
if os.system(cmd) != 0:
- bailout("Command failed")
+ sys.stderr.write("Command failed.\n")
# Build local stuff
+print("Rebuilding and scanning...")
if prebuild:
do_or_die(prebuild)
do_or_die("rm -fr cov-int && cov-build --dir cov-int " + build)
do_or_die(postbuild)
# Create the tarball
+print("Bundling up required metadata...")
+readme = """\
+Name: %(name)s
+Email: %(email)s
+Project: %(project)s
+Submitted-by: coverity-submit
+""" % locals()
+sys.stdout.write(readme)
+if not noexec:
+ with open("/tmp/README", "w") as wfp:
+ wfp.write(readme)
+tarball = "%s-scan.tgz" % project
+do_or_die("mv cov-int /tmp; (cd /tmp; tar -czf %s README cov-int; rm -fr cov-int)" % tarball)
+
+print("Uploading to where it's publicly visible...")
+do_or_die(upload % ("/tmp/" + tarball))
+url = (advertise % tarball)
+
+print("Post %s to http://scan.coverity.com/submit.html" % url)
# The following sets edit modes for GNU EMACS
# Local Variables: