Introduction

We employ a series of tests to detect non-backwards compatible changes in the Ganga schema. The basic idea is that when a new version of Ganga is tested, a comprehensive set of Ganga objects are created and stored in a version-specific repository (e.g. ~/gangadir_schema_test/6.0.0-pre etc.) Then, the version of Ganga under test will attempt to access these newly-created objects, in addition to objects that were created with previous versions of Ganga. Errors are raised if an object cannot be read.

Execution: Wrapper scripts

The tests are initiated during the course of running the usual Ganga tests from each of the gangaat/ge/lb accounts by the relevant script (e.g. ~/test/test_ganga_generic.sh) with the following commands:
/afs/cern.ch/sw/ganga/install/${VERSION}/release/tools/schema_gen.sh -f -v ${VERSION}
/afs/cern.ch/sw/ganga/install/${VERSION}/release/tools/schema_test.sh -v ${VERSION}
Note that the -f flag passed to schema_gen.sh forces the recreation of the schema if it already exists for that particular version.

schema_gen.sh

From the script's usage function:
The default behaviour (i.e. without the -f/-g/-t flags) of this script is:
1) Create a new Ganga repository for the indicated Ganga release version.


OPTIONS:
   -f      Force the recreation of the test repository. This will overwrite the existing repo, 
            if it exists.
   -d      Destination of repository (default: ~/gangadir_schema_test).
   -v      Version of Ganga to execute from /afs/cern.ch/sw/ganga/install (e.g. 5.8.9-pre).
   -r      Location of (temporary) Gangadir in which to create repository. If this exists, an 
            attempt will always be made to delete it.
   -g      Version of Ganga from which the Generate.gpi file is taken. This is necessary to 
            generate repositories for Ganga versions that pre-date the inclusion of Generate.gpi
   -h      Show this message.
This script is primarily a wrapper to run the Ganga/test/Schema/Generate/Generate.gpi file with Ganga. It is possible to specify which version of Ganga you want to create the Ganga objects with, though in normal operation, this will be the most recent. In the event that the gangadir_schema_test repository is lost, it is possible to recreate it with a script similar to:
for minorversion in `seq 15 19`
    do
    /afs/cern.ch/sw/ganga/install/6.0.0-beta-pre/release/tools/schema_gen.sh -g 6.0.0-beta-pre -v 5.8.$minorversion-pre
done
The -g option is used to specify the version of Ganga from which the generate.gpi file is taken. It is recommended that this always be the latest available version. The -v option instructs the script to execute generate.gpi with a given version of Ganga.

schema_test.sh

From the script's usage function:
The default behaviour is to run the Ganga/test/Schema/Test/Test.gpi file against 
the given version of Ganga, using all repositories found in the user's gangadir.


OPTIONS:
   -i      Dont' run test(s), just load the repository with a given Ganga version.
   -l      Don't run tests, just list available repositories.
   -r      Absolute location of repository (default: ~/gangadir_schema_test).
   -v      Version of Ganga to execute from /afs/cern.ch/sw/ganga/install (format: 5.8.9-pre).
   -t      Repository version to test (default is to test all available repositories (format: 5.8.9-pre).
   -h      Show this message.
Again, this script wraps the execution of Ganga/test/Schema/Test/Test.gpi by a given version of Ganga. It's possible to run the test in an 'interactive' mode by specifying the -i option and a specific version of the repository to load. This has the effect of loading all objects found in that repository, and presenting the user with an interactive Ganga session.

Execution: Ganga gpi scripts

Ganga/test/config/Schema.ini

This is a configuration file whose main task is to store an exclusion list of GangaObjects which should not be used for schema testing purposes, either because they are deprecated or are not objects that will be loaded by users.

Generate.gpi

For each of the available Ganga classes, Ganga creates an object (providing it is not in the GangaObject exclusion list described above) and stores it in the Ganga box. Errors are raised if there is an inconsistency between the number of objects that should have been stored in the box repository, and the actual number calculated by len(box).

Test.gpi

This file assesses whether there are any incomplete objects in the box (which equates to an inability for this version of Ganga being able to access the object) and, provided these objects were not in the GangaObject exclusion list (see above), raises an error. As a secondary check, an attempt is made to read each object in the box and an error raised if this is unsuccessful.

Test results

These are available via the link on the usual Ganga results page, e.g. here. Note that for each new version of Ganga tested, there will be at least three tests conducted (one per gangaat/ge/lb account).

Miscellaneous admin notes

  • If you want to prevent Ganga from testing repositories of a given version (say, when a new major-release is issued) simply remove the appropriate directories from each of the gangaat/ge/lb accounts: rm -rf ~/gangadir_schema_test/6.*
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2013-04-18 - IvanDzhunov
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    ArdaGrid All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback