This plugin stopped working some time ago due to major changes in
GNATprove output. Remove support for it as it will be re-implemented as
part of P701-003.
Change-Id: I7c0b6399243a865c57211b0f2c16573bf5ed63a9
TN: P701-003
TN: N805-021
This new function lists source files on a per project basis. This is
more accurate than using GNAThub.source_dirs() and list the content of
each source directory.
Change-Id: I4cea06be722afa51eea3339070a263225e52f5f6
TN: P310-015
Extract the test about cross support in two separate test cases in
tests.api-python.project:
* check-cross-api.py
* check-cross-api-override.py
Change-Id: I7a2e3de80f0193553a5879bad55032f6b2bd5abd
TN: O909-050
* add support in GNAThub for --target and --RTS command line
switches.
* add support for Target and Runtime attributes defined in the project
file.
* add tests to cover the new API methods (Project.target &
Project.runtime).
Change-Id: I42a88471598fefec16a7505ad70cd24b08f3dd8b
TN: O909-050
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
Provide a default implementation to the GNAThub.Plugin.name property:
return type(self).__name__
Use plugin().name along with plugin.__name__ to discriminate plugins
from their name in the plugin-runner.py.
Change-Id: Ie478427ffd78c45cdab8dd1e842b3736020cd710
TN: N623-022
The lack of such support was uncovered by a customer that wants to
access the "Main" attribute of the project file. Generalizing the
"Property_As_String" and "Property_As_List" routine is simple enough and
does not break backward compatibility.
src/gnathub/ChangeLog:
* gnathub-project.ad? (GNATdashboard_Package): Rename the constant for
consistency with GNATCOLL.Project and make its declaration public so
that it can be referenced from other packages (in particular:
GNAThub.Python).
(Property_As_List, Property_As_String): New optional parameter
"Package_Name". Defaults to GNATdashboard_Package.
* gnathub-pyhton.adb (Register_Project_Class): Register the optional
parameter "package" to Python static methods property_as_list and
property_as_string.
src/lib/GNAThub/ChangeLog:
* __init__.py (property_as_list, property_as_string): Update
documentation.
testsuite/tests/api-python/project/*:
* Add a new test to extract the "main" attribute from the project
file.
features-10: New features file to keep track of enhancements.
Change-Id: I2f6808b95f76581432e0893847b951183d4ca341
TN: N623-022
This static method now returns a dictionary associating project name to
a list of source directories.
This will be needed when integrating imported projects as modules within
SonarQube.
Change-Id: If92313c8ea68cf7d17728c26d6d57f415792c6ba
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
The sonarconfig.py plugin creates the sonar-runner.properties file which
describes the project to the Sonar Runner. So far, the sonar.sources
property was hard-coded to "." ie. the current directory.
This led to plethora of invalid scenarios when gnathub is not invoked
from the same directory as the project file it is fed with (even running
gnathub from the same directory cannot guarantee a successful
execution).
This patch fixes this issue by setting the sonar.sources property to a
comma-separated list of Source_Dirs as declared in the project file.
src/ChangeLog:
* gnathub/gnathub-project.ad[bs] (Source_Dirs): new routine
* gnathub/gnathub-python.adb: define a new Python static method for
the Project class: source_dirs()
* lib/GNAThub/__init__.py (Project.source_dirs): new routine
share/gnathub/core/ChangeLog:
* sonarconfig.py: set sonar.sources property to a comma-separated
list of source directories
testsuite/tests/ChangeLog:
* api-python/project/*: test availability of the
Project.source_dirs() static method
Issue: DSH-31
Change-Id: Id108129ab327453a381def79ed5c8d3644afe4bc
* Customize conf.py
* Add docs target to the top-level Makefile
* Write the introduction to the User's Manual.
Change-Id: I9c52246a4160d9e8abaaf217635124761960d05c
Feature: DSH-8
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