1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00
Commit graph

36447 commits

Author SHA1 Message Date
Jonah Graham
021c03633a Delete test for CDT 2.x functionality
Rather than update this test, simply delete this test of
ancient functionality

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
71eae6c2d3 Cosmetic changes to unit test
Instead of using assertTrue, but assertEquals we get nice
error messages that show the contents of the collections.

Using assertEquals(List.of() instead of assertArrayEquals(...
because that gives nicer error messages.

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
542e8b474e Make sure test does not leave projects around
Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
b3003b7fa7 Convert test to JUnit5
The test "abused" the JUnit3 ability to control test order and
required all tests to run in the given order to work.

Refactored the test to remove all redundant try/catch and
provide a more traditional flow.

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
05322ac206 Convert to JUnit5 and cleanup resources
Also stop catching exceptions and discarding stacktraces

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
c650c25b85 Delete settings.xml file at end of test
Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
6ea56953d0 Create temporary files with ResourceHelper so they get cleanedup
Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
23399e83eb Clean up created projects in tearDown
Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
abd81474e6 Add missing abstract keyword to abstract tests
Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
1cdf58a663 Pass exceptions up the stack
Make sure not to lose stack trace when a test fails.

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
75e52e4682 Add JUnit5 dependencies
While it may be that the tests don't directly rely
on JUnit5, the IDE requires JUnit5 in the classpath
or else the launch config doesn't work with this error:

Cannot find class 'org.junit.platform.commons.annotation.Testable'
on project build path.

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
5cebec6477 There is a new way to mark tests as failing
And by "new" I mean 15 years old.

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
9811767b6a Make ASTWriterTester abstract so it doesn't look like a test
JDT thinks this is a test and will run it in the IDE and display
an error. But it is only used to compose other tests, by making
it abstract the IDE won't see it anymore.

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
a5b9803e91 Delete test that was never run
This is an ancient (2004) test that does not apply, was never
referenced in the Suites and whose name doesn't match standard
pattern.

It tried to import ancient versions of projects as well, which
would kick off the project converter UI that can't be disabled
from the core plug-in.

All in all, this test adds nothing of value.

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
a08198757a Try to catch uncleaned up files earlier
Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
57d7a47f45 Delete projects fully at the end of tests
This code seems to be trying to optimize across tests.
This change isolated each individual test better.
Also removed is a bunch of effectively unused test code.

Part of #117
2022-11-07 10:04:20 -05:00
Jonah Graham
e1dea25b40 Convert more of the tests to JUnit5
Some of these tests left behind projects, by chaning them
to extend BaseTestCase5 the resource cleanup happens
and the tests are cleaned up properly

Part of #117
2022-11-07 10:04:20 -05:00
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