test(unit): Skip deb check if dpkg not installed 43/143/1
authorE. Scott Daniels <daniels@research.att.com>
Mon, 13 May 2019 15:06:46 +0000 (15:06 +0000)
committerE. Scott Daniels <daniels@research.att.com>
Mon, 13 May 2019 15:06:46 +0000 (15:06 +0000)
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 <daniels@research.att.com>
test/run_all_test.ksh

index d195d46..b0b790f 100644 (file)
@@ -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