On 06/13/2017 10:54 AM, Peter Maydell wrote: > Add a new script to automate the process of running the Coverity > Scan build tools and uploading the resulting tarball to the > website. This is primarily intended to be driven from Travis, > but it can be run locally (if you are a maintainer of the > QEMU project on the Coverity Scan website and have the secret > upload token). > > Signed-off-by: Peter Maydell <[email protected]> > --- > scripts/run-coverity-scan | 170 > ++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 170 insertions(+) > create mode 100755 scripts/run-coverity-scan > > diff --git a/scripts/run-coverity-scan b/scripts/run-coverity-scan > new file mode 100755 > index 0000000..e6d5fc5 > --- /dev/null > +++ b/scripts/run-coverity-scan > @@ -0,0 +1,170 @@ > +#!/bin/sh -e
I'm not a fan of 'set -e'; it seldom does what you think it should do, especially when shell functions are involved. It's better to be explicit about error handling than it is to rely on a crutch that has well-defined but non-intuitive behavior. > +mkdir -p "$COVERITY_TOOL_BASE" > +cd "$COVERITY_TOOL_BASE" > + Of course, calls like these are where you have to either be explicit or rely on the 'set -e' crutch. Thankfully, I didn't see any bashisms, so you appeared to have stuck to portable /bin/sh code. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
