David Caro has posted comments on this change.

Change subject: reorg repoclosure + tests
......................................................................


Patch Set 17: Code-Review-1

(12 comments)

https://gerrit.ovirt.org/#/c/39249/17/jobs/packaging/repo_closure_check.sh
File jobs/packaging/repo_closure_check.sh:

Line 41: i
use at least 3 chars for any file


Line 47: eval $i
avoid as much as possible, please give an explanation on why is required here


Line 119: d l m o
use at least 3 chars for any var


Line 128:     [[ -n "${REPO_NAME}" ]] || die $? "Please specify --repo= option"
Line 129:     [[ -n "${DISTRIBUTION_VERSION}" ]] || die $? "Please specify 
--distribution-version= option"
Line 130:     [[ -n "${LAYOUT}" ]] || die $? "Please specify --layout= option"
Line 131:     o=0
Line 132:     for lm in "${DISTRO_LAYOUTS[@]}"; do
lm not local
Line 133:         d="$( echo "${lm}" | cut -d: -f1 )"
Line 134:         l="$( echo "${lm}" | cut -d: -f2 )"
Line 135:         if [[ "${d}" = "${DISTRIBUTION}" ]]; then
Line 136:             m="Distribution: ${d} uses layout: ${l}"


Line 133: d="$( echo "${lm}" | cut -d: -f1 )"
        :         l="$( echo "${lm}" | cut -d: -f2 )"
use internal tools:
  d="${lm%%:*}"
  l="${lm#*:}"


Line 135:  =
use double equals


Line 137: = 
use double equals


Line 506: #    check_repo_closure
Line 507:     check_repo_closure_new "${DISTRIBUTION}" "${DISTRIBUTION_VERSION}"
Line 508: }
Line 509: 
Line 510: if [[ ${TEST_RUN} -eq 0 ]]; then
Instead of this, check if $0 ends with /bash (that means it has been sourced)
Line 511:     # only runs when TEST_RUN is 0.
Line 512:     main "${@}"
Line 513:     exit $?


https://gerrit.ovirt.org/#/c/39249/17/jobs/packaging/test_repo_closure_check.sh
File jobs/packaging/test_repo_closure_check.sh:

Line 1: #!/usr/bin/env bats
use [[ ]] and == everywhere
Line 2: 
Line 3: TEST_RUN=1
Line 4: source repo_closure_check.sh
Line 5: 


Line 25: [ !
the ! should be out of the [[ ]]


Line 106:     field="mirrorlist"
Line 107:     value="http://kuku.com/alsdkas/kasd";
Line 108:     extras="exclude=mesdb*"
Line 109:     run repo_data_to_conf_section "${rpath}" "${repoid}" "${field}" 
"${value}" "${extras}"
Line 110:     [ "${output}" = "" ]
you should check status too, it will not fail if using run
Line 111:     run diff ${rpath_fixture} ${rpath} &> /dev/null
Line 112:     [ ${status} -eq 0 ]
Line 113:     rm -f "${rpath}"
Line 114: }


Line 124:     run gen_yum_conf ${confroot_fixture}
Line 125:     [ "${output}" = "${confroot_fixture}" ]
Line 126: 
Line 127:     run diff "${conf_file_fixture}" "${myconfroot}/yum.conf" &> 
/dev/null
Line 128:     [ $? -eq 0 ]
if you use run, do echo "$output" and check $status instead of $0
Line 129:     rm -f "${myconfroot}/yum.conf"
Line 130: }
Line 131: 
Line 132: 


-- 
To view, visit https://gerrit.ovirt.org/39249
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I207c5c59ca3149c17897c231e391e15e7eec4363
Gerrit-PatchSet: 17
Gerrit-Project: jenkins
Gerrit-Branch: master
Gerrit-Owner: Max Kovgan <m...@redhat.com>
Gerrit-Reviewer: David Caro <dcaro...@redhat.com>
Gerrit-Reviewer: Max Kovgan <m...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to