File: test-distribution

package info (click to toggle)
otags 3.09.3-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 280 kB
  • ctags: 279
  • sloc: ml: 995; sh: 464; makefile: 147
file content (63 lines) | stat: -rwxr-xr-x 1,331 bytes parent folder | download | duplicates (2)
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
#!/bin/bash

# invoke as test-distribution tag config-args

set -e

tag=$1
shift
config_args="$*"

echo =====================================================================
echo ========= TEST $tag $config_args
echo =====================================================================


tmpdir=/tmp/tews
name=$(./otags -version | tr ' ' -)
dir=$tmpdir/test-$name/$tag

mkdir -p $dir
rm -rf $dir
mkdir -p $dir

if [ ! -f $tmpdir/$name.tar.gz ] ; then
    echo no $tmpdir/$name.tar.gz found!
    exit 1
fi

pushd $dir
tar -xzf $tmpdir/$name.tar.gz

popd

tocopy="test/lablgtk* test/ccslc*"

for f in $tocopy ; do
    # echo cp $f $dir/$name/$f
    cp $f $dir/$name/$f
done
#exit 1

if [ ! -d $dir/$name ] ; then
    echo $dir/$name does not exist !!
    exit 1
fi
pushd $dir/$name

set -x
./configure --prefix $dir/install $config_args 
set +x

make 
make checkext 2>/dev/null
if [ $? = 0 ] ; then
    echo =====================================================================
    echo ========= TEST PASSED $tag $config_args
    echo =====================================================================
else
    echo =====================================================================
    echo ========= TEST FAILED $tag $config_args
    echo =====================================================================
    exit 1
fi