File: test-distribution

package info (click to toggle)
otags 3.12.5-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 584 kB
  • sloc: ml: 2,642; sh: 496; makefile: 239
file content (63 lines) | stat: -rwxr-xr-x 1,358 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
#!/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
otags_version=$(./configure -abra-print-version)
name="otags-$otags_version"
dir=$tmpdir/test-$name/$tag

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*"
tocopy=""

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

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 test 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