Running the OSG Automated Tests (osg-test)

The osg-test package contains software that performs automated, functional integration tests an OSG Software installation.

WARNING: The tests and associated test framework run as root and may destroy your system! It is strongly recommended that osg-test be run only on “disposable” systems — ones that can be reimaged or reinstalled from scratch with little effort. Virtual machines are ideal for this kind of test.

Basic Instructions

All steps are performed as root:

  1. Download and prepare the bootstrap script:
    $ wget --quiet
    $ chmod 0755 bootstrap-osg-test
  2. Bootstrap the test system using the osg-testing Yum repository. The osg release is required as the first argument and takes the form of '<major version>.<minor version>' e.g. 3.2. To get osg-test from the osg-development Yum repository, replace the second argument with development; to get osg-test from the production repository, omit the second argument. This step makes sure that both the EPEL and OSG repositories are available, then installs and verifies the osg-test package itself.
    $ ./bootstrap-osg-test <osg release> testing
  3. Run the tests (see below for options). Be sure to direct the stdout/stderr to a file to get all the information from the test run (the dump-file option only outputs some of the output to a file):
    $ osg-test -vadi PACKAGE -r osg-testing > <output file> 2>&1

The osg-test Script

Fundamentally, the osg-test script runs tests and reports on their results. However, the script can also perform many of the housekeeping tasks associated with setting up and tearing down the test environment, including adding (and later removing) a test user and its X.509 certificate, installing (and later removing) one or more RPMs, and so on. The following options are available:

-a, --add-user Add and configure the test user account (see also -u below). By default, the script assumes that the test user account already exists and is configured with a valid X.509 certificate in its .globus directory.
--cilogon Generate CILogon-like certificates
-c, --config FILE Configuration file to use that specifies command-line options. See below for syntax
-d, --dump-output After all test output, print all commands and their output from the test run. Typically generates a lot of output.
--df, --dump-file FILE Like --dump-output, but prints the output to a file instead of the console
-m, --manual-run Speeds up osg-test in the case where it is run by hand. May not be suitable when running multiple instances of osg-test at once.
-g, --update-repo REPO Enable the given repository when using yum to update packages. Use actual repo names, such as osg-testing and osg-development.
-i, --install PACKAGE Before running tests, use yum to install the given package; may be specified more than once to install more than one top-level package. By default, the script assumes that the user has installed all packages to be tested in advance.
-n, --no-cleanup Do not run clean-up steps. Opposite of --cleanup
-p, --password PASSWORD Password for the grid certificate of the test user. Defaults to the password that works with the X.509 certificate for the default test user.
-r, --extra-repo REPO Enable the given extra repository (in addition to production) when using yum to install packages. Use actual repo names, such as osg-testing and osg-development. Can be used multiple times with different repositories.
--update-release RELEASE OSG release version (e.g. 3.2) to use when updating packages specified with -i.
--tarballs Test client tarballs instead of RPM-based installation.
--tarball-test-dir The location of the tarball test files (if non-standard).
-T, --no-tests Skip running the tests themselves. Useful for running/testing just the set-up and/or clean-up steps.
-u, --test-user USERNAME Use the test user account with the given name. See also the -a and -p options.
-v, --verbose Print the name of each test as it is run; generally a good idea.
-h, --help Print usage information and exit.
--version Print the script version and exit.

Config File Syntax

Unfortunately, the names of the variables in the config file are not the same as their names on the command line. Below is a translation table and an example config file.

Command-Line Config File Default Value
--add-user adduser False
--cilogon cilogon True
--dump-output dumpout False
--dump-file dumpfile None
--update-repo updaterepos [ ]
--install packages [ ]
--manual-run manualrun False
--no-cleanup skip_cleanup False
--password password vdttest
--extra-repo extrarepos [ ]
--update-release updaterelease None
--tarballs tarballs False
--no-tests skiptests False
--test-user username vdttest
--verbose verbose False
backupmysql False
  hostcert False


Topic revision: r17 - 09 Jun 2016 - 21:40:31 - BrianLin
Hello, TWikiGuest!


TWiki | Report Bugs | Privacy Policy

This site is powered by the TWiki collaboration platformCopyright by the contributing authors. All material on this collaboration platform is the property of the contributing authors..