Jython for Embedded Software ValidationRaniero VirgilioIAG/ECG/PPD SW Pycon Quattro, 8/5/2010
Raniero VirgilioMy Job Software Engineer in Intel Shannon, IrelandResponsible for Test Automation infrastructureMy TeamPPD (Performance Product Division)Embedded SoftwareComplete SOCs for security, communications, storage and embedded designshttp://www.intel.com/embedded/index.htm
AgendaValidation in embedded systemsRuntime Plug-in modelRuntime Plug-in model with JythonJython and EclipseResults
Validation in embedded systemsA challenging environmentTypical scenarioRequirements and solutions
A challenging environmentMultiple hw/sw deploymentsConfiguration set up needs to be fast and reliableSupport for different OS types and versionsConsistent cooperationSeveral teams working on the same infrastructureSynchronization with overseas groups
Test Automation scenarioTest CodeXML-RPC sessionServer1 (Windows)Traffic Generator 1XML-RPC sessionTraffic Generator 2Server2 (Windows)Telnet sessionTest DriverDUT1 (Linux/Windows/FreeBSD)Test ExecutionReportsXML-RPC sessionTelnet sessionTest SuitesDUT2(Linux/Windows/FreeBSD)Telnet sessionDUT3(Linux/Windows/FreeBSD)
Test Automation requirementsProgramming languagePlatform-independentLibraries for connectivity and string manipulationTest Framework designOOP to maximize reusability of test codePlatform runtime extendibilitySustainable implementationAn effective interface between test execution (local to DUT) and test reporting (distributed)Customizable open source solution
Proposed solutionProgramming languagePythontelnetlib, xmlrpclib, SimpleXMLRPCServerre,xml.dom.minidomTest Framework designRuntime plug-in modelSustainable implementationJython embedded in EclipseJython is a Python interpreter written in 100% pure Java
Runtime plug-in modelDefinitionDesign Pattern
Runtime Plug-in ModelThe term plug-in refers to a type of program that contributes code to the system and adds a special capability to it.The plug-in is unknown at compile-time of the application for which the plug-in is designed.Plug-ins are dynamically plugged into the application they are designed for at runtimeThe key for this model is Dynamic Code Loading
Design PatternExtendibility
Application capabilities are defined by the supported Plug-in
Plug-in can be loaded and unloaded at runtime
Plug-in development
Each Plug-in shall implement a specified interface
The plug-in delegates the Application for high-level services
Parallel life-cycle
Application and Plug-ins can be developed independently Runtime Plug-in Model with JythonDynamic code loading in Java and JythonMultithreading
Dynamic code loading in JavaRuntime source compilation
StandardJavaFileManager handles the source code
JavaCompiler executes the compilation and creates a class file
DiagnosticCollector gathers compilation information
Class file deployment
A new Classloader has to be defined
It need to extend the previous one with the new class fileClient
Dynamic code loading in JythonOne step task

Jython for Embedded Software Validation