The GNAThub.Plugin class is no longer an abstract class and
GNAThub.Runner & GNAThub.Reporter are two new interfaces exposing
respectively run() and report(). Plugins now have tools execution
done in run() methods, and results collection done in report() methods
(when it make sense for the plugin, ie. coverage plugins only implement
the GNAThub.Reporter interface whereas eg. CodePeer plugin implements
both GNAThub.Runner and GNAThub.Reporter interfaces).
Change-Id: Ic702a98eb3bb02e7f7416b5ff3c998f9b20eaefc
TN: P720-035
This commit introduces several changes:
* rewrite the docstring of Python scripts to use AdaCore style and
have a consistent documentation notation across projects
* add plug-ins documentation to the generated doc, so that users don't
need to dive into the source files when developing their own
plug-ins
* use a custom style for the HTML documentation (lighter & easier to
read)
Change-Id: Ied42183e866ee552b90af2f4ef1d2410be601ca4
Remove two deprecated methods: fqn and display_command_line(), and a
deprecated attribute: LOG_FILE.
Also refactor the code and normalize the plug-ins output.
Change-Id: I1a346f0dc4c705cf03199f348006aabdab0ad56f
Distinguish routines to print GNAThub output with routines to log the
execution of GNAThub and its plug-ins.
Define a new Logger class and export it to Python. Plug-ins can simply
use the pre-defined self.log instance variable for logging.
Update all occurrences of printing and logging in the sources.
Also update two tests to ensure they do not attempt to run any other
plug-in than SonarConfig.
Change-Id: I47bd3a4fc243a70c12138ca2b8e854d770dbae82
It relies on the definition of three concepts:
* Repositories (containing one or more scripts)
* Scripts (containing one or more plug-ins)
* Plug-ins (the actual piece of code that GNAThub will execute)
The notion of "core" and "extra" plug-ins is replaced by two
repositories: [system] and the [global].
Those repositories contains scripts that themselves contains plug-ins.
The user can define a [local] repository in it project file. This is
done with the 'Local_Repository' attribute. It replaces the previous
'Specific_Plugins' attribute.
GNAThub lists all available scripts, and loads them to create a list of
plug-ins (actual Python classes).
The user can then select the plug-ins to run:
* With a switch on the command line (--plugins)
* With an attribute of the project ('Plugins')
Both expect a list of plug-ins names. The name of a plug-in is the name
of the Python class (case-insensitive).
If none is specified, GNAThub executes all plug-ins it has found.
src/gnathub/ChangeLog:
* gnathub-project.adb (GNAThub.repositories): New function. It
returns a dictionary associating the name of a repository with the
path to the actual directory.
(GNAThub.core_plugins, GNAThub.extra_plugins): Remove functions.
* gnathub-project.adb: Replace attribute Specific_Plugins by
Local_Repository.
src/lib/ChangeLog:
* GNAThub/__init__.py (GNAThub.repositories): Write the
documentation for the new function.
(GNAThub.core_plugins, GNAThub.extra_plugins): Remove functions.
(register, run): Remove those function since they are only used by
the plugin-runner.py.
* scripts/plugin-runner.py: Full re-write of this script.
docs/source/user-manual/execute_driver.rst: Update documentation.
testsuite/tests/api-python/*: Update test cases.
Issue: DSH-37
Change-Id: Ic65001ce01eb3a625e0e08cd4b2747dbbb166846
Add support for custom category names through YAML configuration file.
This allows results to not be stored with the same hierarchy as the
actual tests (the testsuite is more stable with this mode).
Also renames the testsuite directory.
Change-Id: I4e4b997d6b3732d116fb2fc7605d8f99d8117857