Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Nested suites more corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
joergboe committed Feb 2, 2018
1 parent 2de3c84 commit 335e27a
Show file tree
Hide file tree
Showing 30 changed files with 22 additions and 21 deletions.
31 changes: 16 additions & 15 deletions bin/mainutil.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,13 @@ function printSuitesCases {
# Checks for every case if there was a matching enty in cases array
# $1 current suite index
# $2 suite depth
# $3 Name of parent suites
# use caseToExecuteParent from parent
# $3 path of suites
# $4 list of parent suite indexes
function checkCaseMatch {
isDebug && printDebug "******* $FUNCNAME $*"
local i j
local y
local y x
local allSuiteIndexes="$4 $1"
local caseToExecuteHere=''
for i in ${childCases[$1]}; do
y="${3}::${casesName[$i]}"
Expand All @@ -237,22 +238,22 @@ function checkCaseMatch {
fi
done
done
if [[ -n $caseToExecuteHere ]]; then
for x in $allSuiteIndexes; do
isDebug && printDebug "execute suite $x ${suitesName[$x]}"
executeSuite[$x]='true'
done
fi
local newDeth=$(($2+1))
local x
local caseToExecuteInSuites=''
for x in ${childSuites[$1]}; do
local spath="$3/${suitesName[$x]}"
local caseToExecuteParent=''
checkCaseMatch "$x" "$newDeth" "$spath"
if [[ -n $caseToExecuteParent ]]; then
caseToExecuteInSuites='true'
local spath="$3"
if [[ -z $spath ]]; then
spath="${suitesName[$x]}"
else
spath+="/${suitesName[$x]}"
fi
checkCaseMatch "$x" "$newDeth" "$spath" "$allSuiteIndexes"
done
if [[ ( -n $caseToExecuteHere ) || ( -n $caseToExecuteInSuites ) ]]; then
isDebug && printDebug "execute suite $1 ${suitesName[$1]}"
caseToExecuteParent='true'
executeSuite[$1]='true'
fi
}

#
Expand Down
6 changes: 3 additions & 3 deletions bin/runTTF
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ else
declare -rx TTRO_skipIgnore="true"
takeAllCases=""
declare caseToExecuteParent=''
checkCaseMatch '0' '0' ''
checkCaseMatch '0' '0' '' ''
if [[ -n $caseToExecuteParent ]]; then
executeSuite[0]='true'
fi
Expand Down Expand Up @@ -624,8 +624,8 @@ for x in VARIANT SUCCESS SKIP FAILURE ERROR SUITE_VARIANT SUITE_ERROR; do
fi
done
#put results to results file for information purose only
echo -e "VARIANT=$VARIANTCount\nSUCCESS=$SUCCESSCount\nSKIP=$SKIPCount\nFAILURE=$FAILURECount\nERROR=$ERRORCount" > "${TTRO_workDir}/RESULT"
echo -e "SUITE_VARIANT=$SUITE_VARIANTCount SUITE_ERROR=$SUITE_ERRORCount"
#echo -e "VARIANT=$VARIANTCount\nSUCCESS=$SUCCESSCount\nSKIP=$SKIPCount\nFAILURE=$FAILURECount\nERROR=$ERRORCount" > "${TTRO_workDir}/RESULT"
#echo -e "SUITE_VARIANT=$SUITE_VARIANTCount SUITE_ERROR=$SUITE_ERRORCount"

#Print suite errors and collection
if [[ $SUITE_ERRORCount -gt 0 ]]; then
Expand Down
Empty file removed test/emptyCase/TestCollection.sh
Empty file.
Empty file removed test/emptySuite/TestCollection.sh
Empty file.
Empty file removed test/noSuite/TestCollection.sh
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
###################################

# register tool module
registerTool "$TTRO_inputDir/TestTools.sh"
registerTool "$TTRO_inputDirSuite/TestTools.sh"

#Test collection preparation
PREPS='modifyAll'
Expand All @@ -16,7 +16,7 @@ function modifyPrefix {
if [[ $1 == $2 ]]; then
printErrorAndExit "$FUNCNAME: Origin and destination must be different file" $errRt
fi
sed -e "s/TT_/TY_/g;s/TTRO_/TYRO_/g;s/TTP_/TYP_/g;s/TTPN_/TYPN_/g" "$1" > "$2"
sed -e "s/TT_/TY_/g;s/TTRO_/TYRO_/g;s/TTP_/TYP_/g;s/TTPN_/TYPN_/g;s/TTXX_/TYXX_/g" "$1" > "$2"
}

TTRO_help_modifyAll='
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function copyAndModifyTestCollection {
if [[ -d $destDir ]]; then
cp -rp "$sourceDir" "$destDir"
local x
for x in $TEST_PROPERTIES $TEST_COLLECTION_FILE $TEST_SUITE_FILE $TEST_CASE_FILE; do
for x in $TEST_PROPERTIES $TEST_SUITE_FILE $TEST_CASE_FILE; do
renameInSubdirs "$destDir/testCollection" "T$x" "$x"
done
fi
Expand Down
File renamed without changes.

0 comments on commit 335e27a

Please sign in to comment.