Skip to content

Commit 6fe0fe1

Browse files
committed
[tempest] Fix special chars in TEMPESTCONF_OVERRIDES
Fix a regression introduced in PR #210 in which strings with special bash characters need to be escaped: cubswin:) has to be cubswin:\). The need to escape some characters breaks existing CI jobs. This patch fixes the regression so it's not necessary to escape special characters.
1 parent c19c44a commit 6fe0fe1

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

container-images/tcib/base/os/tempest/run_tempest.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,16 @@ function upload_extra_images {
288288
done
289289
}
290290

291+
292+
# This function ensures all arguments are handled properly:
293+
# - Embedded quotes are preserved, e.g. "Some string"
294+
# - Special bash characters don't need to be escaped, e.g. cubswin:)
295+
function discover_tempest_config {
296+
cat <<EOF | xargs discover-tempest-config
297+
$*
298+
EOF
299+
}
300+
291301
function run_git_tempest {
292302
mkdir -p $TEMPEST_EXTERNAL_PLUGIN_DIR
293303
pushd $TEMPEST_EXTERNAL_PLUGIN_DIR
@@ -318,7 +328,7 @@ function run_git_tempest {
318328
tempest init openshift
319329
pushd $TEMPEST_DIR
320330

321-
eval discover-tempest-config ${TEMPESTCONF_ARGS} ${TEMPESTCONF_OVERRIDES} \
331+
discover_tempest_config ${TEMPESTCONF_ARGS} ${TEMPESTCONF_OVERRIDES} \
322332
&& tempest run ${TEMPEST_ARGS}
323333
RETURN_VALUE=$?
324334

@@ -340,7 +350,7 @@ function run_rpm_tempest {
340350
# List Tempest packages
341351
rpm -qa | grep tempest
342352

343-
eval discover-tempest-config ${TEMPESTCONF_ARGS} ${TEMPESTCONF_OVERRIDES} \
353+
discover_tempest_config ${TEMPESTCONF_ARGS} ${TEMPESTCONF_OVERRIDES} \
344354
&& tempest run ${TEMPEST_ARGS}
345355
RETURN_VALUE=$?
346356

0 commit comments

Comments
 (0)