Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312812 - JUnit failure in Hudson builds - ManagedBuildCoreTests20.testScannerInfoInterface
Summary: JUnit failure in Hudson builds - ManagedBuildCoreTests20.testScannerInfoInter...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 7.0   Edit
Assignee: Andrew Gvozdev CLA
QA Contact: Andrew Gvozdev CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-13 12:13 EDT by Andrew Gvozdev CLA
Modified: 2010-07-28 15:27 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Gvozdev CLA 2010-05-13 12:13:42 EDT
Failed: org.eclipse.cdt.managedbuilder.core.tests.ManagedBuildCoreTests20.testScannerInfoInterface (from ManagedBuildCoreTests20) 

Hudson build (outputs are formatted slightly):

junit.framework.AssertionFailedError: arrays have different contents
array1 entries: [
/opt/users/hudsonbuild/workspace/cdt-nightly/all/org.eclipse.cdt.releng/results/test/eclipse/cdt_mbs_core_folder/ManagedBuildTest/Sub Config/C:\home\tester/include,
/opt/users/hudsonbuild/workspace/cdt-nightly/all/org.eclipse.cdt.releng/results/test/eclipse/cdt_mbs_core_folder/ManagedBuildTest/includes
],
array2 entries: [
Sub Config/C:\home\tester/include,
includes
]
 expected:<0> but was:<2>
	at org.eclipse.cdt.managedbuilder.testplugin.BuildSystemTestHelper.checkDiff(BuildSystemTestHelper.java:136)
	at org.eclipse.cdt.managedbuilder.core.tests.ManagedBuildCoreTests20.testScannerInfoInterface(ManagedBuildCoreTests20.java:313)

and on Windows:
junit.framework.AssertionFailedError: arrays have different contents
array1 entries: [
\usr\include,
\opt\gnome\include,
C:\home\tester\include,
C:\Andre\eclipse-3.6-CDT7.0\junit-workspace\ManagedBuildTest\includes,
\usr\gnu\include
],
array2 entries: [
/usr/include,
/opt/gnome/include,
C:\home\tester/include,
includes,
/usr/gnu/include
]
 expected:<0> but was:<5>
	at org.eclipse.cdt.managedbuilder.testplugin.BuildSystemTestHelper.checkDiff(BuildSystemTestHelper.java:136)
	at org.eclipse.cdt.managedbuilder.core.tests.ManagedBuildCoreTests20.testScannerInfoInterface(ManagedBuildCoreTests20.java:313)
Comment 1 Andrew Gvozdev CLA 2010-05-13 22:28:30 EDT
Chris, I reverted your change in DescriptionScannerInfoProvider back to 1.11 as it makes the test fail.
Comment 2 Chris Recoskie CLA 2010-06-01 14:29:20 EDT
I did not notice this reversion till now.  The bugzilla description didn't indicate the problem.

The code does need to change because blindly running toOSString() on every discovered path totally messes things up for remote projects.

I plan on reverting the fix but I'll have a look at the tests to make sure they continue to pass.

I will file a separate bugzilla for the issue the original fix was meant to address.
Comment 3 CDT Genie CLA 2010-07-28 15:27:30 EDT
*** cdt cvs genie on behalf of agvozdev ***
bug 312812: JUnit failure in Hudson builds - ManagedBuildCoreTests20.testScannerInfoInterface
Reverted to 1.11 as the last revision broke JUnit test

[*] DescriptionScannerInfoProvider.java 1.13 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/DescriptionScannerInfoProvider.java?root=Tools_Project&r1=1.12&r2=1.13