@@ -208,9 +208,9 @@ function get_repo_id() {
208
208
local product=$2
209
209
local repo=$3
210
210
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 "
214
214
}
215
215
216
216
function status_data_create() {
@@ -236,8 +236,8 @@ function status_data_create() {
236
236
# Load variables
237
237
sd_section=" ${SECTION:- default} "
238
238
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
241
241
sd_rc=$3
242
242
sd_start=" $( date -u -Iseconds -d @$4 ) "
243
243
sd_end=" $( date -u -Iseconds -d @$5 ) "
@@ -295,7 +295,7 @@ function status_data_create() {
295
295
" parameters.version-y-stream=$sd_sat_ver_y " \
296
296
" parameters.run=$sd_run " \
297
297
" parameters.hostname=$sd_hostname " \
298
- " results.log=$sd_log " \
298
+ " results.log=' $sd_log ' " \
299
299
" results.rc=$sd_rc " \
300
300
" results.duration=$sd_duration " \
301
301
" results.jenkins.build_url=${BUILD_URL:- NA} " \
@@ -335,7 +335,7 @@ function status_data_create() {
335
335
set -x
336
336
pass_or_fail.py \
337
337
--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 "
339
339
pof_rc=$?
340
340
set +x
341
341
set -e
@@ -379,7 +379,7 @@ function status_data_create() {
379
379
--arg date $sd_start \
380
380
--arg link $sd_link \
381
381
--arg result_id $sd_run \
382
- --arg test $sd_name \
382
+ --arg test " $sd_name " \
383
383
--arg result $sd_result \
384
384
' {
385
385
"group": "Core Platforms",
@@ -406,32 +406,32 @@ function status_data_create() {
406
406
407
407
# Enhance log file
408
408
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 "
413
413
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 "
416
416
fi
417
- echo >> $tmp
418
- cat $sd_log >> $tmp
417
+ echo >> " $tmp "
418
+ cat " $sd_log " >> " $tmp "
419
419
420
420
# Create junit.xml file
421
- junit_cli.py --file $logs /junit.xml add \
421
+ junit_cli.py --file " $logs /junit.xml" add \
422
422
--suite $sd_section \
423
- --name $sd_name \
423
+ --name " $sd_name " \
424
424
--result $sd_result \
425
- --out $tmp \
425
+ --out " $tmp " \
426
426
--start $sd_start \
427
427
--end $sd_end
428
- rm -f $sd_result_log $tmp
428
+ rm -f " $sd_result_log " " $tmp "
429
429
430
430
# Deactivate tools virtualenv
431
431
deactivate
432
432
433
433
set +x
434
- ) & > $debug_log
434
+ ) & > " $debug_log "
435
435
}
436
436
437
437
function junit_upload() {
@@ -460,8 +460,8 @@ function junit_upload() {
460
460
launch_name=" $( echo $launch_name | sed ' s/[^a-zA-Z0-9._-]/_/g' ) "
461
461
462
462
# 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 \
465
465
--host $PARAM_reportportal_host \
466
466
--project $PARAM_reportportal_project \
467
467
--token $PARAM_reportportal_token \
@@ -500,7 +500,7 @@ function _format_opts() {
500
500
501
501
function c() {
502
502
local out=" $logs /$1 " ; shift
503
- mkdir -p $( dirname $out )
503
+ mkdir -p " $( dirname $out ) "
504
504
local start=" $( date -u +%s ) "
505
505
log " Start '$* ' with log in $out "
506
506
if $run_lib_dryrun ; then
@@ -526,7 +526,7 @@ function c() {
526
526
527
527
function a() {
528
528
local out=$logs /$1 ; shift
529
- mkdir -p $( dirname $out )
529
+ mkdir -p " $( dirname $out ) "
530
530
local start=" $( date -u +%s ) "
531
531
log " Start 'ansible $opts_adhoc $* ' with log in $out "
532
532
if $run_lib_dryrun ; then
@@ -561,7 +561,7 @@ function a_out() {
561
561
562
562
function ap() {
563
563
local out=$logs /$1 ; shift
564
- mkdir -p $( dirname $out )
564
+ mkdir -p " $( dirname $out ) "
565
565
local start=" $( date -u +%s ) "
566
566
log " Start 'ansible-playbook $opts_adhoc $* ' with log in $out "
567
567
if $run_lib_dryrun ; then
0 commit comments