You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by unmarshall <un...@gmail.com> on 2011/05/18 09:05:54 UTC

Camel source code build fails

Hi All,

I took the latest from SVN yesterday and when i try to build it then it
fails as one of the tests is consistently failing -
testToBytes(org.apache.camel.converter.IOConverterTest)

I have attached the test failure result.
The problem is the extra check that has been done for os.name
startsWith("Windows"). The test character = '!' is properly set via - char
testChar = (char) data[data.length - 2]; however the extra windows check
then sets this to testChar = (char) data[data.length - 3]; which then
returns 'd' and not '!'

The check for os.name startsWith("Windows") should be removed.

http://camel.465427.n5.nabble.com/file/n4405790/org.apache.camel.converter.IOConverterTest.txt
org.apache.camel.converter.IOConverterTest.txt 

Best Regards,
Madhav

--
View this message in context: http://camel.465427.n5.nabble.com/Camel-source-code-build-fails-tp4405790p4405790.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel source code build fails

Posted by Aki Yoshida <el...@googlemail.com>.
Hi,
but I think the test should be written in a way not to depend on how
you are retrieving the file, no?

If you use cygnwin's svn, you will get dummy.txt with the unix
line-ending, LF, as in the original source.
In this case, the test wil fail on windows.

So, what this test is testing is if you downloaded dummy.xml with the
added CR on your windows environment. If you are a windows user but
living happily with LF and got the original dummy.txt source, you
can't run this test.

So I don't understand the purpose of this test (I mean this
line-ending check in this test).

regards, aki

2011/5/18 unmarshall <un...@gmail.com>:
> OK, problem identified. I used cygwin for checking out the source code. When
> using windows command line the CR+LF are properly converted.
>
> Apologies as it turned out to be a stupid problem.
>
>
> unmarshall wrote:
>>
>> Hi Taariq,
>>
>> I do not use Tortoise as it has in past given many problems. I only use
>> the command line svn.
>> If you use the command line svn using the instructions that are mentioned
>> on http://camel.apache.org
>> /source.html then you should face the problem, unless you have some
>> specific configuration that is being done for subversion.
>>
>> Best Regards,
>> Madhav
>>
>>
>> Taariq Levack wrote:
>>>
>>> Hi
>>>
>>> I just built on windows too, are you sure it's not your tool?
>>> I use Tortoise, and also update from my IDE, and I didn't have to change
>>> any
>>> settings to make it work.
>>> The dummy.txt file looks fine here too.
>>>
>>> Taariq
>>>
>>> On Wed, May 18, 2011 at 9:41 AM, unmarshall &lt;unmarshall@gmail.com&gt;
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I guess in SVN you will have to set:
>>>> svn propset svn:eol-style native
>>>>
>>>> This would then make sure that if the code is being checked out from
>>>> windows
>>>> then CR+LF is substituted for "enter" and for linux it will substitute
>>>> LF
>>>> for "enter".
>>>>
>>>> Can you check if that property has been set on SVN?
>>>>
>>>> Best Regards,
>>>> Madhav
>>>>
>>>> --
>>>> View this message in context:
>>>> http://camel.465427.n5.nabble.com/Camel-source-code-build-fails-tp4405790p4405838.html
>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>
>>>
>>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-source-code-build-fails-tp4405790p4406000.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Camel source code build fails

Posted by unmarshall <un...@gmail.com>.
OK, problem identified. I used cygwin for checking out the source code. When
using windows command line the CR+LF are properly converted.

Apologies as it turned out to be a stupid problem.


unmarshall wrote:
> 
> Hi Taariq,
> 
> I do not use Tortoise as it has in past given many problems. I only use
> the command line svn.
> If you use the command line svn using the instructions that are mentioned
> on http://camel.apache.org
> /source.html then you should face the problem, unless you have some
> specific configuration that is being done for subversion.
> 
> Best Regards,
> Madhav
> 
> 
> Taariq Levack wrote:
>> 
>> Hi
>> 
>> I just built on windows too, are you sure it's not your tool?
>> I use Tortoise, and also update from my IDE, and I didn't have to change
>> any
>> settings to make it work.
>> The dummy.txt file looks fine here too.
>> 
>> Taariq
>> 
>> On Wed, May 18, 2011 at 9:41 AM, unmarshall &lt;unmarshall@gmail.com&gt;
>> wrote:
>> 
>>> Hi,
>>>
>>> I guess in SVN you will have to set:
>>> svn propset svn:eol-style native
>>>
>>> This would then make sure that if the code is being checked out from
>>> windows
>>> then CR+LF is substituted for "enter" and for linux it will substitute
>>> LF
>>> for "enter".
>>>
>>> Can you check if that property has been set on SVN?
>>>
>>> Best Regards,
>>> Madhav
>>>
>>> --
>>> View this message in context:
>>> http://camel.465427.n5.nabble.com/Camel-source-code-build-fails-tp4405790p4405838.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>> 
> 


