[LLVMdev] Getting LNT to work with non-bash shell

Justin Bogner mail at justinbogner.com
Wed Jun 25 12:10:53 PDT 2014


I've updated both TEST.simple.Makefile and TEST.dbg.Makefile in
r211729. Hopefully that should clear things up.

Jeremy Salwen <jeremysalwen at gmail.com> writes:
> It seems that TEST.dbg.Makefile also uses the == operator.
>
> On Wed, Jun 25, 2014 at 1:25 PM, Jeremy Salwen <jeremysalwen at gmail.com> wrote:
>
>     The attached patch didn't fix it, but when I also changed another == to =
>     a few lines further down it seemed to work.
>    
>     Jeremy
>
>     On Tue, Jun 24, 2014 at 10:07 PM, Justin Bogner <mail at justinbogner.com>
>     wrote:
>    
>         Jeremy Salwen <jeremysalwen at gmail.com> writes:
>         > I followed the LNT quickstart guide
>         > (http://llvm.org/docs/lnt/quickstart.html) on my debian machine, and
>         > it seems to have a problem running.  When I consult test.log, every
>         > single test has a section like this
>         >
>         >     # Pretend that the reference output was produced
>         instantaneously.
>         >     cp /home/jeremy/hardware/llvm/test-suite/instant.txt Output/
>         >     sse.expandfft.out-nat.time
>         >     /home/jeremy/hardware/llvm/test-suite/DiffOutput.sh "/home/
>         jeremy/hardware
>         >     /llvm/mysandbox/test-2014-06-24_20-20-59/tools/fpcmp  -r 0.016"
>         simple
>         >     sse.expandfft
>         >     rm -f Output/sse.expandfft.exe-simple
>         >     cp Output/sse.expandfft.diff-simple Output/
>         sse.expandfft.exe-simple
>         >     /bin/sh: 7: test: 0: unexpected operator
>         >     if test -f Output/sse.expandfft.extra-results.txt; then \
>         >           /home/jeremy/hardware/llvm/test-suite/ParseMultipleResults
>         /home/
>         >     jeremy/hardware/llvm/mysandbox/test-2014-06-24_20-20-59/
>         SingleSource/
>         >     UnitTests/Vector/SSE/sse.expandfft Output/
>         sse.expandfft.extra-results.txt
>         >     >> Output/sse.expandfft.simple.exec.report.txt; \
>         >         fi
>         >     cat Output/sse.expandfft.simple.compile.report.txt Output/
>         >     sse.expandfft.simple.exec.report.txt >> Output/
>         >     sse.expandfft.simple.report.txt
>         >
>         > Notice the line "/bin/sh: 7: test: 0: unexpected operator".
>         >
>         > Although I don't understand how the LNT infrastructure works
>         exactly, I'm
>         > pretty sure that this is an error due to the difference between bash
>         and dash,
>         > the default /bin/sh on debian.  When I tried running one of the make
>         commands
>         > that LNT runs with the additional option SHELL=/bin/bash I got
>         similar output,
>         > but without the error.  I'm not sure what bash specific features are
>         being
>         > used.
>        
>         Looks like TEST.simple.Makefile is using the == operator, which isn't
>         POSIX. Does the attached patch to the test-suite help?




More information about the llvm-dev mailing list