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

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:
allow_failure: false
script:
- "./gitlab-ci/install-dependencies.sh"
- "./gitlab-ci/setup.sh"
- "./gitlab-ci/unit-test.sh"
artifacts:
when: always
paths:
- timestamp.log
- unit-test-coverage.xml
\ No newline at end of file
- unit-test-coverage.xml
......@@ -5,46 +5,13 @@ pwd
source ./gitlab-ci/shared.sh
# install libbbf
cd /opt/dev
rm -rf bbf
exec_cmd git clone -b devel https://dev.iopsys.eu/iopsys/bbf.git
cd /opt/dev/bbf
#exec_cmd git checkout a9dff9e62134c3b758afc243eee1da5ed8a0a439
if [ -n "${UPSTREAM_BBF_SHA}" ]; then
exec_cmd git checkout ${UPSTREAM_BBF_SHA}
fi
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
ldconfig
# 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
cd /opt/dev
rm -rf uspd
exec_cmd git clone -b devel https://dev.iopsys.eu/iopsys/uspd.git
cd /opt/dev/uspd
#exec_cmd git checkout a9dff9e62134c3b758afc243eee1da5ed8a0a439
exec_cmd git checkout devel
exec_cmd ./gitlab-ci/install-dependencies.sh
exec_cmd ./gitlab-ci/setup.sh
exec_cmd make
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
ldconfig
\ No newline at end of file
exec_cmd cp uspd /usr/sbin/uspd
[program:ubusd]
command=/bin/bash -c "/usr/sbin/ubusd"
[program:rpcd]
command=/bin/bash -c "/usr/sbin/rpcd"
[program:uspd]
command=/bin/bash -c "/usr/sbin/uspd"
#!/bin/bash
echo "preparation script"
pwd
cp ./gitlab-ci/iopsys-supervisord.conf /etc/supervisor/conf.d/
......@@ -7,14 +7,25 @@ source ./gitlab-ci/shared.sh
trap cleanup EXIT
trap cleanup SIGINT
echo "Running the unit test cases"
echo "Compiling icmwp"
autoreconf -i
./configure --enable-acs=multi --enable-acs=hdm
make clean
make
./bin/unit_test
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
fi
echo "Running the unit test cases"
./bin/unit_test
#report part
#GitLab-CI output
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