From: E. Scott Daniels Date: Mon, 13 May 2019 15:06:46 +0000 (+0000) Subject: test(unit): Skip deb check if dpkg not installed X-Git-Tag: 1.0.31~19 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F43%2F143%2F1;p=ric-plt%2Flib%2Frmr.git test(unit): Skip deb check if dpkg not installed Some systems do not use dpkg and thus it might not be installed by default. The unit test will not verify the .deb file after creation if dpkg is not installed/supported by the underlying flavour of Linux. Change-Id: Ia28f43a09a88a4410bcbf94dd6704ea261ebbc07 Signed-off-by: E. Scott Daniels --- diff --git a/test/run_all_test.ksh b/test/run_all_test.ksh index d195d46..b0b790f 100644 --- a/test/run_all_test.ksh +++ b/test/run_all_test.ksh @@ -113,7 +113,13 @@ log_it "[INFO] validating .deb" set -e cd .build ls -al *.deb - dpkg -i *.deb + if whence dpkg >/dev/null 2>&1 + then + dpkg -i *.deb + else + log_it "[INFO] Deb installation check skipped. dpkg does not exist; trying make install" + make install + fi ) >/tmp/dpkg.log 2>&1 rc=$? err_cat $rc /tmp/dpkg.log