Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Victor Morales | e746700 | 2017-08-30 14:50:43 -0500 | [diff] [blame] | 3 | source /var/onap_tests/asserts |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 4 | |
| 5 | # main() - Starting point for Unit Tests |
| 6 | function main { |
| 7 | local covered_functions=("$@") |
| 8 | |
| 9 | len=${#covered_functions[@]} |
| 10 | echo "1..$len" |
| 11 | for i in ${!covered_functions[@]}; do |
| 12 | dpkg --get-selections > installed-software |
| 13 | sort -o installed-software installed-software |
| 14 | test_${covered_functions[$i]} |
| 15 | echo "ok $((i+1)) - test_${covered_functions[$i]}" |
| 16 | |
| 17 | # Teardown process |
| 18 | dpkg --get-selections > installed-software_new |
| 19 | sort -o installed-software_new installed-software_new |
| 20 | apt-get purge -y -qq $(comm -3 installed-software installed-software_new | awk '{print $1}') |
| 21 | #rm -rf $git_src_folder |
| 22 | #rm -rf ~/.m2/ |
| 23 | done |
| 24 | } |