Laurent Garnier OSUR Geant 4 Collaboration Meeting 29
Laurent Garnier - OSUR / Geant 4 Collaboration Meeting - 29 Sept 2015 - Chicago 1
A set of drivers It is user ’s responsability to test their own example. I’m not takling about testing the user interface (buttons, mouse click…), but only the visualisation frame. Interactively Open your favorite User interface and test Time consuming difficult to check everything In batch mode Possible to automate in Cdash => easy, cdash is working for your Laurent Garnier - OSUR / Geant 4 Collaboration Meeting - 29 Sept 2015 - Chicago 2
Testing vis in batch mode The goal is to : 1. Run your example 2. Take snapshots of vis 3. Compare theses « snapshot » to reference files Laurent Garnier - OSUR / Geant 4 Collaboration Meeting - 29 Sept 2015 - Chicago 3
How to ? 1. In. cc main() function, add a batch fallback if(argc>1){ // execute an argument macro file if exist G 4 String file. Name = argv[1]; } UImanager->Apply. Command(control. Execute + file. Name); 2. In macro file, open generic OGL viewer Will goes on OGLSQt or whatever Will fall into batch if not /vis/open OGL 3. In macro file, take snapshot(s) /vis/ogl/export my. Test. Vis. jpg Laurent Garnier - OSUR / Geant 4 Collaboration Meeting - 29 Sept 2015 - Chicago 4
How to ? 4. a Launch application on your computer No problems, and then compare by hand the output to a reference folder 4. B Launch application on Cdash Tests on Cdash run on computer without graphic card Achieve by running visualisation in a frame buffer instead of inside a window, thanks to XVFB library (X With Frame Buffer) Laurent Garnier - OSUR / Geant 4 Collaboration Meeting - 29 Sept 2015 - Chicago 5
How to ? CMake. Lists. txt find_package(Xvfb QUIET) if(XVFB_FOUND) message(STATUS "G 4 TESTS: found Xvfb --> run test 202 » ) GEANT 4_ADD_TEST(test 202 -OGLIX COMMAND xvfb. sh ${CMAKE_CURRENT_BINARY_DIR}/test 202 OGLIX ENVIRONMENT ${GEANT 4_TEST_ENVIRONMENT} DEPENDS test 202 -build TIMEOUT 1500 ERROR expected_errors. txt) endif() Will Run a test with xvfb. sh script: Xvfb. sh bin_name param => You should have a param. vis macro and param-reference, param-output folders Laurent Garnier - OSUR / Geant 4 Collaboration Meeting - 29 Sept 2015 - Chicago 6
How to ? Quick look on xvfb. sh export DISPLAY_TMP=$DISPLAY XV_CMD="Xvfb : 99 -screen 0 1024 x 768 x 24 -nolisten tcp » … # Launching export DISPLAY=: 99 echo "launching $1 » $1 $2. mac … See test 202 example. Laurent Garnier - OSUR / Geant 4 Collaboration Meeting - 29 Sept 2015 - Chicago 7
Testing all examples ? Nothing done for the moment I guess a minimum of 1 test by example should be done Not a big effort Actually only 1 machine on Cdash run with xvfb library Laurent Garnier - OSUR / Geant 4 Collaboration Meeting - 29 Sept 2015 - Chicago 8
Question ? Laurent Garnier - OSUR / Geant 4 Collaboration Meeting - 28 Sept 2015 - Chicago 9
- Slides: 9