[llvm] r206119 - Fix test syntax to work with non-bash /bin/sh.

Joerg Sonnenberger joerg at britannica.bec.de
Sat Apr 12 15:24:33 PDT 2014


On Sat, Apr 12, 2014 at 03:18:07PM -0700, Duncan P. N. Exon Smith wrote:
> 
> On 2014 Apr 12, at 14:13, Joerg Sonnenberger <joerg at bec.de> wrote:
> 
> > Author: joerg
> > Date: Sat Apr 12 16:13:41 2014
> > New Revision: 206119
> > 
> > URL: http://llvm.org/viewvc/llvm-project?rev=206119&view=rev
> > Log:
> > Fix test syntax to work with non-bash /bin/sh.
> > 
> > Modified:
> >    llvm/trunk/utils/lit/utils/check-coverage
> >    llvm/trunk/utils/lit/utils/check-sdist
> > 
> > Modified: llvm/trunk/utils/lit/utils/check-coverage
> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/utils/check-coverage?rev=206119&r1=206118&r2=206119&view=diff
> > ==============================================================================
> > --- llvm/trunk/utils/lit/utils/check-coverage (original)
> > +++ llvm/trunk/utils/lit/utils/check-coverage Sat Apr 12 16:13:41 2014
> > @@ -9,13 +9,13 @@ if [ ! -f setup.py ] || [ ! -d lit ]; th
> > fi
> > 
> > # Parse command line arguments.
> > -if [ "$1" == "--generate-html" ]; then
> > +if [ "$1" = "--generate-html" ]; then
> >     GENERATE_HTML=1
> >     shift
> > fi
> > 
> > # If invoked with no arguments, run all the tests.
> > -if [ $# == "0" ]; then
> > +if [ $# = "0" ]; then
> 
> Isn't this better as [ $# -eq 0 ]?

It will give the same result, but feel free to change it.

Joerg



More information about the llvm-commits mailing list