1 / 9

How to test Vis ?

How to test Vis ?. Laurent Garnier OSUR / INSU / CNRS Geant4 Collaboration Meeting – Chicago – 29 September 2015. A set of drivers.

gutowski
Télécharger la présentation

How to test Vis ?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. How to test Vis ? Laurent Garnier OSUR / INSU / CNRS Geant4 Collaboration Meeting – Chicago – 29 September 2015 Laurent Garnier - OSUR / Geant4 Collaboration Meeting - 29 Sept 2015 - Chicago

  2. 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 / Geant4 Collaboration Meeting - 29 Sept 2015 - Chicago

  3. Testing vis in batch mode The goal is to : • Run your example • Take snapshots of vis • Compare theses « snapshot » to reference files Laurent Garnier - OSUR / Geant4 Collaboration Meeting - 29 Sept 2015 - Chicago

  4. How to ? • In .cc main() function, add a batch fallback if(argc>1){ // execute an argument macro file if exist G4String fileName = argv[1]; UImanager->ApplyCommand(controlExecute + fileName);} 2. In macro file, open generic OGL viewer • Will goes on OGLSQt or whatever • Will fallinto batch if not /vis/open OGL 3. In macro file, takesnapshot(s) /vis/ogl/export myTestVis.jpg Laurent Garnier - OSUR / Geant4 Collaboration Meeting - 29 Sept 2015 - Chicago

  5. How to ? 4.a Launch application on your computer • No problems, and then compare by hand the output to a referencefolder 4.B Launch application on Cdash • Tests on Cdashrun on computer withoutgraphiccard • Achieve by running visualisation in a frame buffer instead of inside a window, thanks to XVFB library (X With Frame Buffer) Laurent Garnier - OSUR / Geant4 Collaboration Meeting - 29 Sept 2015 - Chicago

  6. How to ? CMakeLists.txt find_package(Xvfb QUIET) if(XVFB_FOUND) message(STATUS "G4 TESTS: found Xvfb --> run test202 ») GEANT4_ADD_TEST(test202-OGLIX COMMAND xvfb.sh ${CMAKE_CURRENT_BINARY_DIR}/test202 OGLIX ENVIRONMENT ${GEANT4_TEST_ENVIRONMENT} DEPENDS test202-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 / Geant4 Collaboration Meeting - 29 Sept 2015 - Chicago

  7. How to ? Quick look on xvfb.sh export DISPLAY_TMP=$DISPLAY XV_CMD="Xvfb :99 -screen 0 1024x768x24 -nolisten tcp » … # Launching export DISPLAY=:99 echo "launching $1 » $1 $2.mac … See test202 example. Laurent Garnier - OSUR / Geant4 Collaboration Meeting - 29 Sept 2015 - Chicago

  8. Testing all examples ? • Nothingdone for the moment • I guess a minimum of 1 test by exampleshouldbedone • Not a big effort Actuallyonly 1 machine on Cdashrunwithxvfblibrary Laurent Garnier - OSUR / Geant4 Collaboration Meeting - 29 Sept 2015 - Chicago

  9. Question ? Laurent Garnier - OSUR / Geant4 Collaboration Meeting - 28 Sept 2015 - Chicago

More Related