Ericsson / CodeCheckerEclipsePlugin

This is an Eclipse plugin that shows C/C++ static analysis results found by Clang Static Analyzer and Clang Tidy
Eclipse Public License 1.0
32 stars 13 forks source link

Add CodeChecker stub to the test resources #159

Closed vodorok closed 5 years ago

vodorok commented 5 years ago

CodeChecker resources in a new shared project that both unit and integration test suites reach. org.codechecker.eclipse.rcp.shared

For this to work, the unit test needed to be changed to "JUnit Plug-in test" Because cross bundle resource loading only works in an osgi context, which plain standard JUnit isn't. This results in a slightly slower execution, because an osgi context is needed to be created (basically a headless eclipse). This difference of execution time will diminish when the test case count rises in the unit tests. The benefit is much more flexible code maintainability.

Also moved the checkstyle "fail on warning" switch to the root test folder, and explicitly allowed the unit tests to violate until future clean up. This way the new shared project is also protected as well as the integration tests.

Commonly used functions like resource loading for the tests, or CodeChecker preparation can be reached from this module, as well as commonly used resources, like the new CodeChecker stub.

The CodeChecker added in this commit is utilized the in the new Indicator test which is for to test the configuration indicator in the CodeChecker preferences page.

This new Test is now a part of a test Suite: AllTests.java The common loading and workspace related works can be performed in this class.

vodorok commented 5 years ago

Hey @gyorb, added your review insights from #155 related to the CodeChecker stub.

vodorok commented 5 years ago

Hey @gyorb, can you review this pull request? After the merge, I'll remove the wip flag form #155 and #156.