debian-repo-install-test: UNKNOWN in --version?

With this patch, the debian-repo-install-test script checks if
the Osmocom programs as installed from the Debian repository have
"UNKNOWN" in their --version output.

Relates: OS#3555
Change-Id: I46f18dc86d3e257c772a6db8539027aad26e24a8
This commit is contained in:
Oliver Smith 2018-09-20 16:04:33 +02:00
parent 8b5ad120bb
commit 643de5ed2e
1 changed files with 36 additions and 13 deletions

View File

@ -44,25 +44,48 @@ install_repo_packages() {
apt install -y $(cat /data/osmocom_packages.txt)
}
test_binaries_version() {
# Make sure --version runs and does not output UNKNOWN
failed=""
for program in $@; do
# Make sure it runs at all
$program --version
# Check for UNKNOWN
if $program --version | grep -q UNKNOWN; then
failed="$failed $program"
echo "ERROR: this program prints UNKNOWN in --version!"
fi
done
if [ -n "$failed" ]; then
echo "ERROR: the following program(s) print UNKNOWN in --version:"
echo "$failed"
return 1
fi
}
test_binaries() {
# Make sure the binaries are not broken (run -h or --version)
osmo-bsc --version
osmo-bts-trx --version
osmo-bts-virtual --version
osmo-gbproxy --version
osmo-ggsn --version
osmo-gtphub -h
osmo-hlr --version
osmo-hlr-db-tool --version
osmo-hnbgw --version
osmo-mgw --version
osmo-msc --version
osmo-pcu --version
osmo-sgsn --version
osmo-sip-connector -h
osmo-stp --version
osmo-trx-uhd -h
osmo-trx-usrp1 -h
test_binaries_version \
osmo-bsc \
osmo-bts-trx \
osmo-bts-virtual \
osmo-gbproxy \
osmo-ggsn \
osmo-hlr \
osmo-hlr-db-tool \
osmo-hnbgw \
osmo-mgw \
osmo-msc \
osmo-pcu \
osmo-sgsn \
osmo-stp
}
finish() {