From d99c29032bb0cc89ffe6874c7b879b84897ff0b0 Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Thu, 17 Mar 2016 12:19:16 -0500 Subject: [PATCH] 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 --- files/debs/general | 1 + files/rpms-suse/general | 1 + files/rpms/general | 1 + tests/test_functions.sh | 16 ++++++++++++++++ 4 files changed, 19 insertions(+) diff --git a/files/debs/general b/files/debs/general index 307cd7b113..a1f2a4b159 100644 --- a/files/debs/general +++ b/files/debs/general @@ -1,5 +1,6 @@ bc bridge-utils +bsdmainutils curl g++ gcc diff --git a/files/rpms-suse/general b/files/rpms-suse/general index e3dfec1047..3b19071770 100644 --- a/files/rpms-suse/general +++ b/files/rpms-suse/general @@ -25,5 +25,6 @@ screen tar tcpdump unzip +util-linux wget zlib-devel diff --git a/files/rpms/general b/files/rpms/general index 6d5fd1565c..2d4a97a743 100644 --- a/files/rpms/general +++ b/files/rpms/general @@ -30,6 +30,7 @@ screen tar tcpdump unzip +util-linux wget which zlib-devel diff --git a/tests/test_functions.sh b/tests/test_functions.sh index be8dc5e287..8aae23dcb8 100755 --- a/tests/test_functions.sh +++ b/tests/test_functions.sh @@ -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'"