1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00
Commit graph

35930 commits

Author SHA1 Message Date
Jonah Graham
73d74a1db6 Remove test for code that is no longer supported
Ideally the code itself should also be deleted from CDT, but
this test is super flaky and I cannot seem to convert it to
JUnit5 so I can properly mark it as flaky. Therefore
the test is now simply gone.

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
a9c0153bf7 Better test error messages when workspace is not empty after test
On GHA the error does not really give a good indication of what
went wrong with minimal to no stack traces

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
320bb231c2 Delete contents on disk when cleaning up after test
The resource helper is widely used, but when it deletes
projects, it leaves their contents on disk. Fix this
so that the contents on disk is deleted.

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
62179bc863 Clean up projects created during test
Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
68e326120f Convert test to JUnit5 and cleanup projects made during test
Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
61eac9d982 Remove incorrect assumptions of lifecycle of test
Maybe once upon a time this lifecycle did something,
but now in setUp fProject is always null and therefore
the project was never getting deleted as the fProject
that deleteProject saw was different than
the tests.

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
858a194b68 Fail test if there are any files left over in the workspace directory
Some tests sort of clean up after themselves, but still leave files
around.

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
46e9c97372 Reduce API warning in test
Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
3474f828de Convert pdom tests to JUnit5 format
This will allow, if needed, to mark tests as flaky

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
c99134eb31 Use correct version of GDB on Jenkins
In 56ee2c3bb1 I got github actions
working by using default GDB on GHA, but on Jenkins we should
continue to use CDT's pre-built version of GDB.

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
e8ace84413 Typos and remove unused SuppressWarnings
Part of #117
2022-11-07 10:04:20 -05:00
Neuromancer42
679535f50a fix omitted parentheses in extended ASM #134 2022-11-07 09:55:18 -05:00
Neuromancer42
90c6b6c0e9 fix omitted parentheses in extended ASM #134 2022-11-07 09:55:18 -05:00
Jonah Graham
b37e9c3812 Delete all the test suites from primary CDT test projects
Having the test suites means that tests run multiple times
when running in the UI. Most suites just ran the tests in
that package, so their value, especially with the transition
to JUnit5 is minimal.

Note that the suites are not used when running build
with Tycho/Maven

Part of #117
2022-11-07 07:53:47 -05:00
Jonah Graham
6eaaf714cc Upgrade build.properties warnings to errors
Warning in build.properties will be errors when they run
in the tycho build, like this:

```
Error:  Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:2.7.5:package-plugin
(default-package-plugin) on project org.eclipse.cdt.core.tests:
/home/runner/work/cdt/cdt/core/org.eclipse.cdt.core.tests/build.properties:
bin.includes value(s) [test.xml] do not match any files. -> [Help 1]
```

So make them errors in the workspace so that the issue is
detected before push.

