cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wido den Hollander <w...@widodh.nl>
Subject Re: Building Cloudstack failing on windows
Date Mon, 14 Dec 2015 10:47:00 GMT


On 12/14/2015 11:45 AM, Wilder Rodrigues wrote:
> no need to hard code the path. We can use the “File.separator” as it is being used
in the class under test.
> 

Indeed, I already filed a PR: https://github.com/apache/cloudstack/pull/1242

> Cheers,
> Wilder
> 
> On 14 Dec 2015, at 11:36, Wido den Hollander <wido@widodh.nl<mailto:wido@widodh.nl>>
wrote:
> 
> 
> 
> On 12/14/2015 07:25 AM, Sudharma Jain wrote:
> While building Cloudstack on windows, it fails with following exceptions.
> 
> Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.052 sec
> <<< FAILURE! - in com.cloud.utils.TestProfiler
> testProfilerInNano(com.cloud.utils.TestProfiler)  Time elapsed: 1.004 sec
> <<< FAILURE!
> java.lang.AssertionError: null
>        at org.junit.Assert.fail(Assert.java:86)
>        at org.junit.Assert.assertTrue(Assert.java:41)
>        at org.junit.Assert.assertTrue(Assert.java:52)
>        at
> com.cloud.utils.TestProfiler.testProfilerInNano(TestProfiler.java:71)
> 
> 
> Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
> <<< FAILURE! - in
> com.cloud.hypervisor.kvm.resource.wrapper.LibvirtUtilitiesHelperTest
> testSSHKeyPaths(com.cloud.hypervisor.kvm.resource.wrapper.LibvirtUtilitiesHelperTest)
> Time elapsed: 0.001 sec  <<< FAILURE!
> junit.framework.ComparisonFailure: expected:</root/.ssh[/]id_rsa.pub.cloud>
> but was:</root/.ssh[\]id_rsa.pub.cloud>
>        at junit.framework.Assert.assertEquals(Assert.java:100)
>        at junit.framework.Assert.assertEquals(Assert.java:107)
>        at junit.framework.TestCase.assertEquals(TestCase.java:269)
>        at
> com.cloud.hypervisor.kvm.resource.wrapper.LibvirtUtilitiesHelperTest.testSSHKeyPaths(LibvirtUtilitiesHelperTest.java:40)
> 
> 
> Hmm, that is a test I wrote. This is the code:
> https://github.com/apache/cloudstack/blob/master/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtUtilitiesHelperTest.java#L33
> 
> I don't have Windows here, so I can't test it. But the slashes there
> seem to be a problem.
> 
> This it's this:
> https://github.com/apache/cloudstack/blob/master/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java#L196
> 
> I should use "File.separator" instead of a hardcoded / in the test.
> 
> My bad! Fixed here: https://github.com/apache/cloudstack/pull/1242
> 
> Wido
> 
> Thanks,
> Sudharma
> 

Mime
View raw message