@@ -208,9 +208,9 @@ function get_repo_id() {
208208 local product=$2
209209 local repo=$3
210210 local tmp=" $( mktemp ) "
211- h_out " --output yaml repository info --organization '$organization ' --product '$product ' --name '$repo '" > $tmp
212- grep ' ^I[Dd]:' $tmp | cut -d ' ' -f 2
213- rm -f $tmp
211+ h_out " --output yaml repository info --organization '$organization ' --product '$product ' --name '$repo '" > " $tmp "
212+ grep ' ^I[Dd]:' " $tmp " | cut -d ' ' -f 2
213+ rm -f " $tmp "
214214}
215215
216216function status_data_create() {
@@ -236,8 +236,8 @@ function status_data_create() {
236236 # Load variables
237237 sd_section=" ${SECTION:- default} "
238238 sd_cli=$1
239- sd_log=$2
240- sd_name=" $( basename $sd_log .log ) " # derive testcase name from log name which is descriptive
239+ sd_log=" $2 "
240+ sd_name=" $( basename " $sd_log " .log ) " # derive testcase name from log name which is descriptive
241241 sd_rc=$3
242242 sd_start=" $( date -u -Iseconds -d @$4 ) "
243243 sd_end=" $( date -u -Iseconds -d @$5 ) "
@@ -295,7 +295,7 @@ function status_data_create() {
295295 " parameters.version-y-stream=$sd_sat_ver_y " \
296296 " parameters.run=$sd_run " \
297297 " parameters.hostname=$sd_hostname " \
298- " results.log=$sd_log " \
298+ " results.log=' $sd_log ' " \
299299 " results.rc=$sd_rc " \
300300 " results.duration=$sd_duration " \
301301 " results.jenkins.build_url=${BUILD_URL:- NA} " \
@@ -335,7 +335,7 @@ function status_data_create() {
335335 set -x
336336 pass_or_fail.py \
337337 --config $PARAM_investigator_config \
338- --current-file " $sd_file " 2>&1 | tee $sd_result_log
338+ --current-file " $sd_file " 2>&1 | tee " $sd_result_log "
339339 pof_rc=$?
340340 set +x
341341 set -e
@@ -377,9 +377,9 @@ function status_data_create() {
377377 --arg release $sd_sat_release \
378378 --arg version $sd_sat_ver \
379379 --arg date $sd_start \
380- --arg link $sd_link \
380+ --arg link " $sd_link " \
381381 --arg result_id $sd_run \
382- --arg test $sd_name \
382+ --arg test " $sd_name " \
383383 --arg result $sd_result \
384384 ' {
385385 "group": "Core Platforms",
@@ -406,32 +406,32 @@ function status_data_create() {
406406
407407 # Enhance log file
408408 tmp=" $( mktemp ) "
409- echo " command: $sd_cli " >> $tmp
410- echo " satellite version: $sd_sat_rpm " >> $tmp
411- echo " katello version: $sd_kat_rpm " >> $tmp
412- echo " hostname: $sd_hostname " >> $tmp
409+ echo " command: $sd_cli " >> " $tmp "
410+ echo " satellite version: $sd_sat_rpm " >> " $tmp "
411+ echo " katello version: $sd_kat_rpm " >> " $tmp "
412+ echo " hostname: $sd_hostname " >> " $tmp "
413413 if [[ " $sd_result " != ' ERROR' ]]; then
414- echo ' result determination log:' >> $tmp
415- cat $sd_result_log >> $tmp
414+ echo ' result determination log:' >> " $tmp "
415+ cat " $sd_result_log " >> " $tmp "
416416 fi
417- echo >> $tmp
418- cat $sd_log >> $tmp
417+ echo >> " $tmp "
418+ cat " $sd_log " >> " $tmp "
419419
420420 # Create junit.xml file
421- junit_cli.py --file $logs /junit.xml add \
421+ junit_cli.py --file " $logs /junit.xml" add \
422422 --suite $sd_section \
423- --name $sd_name \
423+ --name " $sd_name " \
424424 --result $sd_result \
425- --out $tmp \
425+ --out " $tmp " \
426426 --start $sd_start \
427427 --end $sd_end
428- rm -f $sd_result_log $tmp
428+ rm -f " $sd_result_log " " $tmp "
429429
430430 # Deactivate tools virtualenv
431431 deactivate
432432
433433 set +x
434- ) & > $debug_log
434+ ) & > " $debug_log "
435435}
436436
437437function junit_upload() {
@@ -460,8 +460,8 @@ function junit_upload() {
460460 launch_name=" $( echo $launch_name | sed ' s/[^a-zA-Z0-9._-]/_/g' ) "
461461
462462 # Show content and upload to ReportPortal
463- junit_cli.py --file $logs /junit.xml print
464- junit_cli.py --file $logs /junit.xml upload \
463+ junit_cli.py --file " $logs /junit.xml" print
464+ junit_cli.py --file " $logs /junit.xml" upload \
465465 --host $PARAM_reportportal_host \
466466 --project $PARAM_reportportal_project \
467467 --token $PARAM_reportportal_token \
@@ -500,7 +500,7 @@ function _format_opts() {
500500
501501function c() {
502502 local out=" $logs /$1 " ; shift
503- mkdir -p $( dirname $out )
503+ mkdir -p " $( dirname $out ) "
504504 local start=" $( date -u +%s ) "
505505 log " Start '$* ' with log in $out "
506506 if $run_lib_dryrun ; then
@@ -526,7 +526,7 @@ function c() {
526526
527527function a() {
528528 local out=$logs /$1 ; shift
529- mkdir -p $( dirname $out )
529+ mkdir -p " $( dirname $out ) "
530530 local start=" $( date -u +%s ) "
531531 log " Start 'ansible $opts_adhoc $* ' with log in $out "
532532 if $run_lib_dryrun ; then
@@ -561,7 +561,7 @@ function a_out() {
561561
562562function ap() {
563563 local out=$logs /$1 ; shift
564- mkdir -p $( dirname $out )
564+ mkdir -p " $( dirname $out ) "
565565 local start=" $( date -u +%s ) "
566566 log " Start 'ansible-playbook $opts_adhoc $* ' with log in $out "
567567 if $run_lib_dryrun ; then
0 commit comments