From c4ae9cf6e1b1ff3c46699f596d22e60a8512e939 Mon Sep 17 00:00:00 2001 From: Ryota MIBU Date: Fri, 27 May 2016 15:54:28 +0900 Subject: [PATCH] test: respect 'CI_DEBUG' set by functest In current bash script for doctor test, '-x' option is enabled and all executing commands will be printed in the console. Functest has a configuration to enable/disable this '-x' option. It is environment variable 'CI_DEBUG'. This patch makes doctor test script to set '-x' option according to 'CI_DEBUG'. If it's not set, '-x' option will be enabled as it was enabled before this change. JIRA: FUNCTEST-212 Change-Id: I9fa5036aad7a0f5c88378337d946439a6ee6108c Signed-off-by: Ryota MIBU --- tests/run.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/run.sh b/tests/run.sh index 00dcabca..241d6898 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash -ex +#!/bin/bash -e ############################################################################## # Copyright (c) 2016 NEC Corporation and others. # @@ -8,6 +8,8 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +[[ "${CI_DEBUG:-true}" == "true" ]] && set -x + IMAGE_URL=https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img IMAGE_NAME=cirros IMAGE_FILE="${IMAGE_NAME}.img" -- 2.16.6