Add dependency for hexdump

hexdump is used in common function generate_hex_string which is
used by nova and heat.  The current general dependencies do not
have this dependency covered, instead it is usually pulled in by
other implicit dependencies when a full devstack is built. In
cases where only a subset is built (like just Heat and keystone)
hexdump is missing.

Added unit tests for the generate_hex_string function.

Depends-On: Ib47d802a31a0f4c2a49daa7e6698e37c70a2365a
Change-Id: I77c8c2019fb8b8174cdfaed3e56ebf728f0732b7
Closes-Bug: #1558672
(cherry picked from commit d99c29032b)
(cherry picked from commit 603fc0c6ec)
This commit is contained in:
Mark Vanderwiel 2016-03-17 12:19:16 -05:00 committed by Tony Breeds
parent 0591b1a6a3
commit 9edb50760a
4 changed files with 19 additions and 0 deletions

View File

@ -3,6 +3,7 @@ screen
unzip
wget
psmisc
bsdmainutils
gcc
g++
git

View File

@ -19,5 +19,6 @@ screen
tar
tcpdump
unzip
util-linux
wget
net-tools

View File

@ -19,6 +19,7 @@ screen
tar
tcpdump
unzip
util-linux
wget
which
bc

View File

@ -9,6 +9,22 @@ source $TOP/functions
source $TOP/tests/unittest.sh
echo "Testing generate_hex_string()"
VAL=$(generate_hex_string 16)
if [[ ${#VAL} -eq 32 ]]; then
passed "OK"
else
failed "generate_hex_string 16 failed ${#VAL}"
fi
VAL=$(generate_hex_string 32)
if [[ ${#VAL} -eq 64 ]]; then
passed "OK"
else
failed "generate_hex_string 32 failed ${#VAL}"
fi
echo "Testing die_if_not_set()"
bash -c "source $TOP/functions; X=`echo Y && true`; die_if_not_set $LINENO X 'not OK'"