-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SLE-969: Create integration test with CDT
Using simple Makefile-based project for testing the C analysis and configuration in the sub-module. Additionally, updated the CI components to provide all tools for using gcc/g++/make with Eclipse CDT. The CI image now needs libwebkit2gtk-4.* as the underlying rendering component of the browser instances used in the SonarQube Rule Description view. Due to Eclipse 4.8 (the oldest target platform) requiring GTK3 - this is not available on the Linux machines on the CI - the RuleDescriptionViewTest was disabled on that axis!
- Loading branch information
Showing
12 changed files
with
302 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ target/ | |
# Eclipse | ||
.classpath | ||
.project | ||
.cproject | ||
.settings | ||
|
||
# IntelliJ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...pse.its.shared/src/org/sonarlint/eclipse/its/shared/reddeer/conditions/CFamilyLoaded.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.sonarlint.eclipse.its.shared.reddeer.conditions; | ||
|
||
import org.eclipse.reddeer.common.condition.AbstractWaitCondition; | ||
import org.eclipse.reddeer.eclipse.ui.console.ConsoleView; | ||
|
||
/** | ||
* When analyzing after a connection was established, make sure that everything was downloaded correctly and | ||
* specifically await the CFamily analyzer to be available (for tests with Eclipse CDT). | ||
*/ | ||
public class CFamilyLoaded extends AbstractWaitCondition { | ||
private static final String PATTERN = "CFamily Code Quality and Security"; | ||
|
||
private final ConsoleView consoleView; | ||
|
||
public CFamilyLoaded(ConsoleView consoleView) { | ||
this.consoleView = consoleView; | ||
} | ||
|
||
@Override | ||
public boolean test() { | ||
var consoleText = consoleView.getConsoleText(); | ||
return consoleText.lastIndexOf(PATTERN) != -1; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
....its.shared/src/org/sonarlint/eclipse/its/shared/reddeer/perspectives/CppPerspective.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* SonarLint for Eclipse ITs | ||
* Copyright (C) 2009-2024 SonarSource SA | ||
* [email protected] | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 3 of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
package org.sonarlint.eclipse.its.shared.reddeer.perspectives; | ||
|
||
import org.eclipse.reddeer.eclipse.ui.perspectives.AbstractPerspective; | ||
|
||
/** The perspective used for C/C++ development */ | ||
public class CppPerspective extends AbstractPerspective { | ||
public CppPerspective() { | ||
super("C/C++"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> | ||
<storageModule moduleId="org.eclipse.cdt.core.settings"> | ||
<cconfiguration id="cdt.managedbuild.toolchain.gnu.base.511974735"> | ||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.511974735" moduleId="org.eclipse.cdt.core.settings" name="Default"> | ||
<externalSettings/> | ||
<extensions> | ||
<extension id="org.eclipse.cdt.core.GNU_ELF" point="org.eclipse.cdt.core.BinaryParser"/> | ||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/> | ||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> | ||
</extensions> | ||
</storageModule> | ||
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> | ||
<configuration buildProperties="" id="cdt.managedbuild.toolchain.gnu.base.511974735" name="Default" parent="org.eclipse.cdt.build.core.emptycfg"> | ||
<folderInfo id="cdt.managedbuild.toolchain.gnu.base.511974735.677895738" name="/" resourcePath=""> | ||
<toolChain id="cdt.managedbuild.toolchain.gnu.base.148910555" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base"> | ||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.GNU_ELF" id="cdt.managedbuild.target.gnu.platform.base.1948530916" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/> | ||
<builder id="cdt.managedbuild.target.gnu.builder.base.983945785" managedBuildOn="false" name="Gnu Make Builder.Default" superClass="cdt.managedbuild.target.gnu.builder.base"/> | ||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.2137577005" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/> | ||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1296772266" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"/> | ||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1084654063" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"/> | ||
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.1549098579" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/> | ||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.1050671083" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"/> | ||
<tool id="cdt.managedbuild.tool.gnu.assembler.base.2030162087" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"/> | ||
</toolChain> | ||
</folderInfo> | ||
</configuration> | ||
</storageModule> | ||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> | ||
</cconfiguration> | ||
</storageModule> | ||
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> | ||
<project id="MakefileProject.null.1868164048" name="MakefileProject"/> | ||
</storageModule> | ||
<storageModule moduleId="scannerConfiguration"> | ||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> | ||
</storageModule> | ||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> | ||
</cproject> |
Oops, something went wrong.