On 12/01/2011 03:16 PM, Endi Sukma Dewata wrote:
On 12/1/2011 1:14 PM, Adam Young wrote:
>> Runs fine the first time, but you can't run the test twice.
>>
>> [ayoung@ayoung core]$ make test
>> mkdir: cannot create directory `reports': File exists
>> make[3]: *** [base/common/test/CMakeFiles/test-pki-common] Error 1
>> make[2]: *** [base/common/test/CMakeFiles/test-pki-common.dir/all]
>> Error 2
>> make[1]: *** [CMakeFiles/test.dir/rule] Error 2
>> make: *** [test] Error 2
>>
>> Do mkdir -p instead
Fixed in the new patch.
> Also, the recompile doesn't seem to be getting triggered. I added a
> fail(); to a test .java file to trigger an exception, and nothing
> happened, then I ran make all and the make test and saw the stack trace.
> REmoving it, same thing.
Yes, I've put "TODO: build test only when the test is invoked". Right
now the test files are only compiled under "all" target, it should
have been under "test" target. I'm still not sure how to call
add_jar() from a custom target. The add_custom_command() let's you add
a command but not a function invocation. Maybe the whole common/test
should be called under "test" too.
ACK