File: defs.with_debug

package info (click to toggle)
libassa 3.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,084 kB
  • ctags: 2,323
  • sloc: cpp: 15,641; sh: 8,704; makefile: 372; perl: 51
file content (72 lines) | stat: -rwxr-xr-x 1,636 bytes parent folder | download | duplicates (9)
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
#!/bin/sh    
#
# The 'defs' file enables to factor out the common definitions from
# each of the test files.
#
# Borrowed from GNU Autotools book, Ch. 11.4, p 144
#
# $Id: defs.with_debug,v 1.2 2005/08/19 03:18:28 vlg Exp $

# Make sure srcdir is an absolute path. 

log="`pwd`/defs.log"
echo "defs: \$0 = $0" 1> $log

srcdir=${srcdir-.}
if test ! -d $srcdir ; then
    echo "defs: installation error" 1>> $log
    exit 1
fi

echo "[defs] 1. srcdir = $srcdir" 1>> $log

# If the source directory is a Unix directory...

case "$srcdir" in
    /* | [A-Za-z]:\\*) ;;
    *) srcdir=`\cd $srcdir && pwd` ;;
esac

echo "[defs] 2. srcdir = $srcdir" 1>> $log

case "$topbuilddir" in
    /* | [A-Za-z]:\\*) ;;
    *) top_builddir=`\cd ${topbuilddir-..} && pwd` ;;
esac

echo "[defs] 3. srcdir = $srcdir" 1>> $log

programname=`echo "$0" | sed 's,^.*/,,'`
testname=`echo "$programname" | sed 's,-.*$,,'`
testsubdir=${testsubdir-testSubDir}

echo "[defs] 4. programname   = $programname"  1>> $log
echo "[defs] 5. testname      = $testname"     1>> $log
echo "[defs] 6. testsubdir    = $testsubdir"   1>> $log
echo "[defs] 7. top_builddir  = $top_builddir" 1>> $log

# User can set VERBOSE to prevent output redirection

case x$VERBOSE in
    xNO | xno | x0 | x)
	exec > /dev/null 2>&1
	;;
esac

rm -rf $testsubdir > /dev/null 2>&1
mkdir $testsubdir
cd $testsubdir \
    || { echo "Cannot make or change into $testsubdir"; exit 1; }

echo "=== Running test $progname" 1>> $log

CMP="${CMP-cmp}"

echo "[defs] 7. CMP = $CMP"       1>> $log

# Here you can also setup environment variables
# such as PORTNUM, for example.
export ASSAPORT=10100