Commit 3e096829 authored by thomasl's avatar thomasl

re-organize cmake directory, add autotests replacing the python ones: compilation only for now

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6768 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 7a17f5a5
...@@ -169,7 +169,7 @@ endif (${RTAI}) ...@@ -169,7 +169,7 @@ endif (${RTAI})
# (so creating new asn.1 objects instead of modifying the object attributes) # (so creating new asn.1 objects instead of modifying the object attributes)
# New C code source file, cmake must be re-run (instead of re-running make only) # New C code source file, cmake must be re-run (instead of re-running make only)
############# #############
set(asn1c_call "${OPENAIR_CMAKE}/generate_asn1.bash") set(asn1c_call "${OPENAIR_CMAKE}/tools/generate_asn1.bash")
set(asn1_generated_dir ${OPENAIR_BIN_DIR}) set(asn1_generated_dir ${OPENAIR_BIN_DIR})
# RRC # RRC
...@@ -1279,7 +1279,7 @@ function(make_driver name dir) ...@@ -1279,7 +1279,7 @@ function(make_driver name dir)
string(REGEX REPLACE "c *$" "o" obj ${f}) string(REGEX REPLACE "c *$" "o" obj ${f})
set(objs "${objs} ${obj}") set(objs "${objs} ${obj}")
endforeach() endforeach()
CONFIGURE_FILE(${OPENAIR_CMAKE}/Kbuild.cmake ${OPENAIR_BIN_DIR}/${name}/Kbuild) CONFIGURE_FILE(${OPENAIR_CMAKE}/tools/Kbuild.cmake ${OPENAIR_BIN_DIR}/${name}/Kbuild)
add_custom_command(OUTPUT ${name}.ko add_custom_command(OUTPUT ${name}.ko
COMMAND make -C ${module_build_path} M=${OPENAIR_BIN_DIR}/${name} COMMAND make -C ${module_build_path} M=${OPENAIR_BIN_DIR}/${name}
WORKING_DIRECTORY ${OPENAIR_BIN_DIR}/${name} WORKING_DIRECTORY ${OPENAIR_BIN_DIR}/${name}
......
#!/bin/bash
if [ -s $OPENAIR_DIR/cmake_targets/build_helper.bash ] ; then
source $OPENAIR_DIR/cmake_targets/build_helper.bash
else
echo "Error: no file in the file tree: is OPENAIR_DIR variable set?"
exit 1
fi
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
compilations \
autotests/test.0101 oaisim \
oaisim $tdir/bin/oaisim.r8 \
$tdir/log/test0101.txt \
"test 0101:oaisim Rel8 passed" \
"test 0101:oaisim Rel8 failed"
compilations \
autotests/test.0102 oaisim \
oaisim $tdir/bin/oaisim.r8.nas \
$tdir/log/test0102.oaisim.txt \
"test 0102:oaisim Rel8 nas passed" \
"test 0102:oaisim Rel8 nas failed"
compilations \
autotests/test.0103 oaisim \
oaisim $tdir/bin/oaisim.r8.rf \
$tdir/log/test0103.txt \
"test 0103:oaisim rel8 rf passed" \
"test 0103:oaisim rel8 rf failed"
compilations \
autotests/test.0104 dlsim \
dlsim $tdir/bin/dlsim \
$tdir/log/test0104.txt \
"test 0104:dlsim passed" \
"test 0104:dlsim failed"
compilations \
autotests/test.0104 ulsim \
ulsim $tdir/bin/ulsim \
$tdir/log/test0105.txt \
"test 0105: ulsim passed" \
"test 0105: ulsim failed"
compilations \
autotests/test.0106 oaisim \
oaisim $tdir/bin/oaisim.r8.itti \
$tdir/log/test0106.txt \
"test 0103:oaisim rel8 itti passed" \
"test 0103:oaisim rel8 itti failed"
compilations \
autotests/test.0107 oaisim \
oaisim $tdir/bin/oaisim.r10 \
$tdir/log/test0107.txt \
"test 0103:oaisim rel10 passed" \
"test 0103:oaisim rel10 failed"
compilations \
autotests/test.0108 oaisim \
oaisim $tdir/bin/oaisim.r10.itti \
$tdir/log/test0108.txt \
"test 0108:oaisim rel10 itti passed" \
"test 0108:oaisim rel10 itti failed"
compilations \
autotests/test.0114 oaisim \
oaisim $tdir/bin/oaisim.r8.itti.ral \
$tdir/log/test0114.txt \
"test 0114:oaisim rel8 itti ral passed" \
"test 0114:oaisim rel8 itti ral failed"
compilations \
autotests/test.0115 oaisim \
oaisim $tdir/bin/oaisim.r10.itti.ral \
$tdir/log/test0115.txt \
"test 0114:oaisim rel10 itti ral passed" \
"test 0114:oaisim rel10 itti ral failed"
compilations \
autotests/test.0102 nasmesh \
CMakeFiles/nasmesh/nasmesh.ko $tdir/bin/nasmesh.ko \
$tdir/log/test0120.txt \
"test 0120: nasmesh.ko passed" \
"test 0120: nasmesk.ko failed"
...@@ -72,4 +72,4 @@ set(USER_MODE True) ...@@ -72,4 +72,4 @@ set(USER_MODE True)
set(XER_PRINT True) set(XER_PRINT True)
set(XFORMS False) set(XFORMS False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
...@@ -72,4 +72,4 @@ set(USER_MODE True) ...@@ -72,4 +72,4 @@ set(USER_MODE True)
set(XER_PRINT True) set(XER_PRINT True)
set(XFORMS False) set(XFORMS False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
...@@ -69,4 +69,4 @@ set(USER_MODE True) ...@@ -69,4 +69,4 @@ set(USER_MODE True)
set(XER_PRINT True) set(XER_PRINT True)
set(XFORMS False) set(XFORMS False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
...@@ -10,4 +10,4 @@ set(RANDOM_BF False) ...@@ -10,4 +10,4 @@ set(RANDOM_BF False)
set(PBS_SIM False) set(PBS_SIM False)
set(PERFECT_CE True) set(PERFECT_CE True)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
...@@ -72,4 +72,4 @@ set(USER_MODE True) ...@@ -72,4 +72,4 @@ set(USER_MODE True)
set(XER_PRINT False) set(XER_PRINT False)
set(XFORMS False) set(XFORMS False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
...@@ -72,4 +72,4 @@ set(USER_MODE True) ...@@ -72,4 +72,4 @@ set(USER_MODE True)
set(XER_PRINT True) set(XER_PRINT True)
set(XFORMS False) set(XFORMS False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
...@@ -72,4 +72,4 @@ set(USER_MODE True) ...@@ -72,4 +72,4 @@ set(USER_MODE True)
set(XER_PRINT False) set(XER_PRINT False)
set(XFORMS False) set(XFORMS False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
...@@ -2,4 +2,4 @@ cmake_minimum_required(VERSION 2.8) ...@@ -2,4 +2,4 @@ cmake_minimum_required(VERSION 2.8)
set(OAI_NW_DRIVER_TYPE_ETHERNET True) set(OAI_NW_DRIVER_TYPE_ETHERNET True)
set(OAI_NW_DRIVER_USE_NETLINK True) set(OAI_NW_DRIVER_USE_NETLINK True)
set(NAS_NETLINK True) set(NAS_NETLINK True)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
...@@ -72,4 +72,4 @@ set(USER_MODE True) ...@@ -72,4 +72,4 @@ set(USER_MODE True)
set(XER_PRINT False) set(XER_PRINT False)
set(XFORMS False) set(XFORMS False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
...@@ -72,4 +72,4 @@ set(USER_MODE True) ...@@ -72,4 +72,4 @@ set(USER_MODE True)
set(XER_PRINT False) set(XER_PRINT False)
set(XFORMS False) set(XFORMS False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
...@@ -31,8 +31,6 @@ ...@@ -31,8 +31,6 @@
# author Laurent Thomas # author Laurent Thomas
# #
####################################### #######################################
mkdir -p $OPENAIR_DIR/cmake_targets/tests/bin
mkdir -p $OPENAIR_DIR/cmake_targets/tests/log
SUDO=sudo SUDO=sudo
compilations() { compilations() {
...@@ -53,6 +51,87 @@ compilations() { ...@@ -53,6 +51,87 @@ compilations() {
fi fi
} }
run_tests() {
$1 > $2 2>&1
grep
}
run_compilation_autotests() {
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
compilations \
test.0101 oaisim \
oaisim $tdir/bin/oaisim.r8 \
$tdir/log/test0101.txt \
"test 0101:oaisim Rel8 passed" \
"test 0101:oaisim Rel8 failed"
compilations \
test.0102 oaisim \
oaisim $tdir/bin/oaisim.r8.nas \
$tdir/log/test0102.oaisim.txt \
"test 0102:oaisim Rel8 nas passed" \
"test 0102:oaisim Rel8 nas failed"
compilations \
test.0103 oaisim \
oaisim $tdir/bin/oaisim.r8.rf \
$tdir/log/test0103.txt \
"test 0103:oaisim rel8 rf passed" \
"test 0103:oaisim rel8 rf failed"
compilations \
test.0104 dlsim \
dlsim $tdir/bin/dlsim \
$tdir/log/test0104.txt \
"test 0104:dlsim passed" \
"test 0104:dlsim failed"
compilations \
test.0104 ulsim \
ulsim $tdir/bin/ulsim \
$tdir/log/test0105.txt \
"test 0105: ulsim passed" \
"test 0105: ulsim failed"
compilations \
test.0106 oaisim \
oaisim $tdir/bin/oaisim.r8.itti \
$tdir/log/test0106.txt \
"test 0103:oaisim rel8 itti passed" \
"test 0103:oaisim rel8 itti failed"
compilations \
test.0107 oaisim \
oaisim $tdir/bin/oaisim.r10 \
$tdir/log/test0107.txt \
"test 0103:oaisim rel10 passed" \
"test 0103:oaisim rel10 failed"
compilations \
test.0108 oaisim \
oaisim $tdir/bin/oaisim.r10.itti \
$tdir/log/test0108.txt \
"test 0108:oaisim rel10 itti passed" \
"test 0108:oaisim rel10 itti failed"
compilations \
test.0114 oaisim \
oaisim $tdir/bin/oaisim.r8.itti.ral \
$tdir/log/test0114.txt \
"test 0114:oaisim rel8 itti ral passed" \
"test 0114:oaisim rel8 itti ral failed"
compilations \
test.0115 oaisim \
oaisim $tdir/bin/oaisim.r10.itti.ral \
$tdir/log/test0115.txt \
"test 0114:oaisim rel10 itti ral passed" \
"test 0114:oaisim rel10 itti ral failed"
compilations \
test.0102 nasmesh \
CMakeFiles/nasmesh/nasmesh.ko $tdir/bin/nasmesh.ko \
$tdir/log/test0120.txt \
"test 0120: nasmesh.ko passed" \
"test 0120: nasmesk.ko failed"
}
make_certs(){ make_certs(){
# for certtificate generation # for certtificate generation
......
...@@ -278,22 +278,7 @@ fi ...@@ -278,22 +278,7 @@ fi
##################### #####################
if [ "$OAI_TEST" = "1" ]; then if [ "$OAI_TEST" = "1" ]; then
echo_info "10. Running OAI pre commit tests (pre-ci) ..." echo_info "10. Running OAI pre commit tests (pre-ci) ..."
updated=$(svn st -q $OPENAIR_DIR) $OPENAIR_DIR/cmake_targets/autotests/run_compilation_autotests.bash
if [ "$updated" != "" ] ; then
echo_warning "some files are not in svn: $updated"
fi
mkdir -p $dbin.test
compilations \
test.0101 oaisim \
oaisim $dbin.test/oaisim.r8 \
$dlog/oaisim.r8.test0101.txt \
"test 0101:oaisim passed" \
"test 0101:oaisim failed"
compilations test.0102 nasmesh \
CMakeFiles/nasmesh/nasmesh.ko $dbin/test/nasmesh.ko \
$dlog/nasmesh.test0102.txt \
"test 0102: nasmesh.ko passed" \
"test 0102: nasmesk.ko failed"
else else
echo_info "10. Bypassing the Tests ..." echo_info "10. Bypassing the Tests ..."
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment