Test: remove testdir also if skip test

This commit is contained in:
Olof hagsand 2022-09-03 13:07:26 +02:00
parent 71fc85af0b
commit 5e2643c382
26 changed files with 69 additions and 18 deletions

View file

@ -9,6 +9,7 @@ APPNAME=example
if [ ${ENABLE_NETSNMP} != "yes" ]; then
echo "Skipping test, Net-SNMP support not enabled."
rm -rf $dir
if [ "$s" = $0 ]; then exit 0; else return 0; fi
fi
@ -510,7 +511,9 @@ expectpart "$($snmpwalk $ENTITY_OID)" 0 "SNMPv2-SMI::mib-2.47.1.1.1.1.1.1 = INTE
"SNMPv2-SMI::mib-2.47.1.1.1.1.16.2 = INTEGER: 0" \
new "Cleaning up"
# testexit
testexit
rm -rf $dir
new "endtest"
endtest