Skip to content
Snippets Groups Projects
Commit 855fb119 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

#9621: Update jenkins script to launch functional tests

parent 318349bd
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,9 @@ BUILD=
CODE_ANALYSIS=0
DOXYGEN=0
CONFIGDIR=~/.config
SFLCONFDIR=${CONFIGDIR}/sflphone
function run_code_analysis {
# Check if cppcheck is installed on the system
if [ `which cppcheck &>/dev/null ; echo $?` -ne 1 ] ; then
......@@ -19,6 +22,7 @@ function run_code_analysis {
fi
}
function gen_doxygen {
# Check if doxygen is installed on the system
if [ `which doxygen &>/dev/null ; echo $?` -ne 1 ] ; then
......@@ -28,6 +32,58 @@ function gen_doxygen {
fi
}
function launch_unit_test_daemon {
# Run the unit tests for the daemon
pushd daemon/test
# Remove the previous XML test file
rm -rf $XML_RESULTS
./run_tests.sh || exit 1
popd
}
function launch_functional_test_daemon {
# Run the python functional tests for the daemon
# make sure no other instance are currently running
killall sflphoned
killall sipp
# make sure the configuration directory created
CONFDIR=~/.config
SFLCONFDIR=${CONFDIR}/sflphone
eval `dbus-launch --auto-syntax`
if [ ! -d ${CONFDIR} ]; then
mkdir ${CONFDIR}
fi
if [ ! -d ${SFLCONFDIR} ]; then
mkdir ${SFLCONFDIR}
fi
# make sure the most recent version of the configuration
# is installed
pushd tools/pysflphone
cp -f sflphoned.functest.yml ${SFLCONFDIR}
popd
# launch sflphone daemon, wait some time for
# dbus registration to complete
pushd daemon
./src/sflphoned &
sleep 3
popd
# launch the test script
pushd tools/pysflphone
nosetests --with-xunit test_sflphone_dbus_interface.py
popd
}
function build_daemon {
# Compile the daemon
pushd daemon
......@@ -55,15 +111,6 @@ function build_daemon {
# Compile unit tests
make check
popd
if [ $TEST == 1 ]; then
# Run the unit tests for the daemon
pushd daemon/test
# Remove the previous XML test file
rm -rf $XML_RESULTS
./run_tests.sh || exit 1
popd
fi
}
function build_gnome {
......@@ -128,5 +175,10 @@ done
# Call appropriate build function, with parameters if needed
build_$BUILD
if [ $TEST == 1 ]; then
# launch_unit_test_daemon
launch_functional_test_daemon
fi
# SUCCESS
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment