diff options
Diffstat (limited to 'se-generate.sh')
-rwxr-xr-x | se-generate.sh | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/se-generate.sh b/se-generate.sh new file mode 100755 index 0000000..f96456c --- /dev/null +++ b/se-generate.sh @@ -0,0 +1,85 @@ +#!/bin/bash + +################################################################################ +# generate se-tb.yaml +# all manual/se/tb*.yaml files, except tb1-9 +################################################################################ +plan=plans/se-tb.yaml +cp plans/se-template.yaml ${plan} + +sed -e "s/se-template/se-tb/g" -i ${plan} +sed -e "s/Scheider Electric template/Scheider Electric TB Test Plan/g" -i ${plan} +# TODO - describe what the TB test plan is" + +testcases=($(ls -v manual/se/tb[1-9]?.yaml)) +for testcase in "${testcases[@]}" ; do + echo " - path: ${testcase}" >> ${plan} + echo " repository: https://git.linaro.org/landing-teams/working/schneider/test-definitions.git" >> ${plan} + echo " branch: linaro" >> ${plan} +done + +################################################################################ +# generate se-tc.yaml +# all manual/se/tc*.yaml files +################################################################################ +plan=plans/se-tc.yaml +cp plans/se-template.yaml ${plan} + +sed -e "s/se-template/se-tc/g" -i ${plan} +sed -e "s/Scheider Electric template/Scheider Electric TC Test Plan/g" -i ${plan} +# TODO - describe what the TC test plan is" + +testcases=($(ls -v manual/se/tc*.yaml)) +for testcase in "${testcases[@]}" ; do + echo " - path: ${testcase}" >> ${plan} + echo " repository: https://git.linaro.org/landing-teams/working/schneider/test-definitions.git" >> ${plan} + echo " branch: linaro" >> ${plan} +done + +################################################################################ +# generate se-others.yaml +# all manual/se/*.yaml files not included in se-tb and te-tc plans +################################################################################ +plan=plans/se-others.yaml +cp plans/se-template.yaml ${plan} + +sed -e "s/se-template/se-others/g" -i ${plan} +sed -e "s/Scheider Electric template/Scheider Electric Misc Manual Test Plan/g" -i ${plan} +# TODO - describe what this test plan is" + +testcases=($(ls -v manual/se/*.yaml | grep -v t[bc][0-9])) +for testcase in "${testcases[@]}" ; do + echo " - path: ${testcase}" >> ${plan} + echo " repository: https://git.linaro.org/landing-teams/working/schneider/test-definitions.git" >> ${plan} + echo " branch: linaro" >> ${plan} +done + +################################################################################ +# generate se-all.yaml +# everything in se-auto.yaml, and all yamls in manual/se +################################################################################ +plan=plans/se-all-tests.yaml +cp plans/se-auto.yaml ${plan} + +sed -e "s/se-auto/se-all-tests/g" -i ${plan} +sed -e "s/Scheider Electric Automated Test Plan/Scheider Electric Test Plan describing all manual and automated tests performed when making a release/g" -i ${plan} +# TODO - describe what this test plan is" + +echo " manual:" >> ${plan} +testcases=($(ls -v manual/se/*.yaml | grep -v tb[0-9]-j | sort -V)) + +for testcase in "${testcases[@]}" ; do + echo " - path: ${testcase}" >> ${plan} + echo " repository: https://git.linaro.org/landing-teams/working/schneider/test-definitions.git" >> ${plan} + echo " branch: linaro" >> ${plan} +done + + +################################################################################ +# Generate the HTML Test Plan +################################################################################ +pushd plans +plan=se-all-tests +sed -e "s/Metadata/Schneider Electric Test Plan/g" -i templates/testplan_v2.html +./testplan2html.py -f ${plan}.yaml -i -s --pdf output/${plan}.pdf +popd |