Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] JUnit-pligin tests fail when run from maven

We are talking about the standard sloeber headless build/test and I don't really know what that means for the workbench as it may be a ui component.

https://travis-ci.org/github/Sloeber/arduino-eclipse-plugin

These tests did however run fine before. I have been fiddling around to try to understand what is going on and out of the original 11 failures I'm down to 4 (by reimporting the removed import statements).

Basically the tests create projects and build them. Then tests whether the build was successful. The successful is based on indexer info and existence of the output file.

My current thinking is as follows:
1) The indexer still kicks in to early during the project creation. (100% sure)

!ENTRY org.eclipse.cdt.core 1 0 2020-08-27 02:01:09.291
!MESSAGE Indexed '00001_Library_RTCZero_Epoch' (0 sources, 0 headers) in 0,026 sec: 0 declarations; 0 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)

2) Based on this "bad index" Sloeber tries to add libraries (but doesn't. I know because when I run make in the workspace it fails because of missing libraries)

3) The build starts and fails (due to the missing libraries) and this somehow causes the exception.

Note that the tests I got to work do not rely on the indexer to get libraries attached.

Here is the github pull request that caused the issue.

Thanks

Jantje

Op 27/08/2020 om 20:20 schreef Jonah Graham:
I don't fully understand the context of the failures, but the error log has this fairly critical error with no explanation of why it may be happening:

Root exception:
java.lang.IllegalStateException: Workbench has not been created yet.
at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:95)
at org.eclipse.cdt.internal.ui.viewsupport.CDTContextActivator.install(CDTContextActivator.java:65)
at org.eclipse.cdt.ui.CUIPlugin.start(CUIPlugin.java:596)

Perhaps something in about the change you have made changes how Eclipse is being bootstrapped causing the UI not to load. 

Do you have a branch I can see the change on?

Thanks,
Jonah

~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Thu, 27 Aug 2020 at 14:08, Jan Baeyens <jan@xxxxxxxxxx> wrote:
Hi

In my Sloeber plugin I have changed the project creation code to
restrict to API usage and Since I have done so the maven build fails due
to tests failing.

When I run the test from the eclipse UI they run fine. But run from
maven I see following errors in the log.

What I guess that happens is that the build/indexer fails and wants to
report the error and that somewhere fails.

I attached the log.

Is this a known issue?

What is the best way to see the console output in this case?

Best regards

Jantje

FYI The test script try to build each project 3 times

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

Back to the top