Merge pull request #141 from kboratynski/features/macosx_brew

Added brew as package manager.
This commit is contained in:
Michael Boelen 2016-03-24 10:48:03 +01:00
commit 30dae85a63
1 changed files with 26 additions and 0 deletions

View File

@ -32,6 +32,9 @@
# #
Display --indent 2 --text "- Searching package managers" Display --indent 2 --text "- Searching package managers"
#
#################################################################################
#
# Test : PKGS-7301 # Test : PKGS-7301
# Description : Query FreeBSD pkg # Description : Query FreeBSD pkg
if [ -x /usr/sbin/pkg ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi if [ -x /usr/sbin/pkg ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
@ -80,6 +83,29 @@
done done
Report "installed_packages=${N}" Report "installed_packages=${N}"
fi fi
#
#################################################################################
#
# Test : PKGS-7303
# Description : Query brew package manager
if [ `type -p brew` ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no PKGS-7303 --preqs-met ${PREQS_MET} --weight L --network NO --description "Query brew package manager"
if [ ${SKIPTEST} -eq 0 ]; then
Display --indent 4 --text "- Searching brew" --result FOUND --color GREEN
LogText "Result: Found brew"
Report "package_manager[]=brew"
LogText "Test: Querying brew to get package list"
Display --indent 4 --text "- Querying brew for installed packages"
LogText "Output:"; LogText "-----"
GPACKAGES=`brew list`
for J in ${GPACKAGES}; do
LogText "Found package ${J}"
INSTALLED_PACKAGES="${INSTALLED_PACKAGES}|${J}"
done
else
LogText "Result: brew can NOT be found on this system"
fi
# #
################################################################################# #################################################################################
# #