run_compilation_autotests.bash 1.95 KB
Newer Older
1
2
#!/bin/bash

gauthier's avatar
sync    
gauthier committed
3
4
if [ -s $OPENAIR_DIR/cmake_targets/tools/build_helper ] ; then
   source $OPENAIR_DIR/cmake_targets/tools/build_helper
5
6
7
8
9
else
   echo "Error: no file in the file tree: is OPENAIR_DIR variable set?"
   exit 1
fi

10
11
12
# include the jUnit-like logging functions
source $OPENAIR_DIR/cmake_targets/tools/test_helper

thomasl's avatar
thomasl committed
13
test_compile() {
14
    xUnit_start
thomasl's avatar
thomasl committed
15
16
17
    mkdir -p $tdir/$1/build
    cd $tdir/$1/build
    {
18
19
20
        cmake ..
        rm -f $3
        make -j4 $2
thomasl's avatar
thomasl committed
21
22
    } > $tdir/log/$1.txt 2>&1
    if [ -s $3 ] ; then
23
        cp $3 $tdir/bin/`basename $3`.$1
24
        echo_success "$1 $3 $5 compiled"
25
26
        xUnit_success "compilation" $1
    else
27
        echo_error "$1 $3 $5 compilation failed"
28
29
        xUnit_fail "compilation" $1
    fi
thomasl's avatar
thomasl committed
30
31
}

32
33
34
35
36
37
38
39
tdir=$OPENAIR_DIR/cmake_targets/autotests
mkdir -p $tdir/bin $tdir/log

updated=$(svn st -q $OPENAIR_DIR)
if [ "$updated" != "" ] ; then
	echo_warning "some files are not in svn: $updated"
fi

thomasl's avatar
thomasl committed
40
41
42
cd $tdir 

test_compile \
43
44
    test.0101 oaisim_nos1 \
    oaisim_nos1  $tdir/bin/oaisim.r8 rel8.nos1
thomasl's avatar
thomasl committed
45
46

test_compile \
47
48
    test.0102 oaisim_nos1 \
    oaisim_nos1  $tdir/bin/oaisim.r8.nas rel8.nos1.nas
thomasl's avatar
thomasl committed
49
50
51

test_compile \
    test.0103 lte-softmodem \
52
    lte-softmodem  $tdir/bin/lte-softmodem.r8.rf rel8.rf
thomasl's avatar
thomasl committed
53
54
55
56
57
58
59
60
61
62
63

test_compile \
    test.0104 dlsim \
    dlsim  $tdir/bin/dlsim

test_compile \
    test.0104 ulsim \
    ulsim  $tdir/bin/ulsim

test_compile \
    test.0106 oaisim \
64
    oaisim  $tdir/bin/oaisim.r8.itti rel8.itti
thomasl's avatar
thomasl committed
65
66

test_compile \
67
68
    test.0107 oaisim_nos1 \
    oaisim_nos1  $tdir/bin/oaisim.r10 rel10.nos1
thomasl's avatar
thomasl committed
69
70
71

test_compile \
    test.0108 oaisim \
72
    oaisim  $tdir/bin/oaisim.r10.itti rel10.itti
thomasl's avatar
thomasl committed
73
74
75

test_compile \
    test.0114 oaisim \
76
    oaisim  $tdir/bin/oaisim.r8.itti.ral rel8.itti.ral
thomasl's avatar
thomasl committed
77
78
79
80
81
82
83

test_compile \
    test.0115 oaisim \
    oaisim  $tdir/bin/oaisim.r10.itti.ral

test_compile \
    test.0120 nasmesh \
84
    CMakeFiles/nasmesh/nasmesh.ko $tdir/bin/nasmesh.ko 
85

86
87
# write the test results into a file
xUnit_write "$tdir/log/compilation_autotests.xml"