blob: 155de98bbce840f6795702b57013cc1bb82b207d [file] [log] [blame]
Victor Moralesdd074802017-07-26 16:06:35 -05001#!/bin/bash
2
Victor Moralese7467002017-08-30 14:50:43 -05003source /var/onap_tests/asserts
Victor Moralesdd074802017-07-26 16:06:35 -05004
5# main() - Starting point for Unit Tests
6function 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}