--
View this message in context: http://camel.465427.n5.nabble.com/Camel-source-code-build-fails-tp4405790p4406000.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel source code build fails

Posted by unmarshall <un...@gmail.com>.
Hi Taariq,

I do not use Tortoise as it has in past given many problems. I only use the
command line svn.
If you use the command line svn using the instructions that are mentioned on
http://camel.apache.org/source.html then you should face the problem, unless
you have some specific configuration that is being done for subversion.

Best Regards,
Madhav


Taariq Levack wrote:
> 
> Hi
> 
> I just built on windows too, are you sure it's not your tool?
> I use Tortoise, and also update from my IDE, and I didn't have to change
> any
> settings to make it work.
> The dummy.txt file looks fine here too.
> 
> Taariq
> 
> On Wed, May 18, 2011 at 9:41 AM, unmarshall &lt;unmarshall@gmail.com&gt;
> wrote:
> 
>> Hi,
>>
>> I guess in SVN you will have to set:
>> svn propset svn:eol-style native
>>
>> This would then make sure that if the code is being checked out from
>> windows
>> then CR+LF is substituted for "enter" and for linux it will substitute LF
>> for "enter".
>>
>> Can you check if that property has been set on SVN?
>>
>> Best Regards,
>> Madhav
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Camel-source-code-build-fails-tp4405790p4405838.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
> 


--
View this message in context: http://camel.465427.n5.nabble.com/Camel-source-code-build-fails-tp4405790p4405988.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel source code build fails

Posted by Taariq Levack <ta...@gmail.com>.
Hi

I just built on windows too, are you sure it's not your tool?
I use Tortoise, and also update from my IDE, and I didn't have to change any
settings to make it work.
The dummy.txt file looks fine here too.

Taariq

On Wed, May 18, 2011 at 9:41 AM, unmarshall <un...@gmail.com> wrote:

> Hi,
>
> I guess in SVN you will have to set:
> svn propset svn:eol-style native
>
> This would then make sure that if the code is being checked out from
> windows
> then CR+LF is substituted for "enter" and for linux it will substitute LF
> for "enter".
>
> Can you check if that property has been set on SVN?
>
> Best Regards,
> Madhav
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-source-code-build-fails-tp4405790p4405838.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Camel source code build fails

Posted by unmarshall <un...@gmail.com>.
Hi,

I guess in SVN you will have to set: 
svn propset svn:eol-style native

This would then make sure that if the code is being checked out from windows
then CR+LF is substituted for "enter" and for linux it will substitute LF
for "enter".

Can you check if that property has been set on SVN?

Best Regards,
Madhav

--
View this message in context: http://camel.465427.n5.nabble.com/Camel-source-code-build-fails-tp4405790p4405838.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel source code build fails

Posted by unmarshall <un...@gmail.com>.
Hi,

The problem is that the file "dummy.txt" has been probably created in Unix
and therefore has line endings with hex code = 0A.

So now when you run the test on windows then it fails as there is no 0D
character which windows would otherwise inject.

Is there an option to checkout sources differently on windows?

Best Regards,
Madhav

--
View this message in context: http://camel.465427.n5.nabble.com/Camel-source-code-build-fails-tp4405790p4405807.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel source code build fails

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I have polished the test and committed to trunk.


On Wed, May 18, 2011 at 9:05 AM, unmarshall <un...@gmail.com> wrote:
> Hi All,
>
> I took the latest from SVN yesterday and when i try to build it then it
> fails as one of the tests is consistently failing -
> testToBytes(org.apache.camel.converter.IOConverterTest)
>
> I have attached the test failure result.
> The problem is the extra check that has been done for os.name
> startsWith("Windows"). The test character = '!' is properly set via - char
> testChar = (char) data[data.length - 2]; however the extra windows check
> then sets this to testChar = (char) data[data.length - 3]; which then
> returns 'd' and not '!'
>
> The check for os.name startsWith("Windows") should be removed.
>
> http://camel.465427.n5.nabble.com/file/n4405790/org.apache.camel.converter.IOConverterTest.txt
> org.apache.camel.converter.IOConverterTest.txt
>
> Best Regards,
> Madhav
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-source-code-build-fails-tp4405790p4405790.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/