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

Lionel Gauthier's avatar
sync  
Lionel 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

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

26 27 28 29 30 31 32 33
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
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
cd $tdir 

test_compile \
    test.0101 oaisim \
    oaisim  $tdir/bin/oaisim.r8

test_compile \
    test.0102 oaisim \
    oaisim  $tdir/bin/oaisim.r8.nas

test_compile \
    test.0103 lte-softmodem \
    lte-softmodem  $tdir/bin/lte-softmodem.r8.rf

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

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

test_compile \
    test.0106 oaisim \
    oaisim  $tdir/bin/oaisim.r8.itti

test_compile \
    test.0107 oaisim \
    oaisim  $tdir/bin/oaisim.r10

test_compile \
    test.0108 oaisim \
    oaisim  $tdir/bin/oaisim.r10.itti

test_compile \
    test.0114 oaisim \
    oaisim  $tdir/bin/oaisim.r8.itti.ral

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

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