[llvm-commits] [llvm] r163098 - /llvm/trunk/test/Makefile

Rick Foos rfoos at codeaurora.org
Wed Sep 5 13:26:02 PDT 2012


On 09/05/2012 02:33 PM, Will Schmidt wrote:
> On Wed, 2012-09-05 at 11:17 -0500, Rick Foos wrote:
>> On 09/02/2012 10:16 AM, Nuno Lopes wrote:
>>> Author: nlopes
>>> Date: Sun Sep  2 10:16:51 2012
>>> New Revision: 163098
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=163098&view=rev
>>> Log:
>>> escape special char when handling CXX_FOR_OCAMLOPT
>>>
>>> Modified:
>>>       llvm/trunk/test/Makefile
>>>
>>> Modified: llvm/trunk/test/Makefile
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile?rev=163098&r1=163097&r2=163098&view=diff
>>> ==============================================================================
>>> --- llvm/trunk/test/Makefile (original)
>>> +++ llvm/trunk/test/Makefile Sun Sep  2 10:16:51 2012
>>> @@ -131,7 +131,7 @@
>>>    	@$(ECHOPATH) s=@SHLIBDIR@=$(SharedLibDir)=g>>   lit.tmp
>>>    	@$(ECHOPATH) s=@SHLIBEXT@=$(SHLIBEXT)=g>>   lit.tmp
>>>    	@$(ECHOPATH) s=@PYTHON_EXECUTABLE@=python=g>>   lit.tmp
>>> -	@$(ECHOPATH) s, at OCAMLOPT@,$(OCAMLOPT) -cc \\\\\"$(CXX_FOR_OCAMLOPT)\\\\\" -I $(LibDir)/ocaml,g>>   lit.tmp
>>> +	@$(ECHOPATH) s=@OCAMLOPT@=$(OCAMLOPT) -cc \\\\\"$(subst =,"\\=",$(CXX_FOR_OCAMLOPT))\\\\\" -I $(LibDir)/ocaml=g>>   lit.tmp
>>>    	@$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g>>   lit.tmp
>>>    	@$(ECHOPATH) s=@ENABLE_ASSERTIONS@=$(ENABLE_ASSERTIONS)=g>>   lit.tmp
>>>    	@$(ECHOPATH) s=@TARGETS_TO_BUILD@=$(TARGETS_TO_BUILD)=g>>   lit.tmp
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>> Nuno, Will,
>>
>> I'm still getting errors on check-all with OCAML on Ubuntu 12.04.1. The
>> double quote escaping isn't working manually or in a Jenkins JNLP slave.
>> I found two workarounds.
>>
>> 1) When I switch the \\\\\" to \\\\\', the quote problem disappears and
>> check-all completes.
>>
>> 2) Another way is to limit the shell interference requiring all the
>> \\\\\'s. Since $(subst) is used, need to do it with make builtins, then
>> it's done outside of shell.
>>
>> I wrapped it again, $(subst *,'\\\"',*$(subst blah )*), and it gave me
>> an escaped version in lit.site.cfg:
>>
>> config.ocamlopt_executable = "/usr/bin/ocamlopt -cc \"g++
>> -D_FILE_OFFSET_BITS=64 -D_REENTRANT\" -I
>> /local/jenkins-swarm-u1204/workspace/llvm-repo/build-x86_64-linux-gnu/Release+Asserts/lib/ocaml"
>>
>> I have no preference either way.
>>
>> You should probably have the final word since you fixed the first part
>> of the bug, and can test it better.
> I don't have a preference as long as either works :-)
> /me defers to Nuno.
>
>> Many of the bots that run check-all don't have ocaml installed.
>> Installing OCAML on the bot slaves might be a simple thing to do to
>> improve test coverage.
> So for my better understanding..
> I do have ocaml installed on my build slaves
> (ocaml-3.12.0-6.fc16.ppc64).  Is that the key reason why I'm not seeing
> the same issue, or is there something else different with the Jenkins
> JNLP slave?
>
>
> Thanks,
> -Will
>
>
>> -rick
>>
>> ---
>>
>> make[1]: Entering directory `/local/jenkins-swarm-u1204/workspace/llvm-repo/build-x86_64-linux-gnu/test'
>> Making LLVM 'lit.site.cfg' file...
>> Making LLVM unittest 'lit.site.cfg' file...
>> make -C /local/jenkins-swarm-u1204/workspace/llvm-repo/build-x86_64-linux-gnu/test/../tools/clang/test lit.site.cfg Unit/lit.site.cfg
>> make[2]: Entering directory `/local/jenkins-swarm-u1204/workspace/llvm-repo/build-x86_64-linux-gnu/tools/clang/test'
>> Making Clang 'lit.site.cfg' file...
>> Making Clang 'Unit/lit.site.cfg' file...
>> make[2]: Leaving directory `/local/jenkins-swarm-u1204/workspace/llvm-repo/build-x86_64-linux-gnu/tools/clang/test'
>> ( ulimit -t 600 ; ulimit -d 512000 ; ulimit -m 512000 ; ulimit -v 1024000 ; \
>> 	  /local/jenkins-swarm-u1204/workspace/llvm-repo/llvm/utils/lit/lit.py -s -v . /local/jenkins-swarm-u1204/workspace/llvm-repo/build-x86_64-linux-gnu/test/../tools/clang/test )
>> Traceback (most recent call last):
>>     File "/local/jenkins-swarm-u1204/workspace/llvm-repo/llvm/utils/lit/lit.py", line 5, in<module>
>>       lit.main()
>>     File "/local/jenkins-swarm-u1204/workspace/llvm-repo/llvm/utils/lit/lit/main.py", line 522, in main
>>       testSuiteCache, localConfigCache)[1])
>>     File "/local/jenkins-swarm-u1204/workspace/llvm-repo/llvm/utils/lit/lit/main.py", line 230, in getTests
>>       ts,path_in_suite = getTestSuite(path, litConfig, testSuiteCache)
>>     File "/local/jenkins-swarm-u1204/workspace/llvm-repo/llvm/utils/lit/lit/main.py", line 199, in getTestSuite
>>       ts, relative = search(item)
>>     File "/local/jenkins-swarm-u1204/workspace/llvm-repo/llvm/utils/lit/lit/main.py", line 183, in search
>>       cache[path] = res = search1(path)
>>     File "/local/jenkins-swarm-u1204/workspace/llvm-repo/llvm/utils/lit/lit/main.py", line 174, in search1
>>       cfg = TestingConfig.frompath(cfgpath, None, litConfig, mustExist = True)
>>     File "/local/jenkins-swarm-u1204/workspace/llvm-repo/llvm/utils/lit/lit/TestingConfig.py", line 53, in frompath
>>       exec f in cfg_globals
>>     File "/local/jenkins-swarm-u1204/workspace/llvm-repo/build-x86_64-linux-gnu/test/lit.site.cfg", line 11
>>       config.ocamlopt_executable = "/usr/bin/ocamlopt -cc "g++ -D_FILE_OFFSET_BITS=64 -D_REENTRANT" -I /local/jenkins-swarm-u1204/workspace/llvm-repo/build-x86_64-linux-gnu/Release+Asserts/lib/ocaml"
>>                                                            ^
>> SyntaxError: invalid syntax
>>
>> make[1]: *** [check-local-all] Error 1
>>
>>
>
OCAML is picked up by configure, and used by check-all. So your 
buildslave with OCAML will just run the tests.

For now ignore Jenkins. I find most of my build problems using Jenkins, 
but this problem isn't helped or hurt by running Jenkins.

Here's an example of what I was talking about, a buildslave running 
check-all without OCAML.

http://lab.llvm.org:8011/builders/clang-x86_64-darwin11-cross-arm/builds/7308

Some buildslaves don't have ocaml installed

checking for ocamlc... no
checking for ocamlopt... no
checking for ocamldep... no
checking for ocamldoc... no

During check-all the OCAML tests are skipped.

UNSUPPORTED: LLVM :: Bindings/Ocaml/analysis.ml (5685 of 11786)
UNSUPPORTED: LLVM :: Bindings/Ocaml/bitreader.ml (5686 of 11786)
UNSUPPORTED: LLVM :: Bindings/Ocaml/bitwriter.ml (5687 of 11786)
UNSUPPORTED: LLVM :: Bindings/Ocaml/executionengine.ml (5688 of 11786)
UNSUPPORTED: LLVM :: Bindings/Ocaml/ext_exc.ml (5689 of 11786)
UNSUPPORTED: LLVM :: Bindings/Ocaml/ipo_opts.ml (5690 of 11786)
UNSUPPORTED: LLVM :: Bindings/Ocaml/scalar_opts.ml (5691 of 11786)
UNSUPPORTED: LLVM :: Bindings/Ocaml/target.ml (5692 of 11786)
UNSUPPORTED: LLVM :: Bindings/Ocaml/vmcore.ml (5693 of 11786)

So this buildslave will never run the OCAML tests, and never see this 
problem.

I was OK on Ubuntu 10.04 building with Jenkins and manually. No 
check-all problems.

I switched the builds to U12.04 to get a gcc 4.6 compiler to build 
Dragonegg.

Then check-all started having trouble with the escapes again.

I think it's just problematic to try to escape quotes within the same 
type of quote. A different bash, or other packages seems to change the 
rules.

So switching from a double quote within a double quoted string to a 
single quote avoided that problem.

Shell interferes with escapes, and thus the 5 \\\\\'s to try to do what 
is supposed to work in 3,  '\\\"'. The extra subst wrapper avoids the 
problem, and results in something that has a better chance of working 
everywhere.

So your buildslave is fine. It would be good to run the change on your 
machine to get more proof that this change works everywhere.

Cheers,
-rick

-- 
Rick Foos
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation




More information about the llvm-commits mailing list