From 4b70a096360f3983f76d26660b74ba234ce0556c Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 7 Oct 2016 14:09:40 -0700 Subject: [PATCH] Make sure the d-g hooks end up in reproduce.sh Currently we don't have any handling for devstack-gate hooks in the reproduce.sh script so jobs that rely on them don't generate accurate reproduce.sh scripts. Fix this by explicitly adding each of the three hooks to the reproduce.sh script if they are defined. Change-Id: Iae6191dfc2dab81e7ca172762728ede2946f5f62 --- functions.sh | 5 +++++ test-functions.sh | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/functions.sh b/functions.sh index 7b3077f5..72ef1bbe 100644 --- a/functions.sh +++ b/functions.sh @@ -203,6 +203,11 @@ EOF if [ -n "$JOB_PROJECTS" ] ; then echo "declare -x PROJECTS=\"$JOB_PROJECTS\"" >> $WORKSPACE/logs/reproduce.sh fi + for fun in pre_test_hook gate_hook post_test_hook ; do + if function_exists $fun ; then + declare -fp $fun >> $WORKSPACE/logs/reproduce.sh + fi + done cat >> $WORKSPACE/logs/reproduce.sh <