Some build.properties issues don't affect the build, but
are still indicative of a problem.
2022-11-06 18:29:28 -05:00
Jonah Graham
5460ced420 Improve documentation on how to run JUnit tests 2022-11-06 18:27:56 -05:00
John Dallaway
1bb0cf0a37
Enhance memory data initialization checks (#138) 2022-11-06 12:34:32 +00:00
15knots
369ddea39c
Add ManagedBuildManager#createConfigurationForProject() (#131)
* Add ManagedBuildManager#createConfigurationForProject()

This should allow ISV's to create MBS based project with a
vendor-specific build-system ID without using internal API.

Update New & Noteworthy

Signed-off-by: 15knots <11367029+15knots@users.noreply.github.com>
2022-11-04 21:30:22 +01:00
Jonah Graham
ac979bd9e1 Fix unhandled event loop exception when binary parser is not in plugin.xml
If a .cproject references a binary parser ID that is not in
the plug-in XML, or in the XML, but marked as private, the
UI cannot display the binary parsers and was raising an
ArrayIndexOutOfBoundsException as below.

This fix rewrites the array handling using collections.


```java
!ENTRY org.eclipse.ui 4 0 2022-11-04 09:44:27.409
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.ArrayIndexOutOfBoundsException: Index 7 out of bounds for length 7
	at org.eclipse.cdt.ui.newui.BinaryParsTab.updateData(BinaryParsTab.java:253)
	at org.eclipse.cdt.ui.newui.AbstractCPropertyTab.setVisible(AbstractCPropertyTab.java:253)
	at org.eclipse.cdt.ui.newui.BinaryParsTab.setVisible(BinaryParsTab.java:221)
	at org.eclipse.cdt.ui.newui.AbstractCPropertyTab.handleTabEvent(AbstractCPropertyTab.java:630)
	at org.eclipse.cdt.ui.newui.AbstractPage.updateSelectedTab(AbstractPage.java:412)
	at org.eclipse.cdt.ui.newui.AbstractPage$4.widgetSelected(AbstractPage.java:382)
```
2022-11-04 12:02:15 -04:00
Jonah Graham
09e3b5ca29 Execute autoreconf in the same environment as configure and make
Changed the execute to take the cwd to run the command in and
clean up the related code, including some error message
handling and removing some redundant code.

Fixes #125
2022-11-04 08:24:54 -04:00
Jonah Graham
9cc97ac406 Error message if launcher is null when trying to watchProcess
Part of #125
2022-11-04 08:24:54 -04:00
Jonah Graham
7e142b4a34
Add missing link to CDT 11 2022-11-04 08:21:36 -04:00
Jonah Graham
8ab702fec8 Lower missing PDE unknown-identifier to warning for this bundle
Because the reference is to a TCF defined identifier, make
this just a warning because CDT does not have TCF in its
target platform.
2022-11-04 08:19:23 -04:00
Jonah Graham
211bdec58e Remove old, non-universal welcome screen content
Fixup for 8fd15a66d1
2022-11-04 08:19:23 -04:00
Jonah Graham
673a34b150 Remove reference to icon that has never existed
It would be nice to have an icon here, but it has been
fine not having it for 14 years, so just remove reference
to clean up error.

Fixup for e5ae2a94a7
2022-11-04 08:19:23 -04:00
Jonah Graham
2d516a3c54 Correct descriptorTypeId for default launch type
This is mostly a no-op change, but fixes the error
about incorrect reference.

The descriptorUI extension used an ID that never existed,
and the code in ConfigSelector just fell back on
DefaultDescriptorLabelProvider it none were found, so
the user visible change here is nothing.

Fixup for 8f8c2e02b6
2022-11-04 08:19:23 -04:00
Jonah Graham
324d069099 Fix marker definition in example plug-in
Fixup for 5b47187366
2022-11-04 08:19:23 -04:00
Jonah Graham
bcff6bdba8 Remove incomplete extension definition in example plug-in
When DSF was first contributed, the PDA code was copied and
adapter from platform:

https://github.com/eclipse-platform/eclipse.platform.debug/tree/master/org.eclipse.debug.examples.core

This extension was never migrated to the DSF example.

Fixup for 5b47187366
2022-11-04 08:19:23 -04:00
Jonah Graham
dd33a517a3 Display correct icon/label for various source lookup containers
The adaptable type that was listed doesn't exist.

This is only used to get the correct icon/label for these
type of adapters, so the effect is minor.

Fixup for 9aee6c4850
2022-11-04 08:19:23 -04:00
Jonah Graham
95bb7afb47 Display proper icon for core launches
Core launches were missing their icon in the Debug View

Fixup for e9beafae10
2022-11-04 08:19:23 -04:00
Jonah Graham
e4d4d8c02c Remove view definition for test view that never existed
Fixup for 5b47187366
2022-11-04 08:19:23 -04:00
Jonah Graham
1f19cff227 Make missing identifiers and classes in plugin.xml errors
Subsequent commits fix the errors
2022-11-04 08:19:23 -04:00
Jonah Graham
75c779fc1d Remove non-functioning Qt plug-ins
Fixes #123
2022-10-29 18:56:47 -04:00
Jonah Graham
10e95a1825 Fix race condition in multithread test
The long sleep at the end of each thread is to make sure that
while the test code is waiting for an event the "other" thread
doesn't finish. 3 seconds is not long enough for this.

This is similar to why we need dsf.gdb.tests.timeout.multiplier
for other tests. Especially on the build machines the tests
can run much slower causing the sleep to be insufficient.

Increasing this to 30 seconds doesn't make the test suites
take any longer, when they are all passing.

Fixes #119
2022-10-27 20:33:26 -04:00
Jonah Graham
949d46c630 Delete abstract class with no concrete subclasses 2022-10-25 22:56:02 -04:00
Jonah Graham
306708f5cb Remove projects from workspace at test startup
Various tests are not cleaning up properly after
themselves, causing test failures on subsequent
tests. Therefore start each test by deleting
all projects.

In addition, some tests were creating their test
projects in their constructor. As all the constructors
run before all the tests as part of test discovery
it means that projects were being created in
constructor and interfering with other tests
later. With the deleting of all projects in @AfterEach
these tests would have started failing. Therefore,
change these tests to create their projects
and do other initialize tasks in the setUp method.

For older JUnit3 style tests:
This substantially slows down tests as many tests
rely on sharing the project between multiple tests and
recreating those projects on each run is slow.
Therefore this is not applied universally to
all JUnit3 tests.

For tests that are affected, those tests are moved
to JUnit5 base test.

Part of #117
2022-10-25 22:56:02 -04:00
Jonah Graham
ad478cecc1 Provide a way to wait on background build settings update job
Part of #117
2022-10-25 22:56:02 -04:00
Jonah Graham
23d44d05a4 Restore completion filter after testing preference
On GitHub actions the org.eclipse.cdt.ui.tests.text.contentassist2
tests are running after ProposalFilterPreferencesTest and
ProposalFilterPreferencesTest was changing the default
filter and not restoring it.

Part of #117
2022-10-25 22:56:02 -04:00
Jonah Graham
d345323f49 Fix CDescriptorOldTests.testDescriptorCreation instability
This old test had a race condition. The failing test was trying
to verify that CDTPROJECT_ADDED was received, but if there
was a delay in the startup then another event would come in
later. So for this test use the first received event,
for the remaining tests use the last received event.

Part of #117
2022-10-25 22:56:02 -04:00
Jonah Graham
128de5d6cd Add missing abstract keyword to abstract tests
Part of #117
2022-10-25 22:56:02 -04:00
Jonah Graham
a827d71f52 Add additional diagnostic to error message
It may be that this test fails regularly because
another test is not cleaned up properly.
Make sure there are no unexpected projects in
the workspace.

Part of #117
2022-10-25 22:56:02 -04:00
Jonah Graham
d5620689b5 Enable the profile in the GH Actions to verify standalone builds
Follow up from c1269a9990
2022-10-25 22:29:07 -04:00
Jonah Graham
30166dea86 Bump org.eclipse.cdt.core major version
Due to the removal of previous API done in:

- PR #103
- commit 4de9516e97
2022-10-25 22:28:51 -04:00
Jonah Graham
5fac32e3f8 Fix the dprintf tests when running on gdbserver
Because dprintf goes to stdout, need to make sure buffers are
fully flushed before we check output.
2022-10-25 22:21:38 -04:00
Alexander Fedorov
fd256d59d5
Merge pull request #107 from eclipse-cdt/setup_workspace_fix
CDT.setup working set definitions: fix swapped LSP and LLVM
2022-10-25 19:41:19 +03:00
Alexander Fedorov
6610de9e66
Merge pull request #106 from eclipse-cdt/setup_add_shortcut_to_configuration
org.eclipse.cdt.target should have shortcut for CDTConfiguration.setup
2022-10-25 19:36:40 +03:00
John Dallaway
1590791e76
Eliminate deprecated GDBBackend methods for CDT 11 (#112) 2022-10-25 13:40:13 +01:00
Mat Booth
c1269a9990 Fix build failure in standalone debugger application
* Correct the requirements according to the latest target platform
* Move to requiring Java 17
* Enable the profile in the Jenkinsfile to verify it builds
2022-10-25 10:20:37 +01:00
15knots
eb1d5d116d
Merge pull request #111 from 15knots/main
Do not overwrite custom build system ID with MBS ID
2022-10-24 20:39:19 +02:00
Martin Weber
88021dc82a Do not overwrite custom build system ID with MBS ID
Signed-off-by: Martin Weber <11367029+15knots@users.noreply.github.com>
2022-10-21 22:04:54 +02:00