P. Mato/CERN.  Work done in the context of Geant4 ◦ Presented at last Collaboration meeting  Facilitate testing and packaging using the tools (CTest.

Slides:



Advertisements
Similar presentations
Jean-Christophe Fillion-Robin & Julien Finet Kitware Inc. June 20 th 2011.
Advertisements

Configuration management
ANT: Another Nice Tool Ali Beyad October 1, 2003.
6/1/2015Ch.31 Defining Enterprise Architecture Bina Ramamurthy.
Automating Common DBA Tasks
Cognizant Reusable Automation Framework for Testing C.R.A.F.T.
Automated Tests in NICOS Nightly Control System Alexander Undrus Brookhaven National Laboratory, Upton, NY Software testing is a difficult, time-consuming.
Introduction to Software Testing
Using the Windows Event Viewer and Task Scheduler Chapter 5.
Slide 1 of 9 Presenting 24x7 Scheduler The art of computer automation Press PageDown key or click to advance.
Workflow API and workflow services A case study of biodiversity analysis using Windows Workflow Foundation Boris Milašinović Faculty of Electrical Engineering.
Cognizant Reusable Automation Framework for Testing C.R.A.F.T.
Automated Malware Analysis
Talend 5.4 Architecture Adam Pemble Talend Professional Services.
#RefreshCache CI - Daily Builds w/Jenkins – an Open Source Continuous Integration Server Nick Airdo Community Developer Advocate Central Christian Church.
DNN LOVES JENKINS FOR CONTINUOUS INTEGRATION
NA-MIC, 2008 June Workshop, IHK Akademie Westerham Engineering Methodology Sebastien BARRE, Ph.D. - Kitware, Inc.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Software Process, CMake, Dashboards, CPack Bill Hoffman Kitware, Inc.
CERN - IT Department CH-1211 Genève 23 Switzerland t Monitoring the ATLAS Distributed Data Management System Ricardo Rocha (CERN) on behalf.
Unit tests, Integration tests Physics tests Andrea Dotti, Gunter Folger, Pere Mato CERN – PH/SFT Geant4 workshop 2012.
Trilinos User Group Meeting Thursday, November 8 th, 2007 Timothy M. Shead (1424) Danny Dunlavy (1415) SAND P Sandia is a multiprogram laboratory.
RUP Implementation and Testing
CSE 303 – Software Design and Architecture
Page 1 Trilinos Usage of CMake/CTest/CDash Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia.
Business Unit or Product Name © 2007 IBM Corporation Introduction of Autotest Qing Lin.
 To explain the importance of software configuration management (CM)  To describe key CM activities namely CM planning, change management, version management.
Intelligent Automation. Who are PAA ? Who are Process Analysis & Automation ? Incorporated in 1992 Software supplier, OVERLORD Offer systems integration.
Connect communicate collaborate perfSONAR MDM updates: New interface, new possibilities Domenico Vicinanza perfSONAR MDM Product Manager
Configuration Management (CM)
INFSOM-RI Juelich, 10 June 2008 ETICS - Maven From competition, to collaboration.
EGEE is a project funded by the European Union under contract IST Testing processes Leanne Guy Testing activity manager JRA1 All hands meeting,
Scalable Game Development William Roberts Senior Game Engineer
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
Testing Workflow In the Unified Process and Agile/Scrum processes.
FairRoot Build and Test System
CMake For Trilinos Developers
Contents 1.Introduction, architecture 2.Live demonstration 3.Extensibility.
Introduction to the Adapter Server Rob Mace June, 2008.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
CMake refactoring P. Hristov 19/03/2014. History I  Recursive makefiles (F.Carminati):  Problems in dependencies  Slow  "Recursive Makefiles.
1 / 22 AliRoot and AliEn Build Integration and Testing System.
Tool Integration with Data and Computation Grid GWE - “Grid Wizard Enterprise”
Ant & Jar Ant – Java-based build tool Jar – pkzip archive, that contains metadata (a manifest file) that the JRE understands.
Feedback from the POOL Project User Feedback from the POOL Project Dirk Düllmann, LCG-POOL LCG Application Area Internal Review October 2003.
B. Hegner, P. Mato, P. Mendez CERN, PH-SFT Group 1 ST FORUM CERN 28-SEP-2015 THE QUALITY AND TESTING INFRASTRUCTURE OF PH-SFT.
Tool Integration with Data and Computation Grid “Grid Wizard 2”
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
NA-MIC, 2008 June Workshop, IHK Akademie Westerham Engineering Methodology Sebastien BARRE - Kitware, Inc.
Build Tools 1. Building a program for a large project is usually managed by a build tool that controls the various steps involved. These steps may include:
The Claromentis Digital Workplace An Introduction
Microsoft ® Official Course Module 6 Managing Software Distribution and Deployment by Using Packages and Programs.
Thoughts on How to Distribute the Bare Minimum for Analysis Natalia Ratnikova, Fermilab 16 May, 2006 Software Development Tools Meeting.
CONTROL-M Training At Global Online Trainings IND: Skype: Global.onlinetrainings USA:
DECTRIS Ltd Baden-Daettwil Switzerland Continuous Integration and Automatic Testing for the FLUKA release using Jenkins (and Docker)
Introduction to Ansible
Geant4 Collaboration Meeting 2011, SLAC P. Mato/CERN.
Build and Test system for FairRoot
Managing, Storing, and Executing DTS Packages
Flight Software Development Through Python
Prologue.
GWE Core Grid Wizard Enterprise (
4th Forum How to easily offer your application as a self-service template by using OpenShift and GitLab-CI 4th Forum Alberto.
Releases and developments
Advanced Integration and Deployment Techniques
Introduction to Software Testing
Module 01 ETICS Overview ETICS Online Tutorials
VirgoStaging Status F.Carbognani, S. Cortese, E. Pacaud.
Introducing MagicInfo 6
Presentation transcript:

P. Mato/CERN

 Work done in the context of Geant4 ◦ Presented at last Collaboration meeting  Facilitate testing and packaging using the tools (CTest and CPack) developed by Kitware and distributed as part of CMake. ◦ No need to reinvent the wheel ◦ Perfect integration to CMake build system  Testing is absolutely essential for any “agile” software development activity  Developers should participate to the testing activity ◦ Adding, running, surveying tests should be extremely easy and effortless P. Mato/CERN 2

3

4

 With CTest/CMake tests are defined using the add_test(...) command ◦ Developed a high-level function GEANT4_ADD_TEST(…) to encapsulate the Geant4 policies and an specialized command wrapper for the tests ◦ Test programs themselves can also be built as part of the test (BUILD option) P. Mato/CERN 5 # function GEANT4_ADD_TEST( # COMMAND cmd [arg1... ] # [PRECMD cmd [arg1...]] [POSTCMD cmd [arg1...]] # [OUTPUT outfile] [ERROR errfile] # [ENVIRONMENT var1=val1 var2=val2...] # [DEPENDS test1...] # [TIMEOUT seconds] # [DEBUG] # [SOURCE_DIR dir] [BINARY_DIR dir] # [BUILD target] ) # function GEANT4_ADD_TEST( # COMMAND cmd [arg1... ] # [PRECMD cmd [arg1...]] [POSTCMD cmd [arg1...]] # [OUTPUT outfile] [ERROR errfile] # [ENVIRONMENT var1=val1 var2=val2...] # [DEPENDS test1...] # [TIMEOUT seconds] # [DEBUG] # [SOURCE_DIR dir] [BINARY_DIR dir] # [BUILD target] )

P. Mato/CERN 6 cmake_minimum_required(VERSION 2.6 FATAL_ERROR) project(test21) find_package(Geant4 REQUIRED) include(${Geant4_USE_FILE}) GEANT4_EXECUTABLE(test21 test21.cc src/*.cc) GEANT4_EXECUTABLE(test21_geninput test21_hadronic_exerciser.cc) #---Test definitions GEANT4_ADD_TEST(test21_geninput COMMAND test21_geninput OUTPUT test21.in BUILD test21_geninput ) GEANT4_ADD_TEST(test21 COMMAND test21 test21.in BUILD test21 ENVIRONMENT ${GEANT4_TEST_ENVIRONMENT} DEPENDS test21_geninput) cmake_minimum_required(VERSION 2.6 FATAL_ERROR) project(test21) find_package(Geant4 REQUIRED) include(${Geant4_USE_FILE}) GEANT4_EXECUTABLE(test21 test21.cc src/*.cc) GEANT4_EXECUTABLE(test21_geninput test21_hadronic_exerciser.cc) #---Test definitions GEANT4_ADD_TEST(test21_geninput COMMAND test21_geninput OUTPUT test21.in BUILD test21_geninput ) GEANT4_ADD_TEST(test21 COMMAND test21 test21.in BUILD test21 ENVIRONMENT ${GEANT4_TEST_ENVIRONMENT} DEPENDS test21_geninput) Used a macro to simplify writing

 Tests are also defined for each example ◦ GEANT4_ADD_TEST() specified outside the CMakeLists.txt of the example (tests/CMakeLists.txt) ◦ Full paths are required instead of relative ones P. Mato/CERN 7 GEANT4_ADD_TEST(example-nov-n01 COMMAND ${CMAKE_BINARY_DIR}/examples/novice/N01/exampleN01 ${CMAKE_SOURCE_DIR}/examples/novice/N01/exampleN01.in SOURCE_DIR ${CMAKE_SOURCE_DIR}/examples/novice/N01 BINARY_DIR ${CMAKE_BINARY_DIR}/examples/novice/N01 BUILD exampleN01) GEANT4_ADD_TEST(example-nov-n01 COMMAND ${CMAKE_BINARY_DIR}/examples/novice/N01/exampleN01 ${CMAKE_SOURCE_DIR}/examples/novice/N01/exampleN01.in SOURCE_DIR ${CMAKE_SOURCE_DIR}/examples/novice/N01 BINARY_DIR ${CMAKE_BINARY_DIR}/examples/novice/N01 BUILD exampleN01)

 The ctest executable is provided and distributed as part of CMake ◦ Many options available to select what tests to run, configuration, verbosity, etc. ◦ Used by developers and the continuous integration testing P. Mato/CERN 8 >>>> ctest -R test10 Test project /Users/mato/Development/G4/make Start 90: test10 1/2 Test #90: test Passed sec Start 91: test10-largeN 2/2 Test #91: test10-largeN Passed sec 100% tests passed, 0 tests failed out of 2 Total Test time (real) = sec >>>> ctest -R test10 Test project /Users/mato/Development/G4/make Start 90: test10 1/2 Test #90: test Passed sec Start 91: test10-largeN 2/2 Test #91: test10-largeN Passed sec 100% tests passed, 0 tests failed out of 2 Total Test time (real) = sec

 Complex tests can be run using dedicated scripts ◦ CMake scripting  Platform independent ◦ Variables to customize CTest behavior ◦ Commands to drive the whole test procedure  Executing the script ◦ ctest –S P. Mato/CERN 9 set(CTEST_CUSTOM_TESTS_IGNORE test19 test29 test39 test49) if(WIN32)... endif() set(CTEST_TEST_TIMEOUT 1200) ctest_empty_binary_directory( ${CTEST_BINARY_DIRECTORY}) ctest_start("Continuous") ctest_update() ctest_configure() ctest_build() ctest_test(PARALLEL_LEVEL ${ncpu}) ctest_submit() set(CTEST_CUSTOM_TESTS_IGNORE test19 test29 test39 test49) if(WIN32)... endif() set(CTEST_TEST_TIMEOUT 1200) ctest_empty_binary_directory( ${CTEST_BINARY_DIRECTORY}) ctest_start("Continuous") ctest_update() ctest_configure() ctest_build() ctest_test(PARALLEL_LEVEL ${ncpu}) ctest_submit()

 The results of running a Nightly or Continuous integration tests as well as developer initiated (Experimental) test runs can be very easily uploaded to CDash ◦ Customizable views with different level of details ◦ Command wrapper output ◦ notification  Currently squatting the Desy service for testing P. Mato/CERN 10 % ctest –j4 –D Experimental

P. Mato/CERN 11 CDash server builder upload results cron Dashboards Developer workstation

P. Mato/CERN 12 set(CTEST_PROJECT_NAME "Geant4") set(CTEST_NIGHTLY_START_TIME "00:00:00 CET") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "aidasoft.desy.de") set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Geant4") set(CTEST_DROP_SITE_CDASH TRUE) set(CTEST_PROJECT_NAME "Geant4") set(CTEST_NIGHTLY_START_TIME "00:00:00 CET") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "aidasoft.desy.de") set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Geant4") set(CTEST_DROP_SITE_CDASH TRUE)

 A pilot ‘continuous’ integration and testing has been setup (few times/day) P. Mato/CERN 13

 Pros ◦ Loosely coupled set of build and test servers  No need for an overall workflow or scheduling ◦ Support for continuous, nightly and user triggered builds and tests  New modes can be defined ◦ Testing on special platforms can be provided by interested customers ◦ Extremely simple, almost nothing to configure.  Cons ◦ Limited customization ◦ Dashboard may became overcrowded P. Mato/CERN 14

P. Mato/CERN 15

 CPack (bundled with CMake) is able to create professional platform specific installed ◦ GZ and Self extract TGZ (STGZ), NullSoft Scriptable Install System (NSIS), OSX PackageMaker, RPM, Deb  For Geant4: ◦ Binary and Source installers (TGZ, NSIS, PackageMaker) ◦ User can select what components to install P. Mato/CERN 16

 To create the installers you need to enable a couple of CMake options to include the examples & data: ◦ GEANT4_INSTALL_DATA ◦ GEANT4_INSTALL_EXAMPLES  Make the 'package' target for the binary distribution and 'package_source' for the sources P. Mato/CERN 17

 Provided the definition, building and running of tests using CMake/CTest/CDash tools ◦ The main goal has been to make it easy for developers to define, run, automate and monitor tests  CDash could offer a competitive replacement to the LCG nightlies  CPack is a nice utility to provide ‘professional’ packaging with very little effort P. Mato/CERN 18