~percona-dev/percona-xtrabackup/added_custom_version

« back to all changes in this revision

Viewing changes to test/run.sh

  • Committer: Valentine Gostev
  • Date: 2011-03-08 12:41:45 UTC
  • Revision ID: core.longbow@gmail.com-20110308124145-344nqrjhne02erid
Added support for custom server builds

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
mkdir results
6
6
function usage()
7
7
{
8
 
        echo "Usage: $0 [-m mysql_version] [-g] [-h]"
 
8
        echo "Usage: $0 [-m mysql_version [-f path/to/tar-ball (-f version is custom) ] ] [-g] [-h]"
9
9
        echo "-m version  MySQL version to use. Possible values: system, 5.0, 5.1, 5.5, percona. Default is system"
10
10
        echo "-g          Output debug information to results/*.out"
11
11
        echo "-t          Run only a single named test"
12
12
        echo "-h          Print this help megssage"
13
13
        echo "-s          Select a test suite to run. Possible values: experimental, t. Default is t"
 
14
        echo "-f          Path to tar-ball with mysql binaries. Used with '-m custom'"
14
15
}
15
16
XTRACE_OPTION=""
16
17
export SKIPPED_EXIT_CODE=200
17
18
export MYSQL_VERSION="system"
18
 
while getopts "gh?m:t:s:" options; do
 
19
while getopts "gh?m:t:s:f:" options; do
19
20
        case $options in
20
21
                m ) export MYSQL_VERSION="$OPTARG";;
21
22
                t ) tname="$OPTARG";;
22
23
                g ) XTRACE_OPTION="-x";;
23
24
                h ) usage; exit;;
24
25
                s ) tname="$OPTARG/*.sh";;
 
26
                f ) tarball="$OPTARG";;
25
27
                \? ) usage; exit -1;;
26
28
                * ) usage; exit -1;;
27
29
        esac
28
30
done
29
31
 
 
32
if [[ "$MYSQL_VERSION" == "custom"  &&  "$tarball" == "" ]]
 
33
        then
 
34
        echo "You should specify tar-ball for custom version"
 
35
        exit 1
 
36
fi
 
37
echo `basename $tarball`
 
38
 
30
39
if [ -n "$tname" ]
31
40
then
32
41
   tests="$tname"