Add cleanup hook for integration tests
[tinc] / test / testlib.sh.in
index 14192ea..224ab4f 100644 (file)
@@ -332,6 +332,11 @@ cleanup() {
   (
     set +ex
 
+    if command -v cleanup_hook 2>/dev/null; then
+      echo >&2 "Cleanup hook found, calling..."
+      cleanup_hook
+    fi
+
     stop_all_tincs
 
     # Ask nicely, then kill anything that's left.