Commit 76d8564e authored by Vivek Kumar Dutta's avatar Vivek Kumar Dutta Committed by Omar Kallel
Browse files

test: Run dependent services before unit test

parent 3319ac91
Pipeline #11817 passed with stages
in 2 minutes and 50 seconds
...@@ -16,9 +16,10 @@ run_unit_test: ...@@ -16,9 +16,10 @@ run_unit_test:
allow_failure: false allow_failure: false
script: script:
- "./gitlab-ci/" - "./gitlab-ci/"
- "./gitlab-ci/"
- "./gitlab-ci/" - "./gitlab-ci/"
artifacts: artifacts:
when: always when: always
paths: paths:
- timestamp.log - timestamp.log
- unit-test-coverage.xml - unit-test-coverage.xml
\ No newline at end of file
...@@ -5,46 +5,13 @@ pwd ...@@ -5,46 +5,13 @@ pwd
source ./gitlab-ci/ source ./gitlab-ci/
# install libbbf
cd /opt/dev
rm -rf bbf
exec_cmd git clone -b devel
cd /opt/dev/bbf
#exec_cmd git checkout a9dff9e62134c3b758afc243eee1da5ed8a0a439
if [ -n "${UPSTREAM_BBF_SHA}" ]; then
exec_cmd git checkout ${UPSTREAM_BBF_SHA}
echo "Compiling bbf"
exec_cmd autoreconf -i
exec_cmd ./configure --enable-tr181 --enable-tr104 --enable-tr143 --enable-tr157 CPPFLAGS=-DCUSTOM_PREFIX=\\\"X_IOPSYS_EU_\\\"
exec_cmd make
exec_cmd make install
# configure libbbf
mkdir -p /etc/bbfdm/
mkdir -p /etc/bbfdm/json
echo "" > /etc/bbfdm/dmmap
mkdir -p /usr/share/bbfdm
cp -rf scripts/functions /usr/share/bbfdm
mkdir -p /usr/lib/bbfdm
mkdir -p /etc/icwmpd
# install uspd # install uspd
cd /opt/dev cd /opt/dev
rm -rf uspd rm -rf uspd
exec_cmd git clone -b devel exec_cmd git clone -b devel
cd /opt/dev/uspd cd /opt/dev/uspd
#exec_cmd git checkout a9dff9e62134c3b758afc243eee1da5ed8a0a439 exec_cmd ./gitlab-ci/
exec_cmd ./gitlab-ci/
exec_cmd git checkout devel
exec_cmd make exec_cmd make
cp uspd /usr/sbin/uspd exec_cmd cp uspd /usr/sbin/uspd
mkdir -p /etc/config
mkdir -p /etc/init.d
cp test/uspd/uspd.config /etc/config/uspd
cp test/uspd/uspd.init /etc/init.d/uspd
/etc/init.d/uspd start
\ No newline at end of file
command=/bin/bash -c "/usr/sbin/ubusd"
command=/bin/bash -c "/usr/sbin/rpcd"
command=/bin/bash -c "/usr/sbin/uspd"
echo "preparation script"
cp ./gitlab-ci/iopsys-supervisord.conf /etc/supervisor/conf.d/
...@@ -7,14 +7,25 @@ source ./gitlab-ci/ ...@@ -7,14 +7,25 @@ source ./gitlab-ci/
trap cleanup EXIT trap cleanup EXIT
trap cleanup SIGINT trap cleanup SIGINT
echo "Running the unit test cases" echo "Compiling icmwp"
autoreconf -i autoreconf -i
./configure --enable-acs=multi --enable-acs=hdm ./configure --enable-acs=multi --enable-acs=hdm
make clean make clean
make make
check_ret $? check_ret $?
echo "Starting dependent services"
supervisorctl status
ubus -t 2 wait_for usp.raw uci
if [ "$?" -ne 0 ]; then
supervisorctl restart all
ubus -t 10 wait_for usp.raw uci
supervisorctl status
echo "Running the unit test cases"
#report part #report part
#GitLab-CI output #GitLab-CI output
gcovr -r . gcovr -r .
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