1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00
Commit graph

3251 commits

Author SHA1 Message Date
Jonah Graham
1b19ba20c2 Update to latest Eclipse Platform and Orbit
Includes logging changes/simplification brought on by
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/588
2022-11-21 19:05:08 -05:00
Jonah Graham
b8bd15844b Bug 571722: Add ALL_FLAGS for scanner discovery
This change adds the ALL_FLAGS that does not limit tool options to
those declared as IOption::isForScannerDiscovery when launching the
compiler to discover compiler built-ins.

This is needed as many other flags, either entered manually in "Other
flags" or some of the existing flags with checkboxes such as "-ansi",
"-fPIC", and "-fstack-protector-all" which all affect scanner discovery
as they can all change what macros are built-in to the compiler.

The current solution has as a drawback that some settings, like -I and -D
then appear twice. For example in the "Includes" node in the "Project
Explorer"

My only reservation about this change is if there is an option
that can be specified successfully at build time, but when used
at scanner discovery time causes the compiler to fail, or return
incorrect results. Therefore I have added a new field,
excludeFromScannerDiscovery to tool options (buildDefinitions
extension point) that allows tool integrators to always exclude
a command line option from ALL_FLAGS. I have also added
a new "Other flags (excluded from discovery)" to the
"Miscellaneous" tab to allow compiler options to be entered
by the user.
2022-11-21 10:46:49 -05:00
Jonah Graham
c4761cfd02 fix code cleanlines 2022-11-18 10:55:40 -05:00
John Moule
c4c63453c3 Bug 580015: add support for multiple bin parsers #75
Fixed build props of new test plugin.

Fixed test, cleanup project afterwards.
2022-11-18 10:55:40 -05:00
John Moule
fc821a41e7 Bug 580015: add support for multiple bin parsers #75
Added remaining project metadata for new gcc test plugin.
2022-11-18 10:55:40 -05:00
John Moule
7759af22d6 Bug 580015: add support for multiple bin parsers #75
Removed ICBuildConfiguration.getBinaryParserId() and
IToolChain.getBinaryParserId(). Replaced with methods that return a list
of IDs.

Updated API changes doc.

Rearranged tests so that the test for IToolChain is in a new gcc test
plugin.
2022-11-18 10:55:40 -05:00
John Moule
c52de83035 Update for major version bump
Update since tags to 8.0.
Remove api filter.
Fix other since tags after removing of api filter.
Remove interface defaults.
Add default implementations where necessary.
Update tests - TBC.
2022-11-18 10:55:40 -05:00
Jonah Graham
1689f1947c Remove .. folder entry in zip file
This resolve the following exception during the build:


!ENTRY org.eclipse.ui.ide 4 4 2022-11-11 09:45:42.503
!MESSAGE Entry is outside of the target dir: ../
!STACK 0
java.io.IOException: Entry is outside of the target dir: ../
	at org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider.initialize(ZipFileStructureProvider.java:190)
	at org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider.getChildren(ZipFileStructureProvider.java:113)
	at org.eclipse.ui.wizards.datatransfer.ImportOperation.importRecursivelyFrom(ImportOperation.java:781)
	at org.eclipse.ui.wizards.datatransfer.ImportOperation.execute(ImportOperation.java:385)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.lambda$0(WorkspaceModifyOperation.java:110)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2380)
2022-11-11 11:34:37 -05:00
Jonah Graham
448c8745e8 Delete dead code. 2022-11-11 11:34:37 -05:00
Jonah Graham
a27d4a3bb7 Mark for removal API not accessed within CDT (or Embed CDT) 2022-11-11 11:34:37 -05:00
Jonah Graham
15ee18e027 Stop synchronizing user guides from Wiki
The primary location for these user guides is now the Git repo in HTML
format.

Part of #32
2022-11-09 10:56:55 -05:00
Jonah Graham
a3a6682faa Lower build.properties errors to warnings for some projects
Some projects build some of their bin includes with maven
build, so remove the error in those cases.

fixup for 6eaaf714cc
2022-11-07 23:13:26 -05:00
Jonah Graham
9026f53fd5 Remove deprecated binary parsers and supporting code
These binary parsers have been slated for deleting for
a while and are replaced with 64-bit compatible
versions.

Some methods still refereneced the 32-bit variants
and have been updated to the fully functioning
64-bit variant.

The older parser IDs are preserved (forever?) so that
old projects can be opened without needing to do anything.
The IDs now point at the new implementations.

See also Bug 562495
2022-11-07 20:58:25 -05:00
Jonah Graham
f8dee45ba3 Make tests inherit from BaseTestCase or BaseTestCase5
This provides the shared pre/post condition assertions to
help make sure tests are running in a clean environment.

If I had time I would convert all the tests to BaseTestCase5
which is JUnit5, but I only did the tests that had something
wrong with them.

Part of #117
2022-11-07 10:04:20 -05:00
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
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
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
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
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
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
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
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
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
Jonah Graham
e4e06008af Update to Java 17 as BREE. Fixes #80 2022-10-03 12:42:37 -04:00
Jonah Graham
110ac149c2 [releng] Bump versions for CDT 11.0.0 2022-10-03 12:42:37 -04:00
Jonah Graham
efaadf4209 [releng] Update help docs for 2022-12 M1 2022-10-03 12:42:37 -04:00
Jonah Graham
93fbce4f2c Bump cdt.ui major version for CDT 11.0 development 2022-09-09 20:18:47 -04:00
Christian Walther
ef195dbb73 Fix flaky tests in BuiltinSpecsDetectorTest
testAbstractBuiltinSpecsDetector_EnvChangesGlobal did not properly clean
up after itself, which caused
testAbstractBuiltinSpecsDetector_EnvChangesConfiguration_1,
testAbstractBuiltinSpecsDetector_EnvChangesConfiguration_2, and
testAbstractBuiltinSpecsDetector_EnvChangesGlobal to fail when run for
the second time in the same session.

Running tests twice is not useful, but happens in Eclipse with a launch
configuration set to run all tests in
org.eclipse.cdt.managedbuilder.core.tests/tests - once directly and once
through AllLanguageSettingsProvidersMBSTestSuite. I have not found any
way of running every test exactly once in the GUI.
2022-08-22 12:17:50 -04:00
Christian Walther
5f3cd7ac20 Fix flaky test testPersistentProperties
Don't sleep for a hardcoded time but wait for the actual condition.
1000 ms was often insufficient on my system.
2022-08-22 12:17:50 -04:00
Torbjörn Svensson
054e494e10 Bug 580113: Do not reuse ICommandLauncher
Each command should have it's own command launcher. The alternative is
to ensure that the previous command has finished prior to launching the
next one, but that's harder to acchieve as it's up to the consumer of
Builder to fullfill.

Contributed by STMicroelectronics

Change-Id: I17038220ccd7c1767328ecfce92f28d8205c1d56
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2022-08-16 16:03:27 +02:00
John Dallaway
a9c3819565
Bug 580286: Accommodate extra flags with internal builder (#31) 2022-08-15 18:56:10 +01:00
John Dallaway
7c6bd5bdcb Bug 580441: Accommodate deleted folder of source files
Eliminate ResourceException by avoiding processing a deleted source
folder resource as a modified resource.

Change-Id: Icfa10040d4d3c6c06b2a4c040e7b632e94dff324
2022-07-26 08:22:58 +01:00
Mat Booth
5e4a66b0af Bug 580178 - Unable to stop build process from launchbar
Switch from the standard Java ProcessBuilder to the CDT CommandLauncher
for new style core build projects.

The CommandLauncher uses a more sophiscated mechanism for watching the
spawned process allowing us to interrupt the process when the user hits
the stop button on the launchbar by properly listening to a monitor.

The change adds new API to CBuildCongifuration that takes a progress
monitor, and changes all the affected build configuration types to use
this new API.

Change-Id: I0c4225616ad8331c2cea28bcb502028455a8ea71
2022-06-30 12:34:16 -04:00
William Riley
c678c76a40 Bug 580009 - Avoid rare NPE due to folder info not being loaded
Guard against NPE. Full cause needs to be investigated but with this
check the behaviour is no worse than before in these cases

Change-Id: I27ed2cd915e21fca2ef07335820d9e2496c1c51d
2022-05-31 15:34:50 +01:00
William Riley
133c81e979 Bug 580009 - Resolve superclass for tc level options in rc configs
Change-Id: I03093b687bc36610ab7cf83d7e75401ac7a4fdfe
2022-05-27 11:34:06 +01:00
Torbjörn Svensson
a2e6ef61c9 Bug 579666: Improve dark theme on Windows
On Windows, the TabFolder and TabItem classes does not follow the
themeing in Eclipse. As a result, the tab selectors will be drawn with
the light theme while the rest of the Eclipse UI is in dark theme.

Contributed by STMicroelectronics

Change-Id: I9169c9e01f8c9a3af7b6bb6d1c673a043735e7e9
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2022-05-06 04:38:00 -04:00
John Dallaway
7357cfd9eb Bug 577263: Eliminate unnecessary command line pattern attributes
We eliminate unnecessary command line pattern attributes that were
overriding the default pattern provided by
org.eclipse.cdt.managedbuilder.internal.core.Tool which now includes
${EXTRA_FLAGS}.

Change-Id: I8c4e8e613599e71e31e390f56319bacfd0329ab2
2022-05-05 11:13:28 +01:00
Torbjörn Svensson
2a669100f0 Bug 577263: CommandGenerator not respected for option value type libs
Contributed by STMicroelectronics

Change-Id: I2c332eb40b6b69aff405c2c7c86cdcd4acaf5d19
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
Also-By: Erik Hentschke <erik.hentschke@bachmann.info>
Also-By: John Dallaway <john@dallaway.org.uk>
2022-05-04 12:45:27 -04:00
Torbjörn Svensson
a58a1bdd2e Bug 579756: Add support for prefixed toolchain binaries in parser
The GCCBuildCOmmandParser expects the compiler tool to be exactly what's
included in the pattern, i.e. a prefixed toolchain (for example
"arm-none-eabi-" would not match.

Contributed by STMicroelectronics

Change-Id: I9e6b83509ecac9c382f565e5c7b737d12398a196
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2022-04-25 15:34:13 -04:00
Torbjörn Svensson
5c15ff72a2 Ensure project is removed after test
Contributed by STMicroelectronics

Change-Id: I2d944bb2d2e2704bcc248d6058475d247318f327
Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2022-04-24 12:08:17 -04:00
Jonah Graham
a1c02e2cce [releng] Apply auto-clean of save to all files with Eclipse 4.23
This mostly is using diamond operator, but includes
adding missing @Override and organizing imports and
applying formatting improvements in the JDT formatter.

Change-Id: Id91cbff33b0a039cc5121945ffbc407ecba45866
2022-04-19 20:13:15 -04:00
Jonah Graham
148ae40d0f [releng] Make CDT Clean-up profile match Editor on save actions
The CDT Cleanup profile had a bunch of extra cleanups applied to it, this
prevents running the CDT cleanup profile manually to simulate running the
save actions on all Java files

Change-Id: Iad491e1258a4ba90d81d1457ea0f6779e3663e38
2022-04-19 20:13:15 -04:00
Jonah Graham
7400e22b1f [releng] Update all legal files with update_legal_files.sh
The about.html was changed as per
https://gitlab.eclipse.org/eclipsefdn/it/websites/eclipse.org/-/issues/90

Change-Id: Ied879279460a8fc610630fc26794ab3df9eae39f
2022-04-13 13:42:35 -04:00
Jonah Graham
1f0451c163 [releng] Prepare for 10.7.0 with version bumps
All the about.html files are updated, so every bundle that hasn't
already had a bump in 10.7 needs one now

Change-Id: I6143d2fbe77a58a3a6d2f4a226d96087117f9ac1
2022-04-13 13:15:06 -04:00