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
This commit is contained in:
Mark Vanderwiel 2016-03-17 12:19:16 -05:00 committed by Ian Wienand
parent 0a2a7ae847
commit d99c29032b
4 changed files with 19 additions and 0 deletions

View File

@ -1,5 +1,6 @@
bc bc
bridge-utils bridge-utils
bsdmainutils
curl curl
g++ g++
gcc gcc

View File

@ -25,5 +25,6 @@ screen
tar tar
tcpdump tcpdump
unzip unzip
util-linux
wget wget
zlib-devel zlib-devel

View File

@ -30,6 +30,7 @@ screen
tar tar
tcpdump tcpdump
unzip unzip
util-linux
wget wget
which which
zlib-devel zlib-devel

View File

@ -9,6 +9,22 @@ source $TOP/functions
source $TOP/tests/unittest.sh 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()" echo "Testing die_if_not_set()"
bash -c "source $TOP/functions; X=`echo Y && true`; die_if_not_set $LINENO X 'not OK'" bash -c "source $TOP/functions; X=`echo Y && true`; die_if_not_set $LINENO X 'not OK'"