Presentation is loading. Please wait.

Presentation is loading. Please wait.

Plug-in Framework ETICS All Hands – October 2006

Similar presentations


Presentation on theme: "Plug-in Framework ETICS All Hands – October 2006"— Presentation transcript:

1 Plug-in Framework ETICS All Hands – 23-25 October 2006
Marc-Elian Bégin ETICS WP5 Leader CERN

2 Content Goal Examples Architecture Organisation of work Profiles

3 Goal Provide a framework for common actions to be performed during build and test execution Separation between specific build and test execution and analysis and metrics collection Provide open interface for users to register their own plug-ins to be executed during build and test Provide raw data for build and test and repository services

4 Not necessarily coupled to target module
Examples Static analysis Single line of code count (SLOC) Cyclomatic complexity Depth of inheritance IPv6 compliance Check style Dynamic analysis Code coverage Memory leaks Test execution Java: junit C++: CPPUNIT (CPPTEST) Python: PyUnit Shell: shutil Script/Executable Not necessarily coupled to target module

5 Architecture Overview
Raw data generation Modules Plug-ins Config File Build and test data model Framework CLI

6 Draft interface Each plug-in implements the following interface
getPluginInstance(): provide info about which target this plug-in contributes to, and how it can be used register(): registers for profile(s) and target(s) init(): initialise the plug-in and its environment execute(): execute the plug-in stopExecute(): stop executing the plug-in publish(): harvest and publish to a known location the results of the execution finalise(): finalisation of the plugin (only called once at the end of the process) This mechanism support cascading plug-ins (e.g. coverage -> test execution) Arguments are provided via the target string definition

7 Loading procedure Plugins are provided as Python modules or packages
They must be copied into the ‘plugins’ directory in the ETICS client standard directory structure

8 Organisation of Work Proposed in Bologna Framework: WP5
Definition and implementation of the framework Integration of the framework into the CLI Specification: WP4 Tools to be used as plug-ins Specification of inputs Specification of output and possible transformation into ETICS standard formats Plug-in implementation: WP3 Implementation of the plug-ins, including integration with underlying tools Registration and management of the tools and plug-ins Implementation of the data transformation (if required)

9 Plugin Matching Plugin matching algorithm Plugin User
Plugin registers which target(s) of which command(s) (i.e. VCSCommand, BuildCommand and TestCommand) applies to Plugin advertises for which profile it applies User using ‘profile’ field of ‘configuration’, user specifies profiles (comma separated string)

10 Plugin Matching (2) Example
junitPlugin Registers with ‘test’ target for ‘BuildCommand’ and ‘TestCommand’ Advertises for profile ‘java’ MyModule.HEAD: profile=java Result: junitPlugin fires for the target ‘test’ for both build and test A plugin can also contribute to another plugin PyCoveragePlugin contributes to PyUnitPlugin

11 Profiles Should we introduce high-level profiles? Java Python VCS
e.g. ‘java’: junit + coverage e.g. ‘python’: pyunit + coverage e.g. ‘cvs’ cvs Java Python VCS junit pyunit cvs svn Coverage: corbetura Emma Coverage: pycoverage Cyclomatic complexity: toolX toolY toolA toolB


Download ppt "Plug-in Framework ETICS All Hands – October 2006"

Similar presentations


Ads by Google