Commit 803d3f48 authored by Vivek Kumar Dutta's avatar Vivek Kumar Dutta

test: Validate schema update notification

parent 68c23cea
Pipeline #15041 failed with stages
in 8 minutes and 6 seconds
......@@ -5,20 +5,26 @@ pwd
source ./gitlab-ci/
# install required packages
exec_cmd apt update
exec_cmd apt install -y python3-pip
exec_cmd pip3 install pexpect
# install libbbf
cd /opt/dev
rm -rf bbf
exec_cmd git clone -b devel
cd /opt/dev/bbf
#exec_cmd git checkout a9dff9e62134c3b758afc243eee1da5ed8a0a439
echo "BBF Upstream Hash ${UPSTREAM_BBF_SHA}"
if [ -n "${UPSTREAM_BBF_SHA}" ]; then
exec_cmd git checkout ${UPSTREAM_BBF_SHA}
git log -1
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 ./configure --enable-tr181 --enable-tr104 --enable-tr143 CPPFLAGS=-DCUSTOM_PREFIX=\\\"X_IOPSYS_EU_\\\"
exec_cmd make
exec_cmd make install
import pexpect
import os
print("Running: Schema updater notification validation")
ret = 1
child = pexpect.spawn('ubus monitor')
# force change in schema, by removing dependency uci file
os.rename("/etc/config/users", "/etc/config/users_1")
ret = child.expect('notify', timeout=35)
print("FAIL: Schema updater notification")
if ret == 0:
ret = child.expect('schema_update_available')
print("FAIL: Schema updater notification")
# Revert back uci changes
os.rename("/etc/config/users_1", "/etc/config/users")
if ret == 0:
print("PASS: Schema updater notification")
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