File: common.config

package info (click to toggle)
sheepdog 0.8.3-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,364 kB
  • ctags: 3,951
  • sloc: ansic: 30,552; sh: 3,573; perl: 2,924; asm: 453; makefile: 391; python: 192
file content (92 lines) | stat: -rw-r--r-- 2,320 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
#
# Copyright (C) 2009 Red Hat, Inc.
# Copyright (c) 2000-2003,2006 Silicon Graphics, Inc.  All Rights Reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it would be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#
# setup and check for config parameters
#

# all tests should use a common language setting to prevent golden
# output mismatches.
export LANG=C

PATH=".:$PATH"

HOST=`hostname -s`
HOSTOS=`uname -s`

export CHECK_OPTIONS=${CHECK_OPTIONS:="-g auto"}
export PWD=`pwd`

# $1 = prog to look for, $2* = default pathnames if not found in $PATH
set_prog_path()
{
    p=`which $1 2> /dev/null`
    if [ -n "$p" -a -x "$p" ]; then
        echo $p
        return 0
    fi
    p=$1

    shift
    for f; do
        if [ -x $f ]; then
            echo $f
            return 0
        fi
    done

    echo ""
    return 1
}

_fatal()
{
    echo "$*"
    status=1
    exit 1
}

export PERL_PROG="`set_prog_path perl`"
[ "$PERL_PROG" = "" ] && _fatal "perl not found"

export AWK_PROG="`set_prog_path awk`"
[ "$AWK_PROG" = "" ] && _fatal "awk not found"

export SED_PROG="`set_prog_path sed`"
[ "$SED_PROG" = "" ] && _fatal "sed not found"

export BC_PROG="`set_prog_path bc`"
[ "$BC_PROG" = "" ] && _fatal "bc not found"

export DRIVER=${DRIVER:-local}
export WD=${WD:-/tmp/sheepdog}
export STORE=$WD
export SHEEP_PROG=${SHEEP_PROG:-../../sheep/sheep}
export SHEEP=${SHEEP:-$SHEEP_PROG}
export SHEEP_OPTIONS=${SHEEP_OPTIONS:-"-n -y 127.0.0.1 -l level=debug"}
export DOG_PROG=${DOG_PROG:-../../dog/dog}
export DOG=${DOG:-$DOG_PROG}
export VALGRIND_OPTIONS=${VALGRIND_OPTIONS:-"-q"}
export MD=${MD:-false}
export EC=${EC:-false}
export QEMU_IO=${QEMU_IO_PROG:-qemu-io}
export QEMU_IMG=${QEMU_IMG_PROG:-qemu-img}
export SHEEPFS=${SHEEPFS:-../../sheepfs/sheepfs}
export SOURCE=${SOURCE:-../..}

# make sure this script returns success
/bin/true