From 6d3e334fe1980c1a3581f3d8fd26d7ec7e8d60f7 Mon Sep 17 00:00:00 2001 From: "E. Scott Daniels" Date: Mon, 13 May 2019 15:06:46 +0000 Subject: [PATCH] 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 --- test/run_all_test.ksh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.16.6