Merge "Fix for sdc csit sanity test"
[integration.git] / bootstrap / vagrant-onap / tests / _test_base
1 #!/bin/bash
2
3 source /var/onap_tests/asserts
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 }