2017-12-15 22:02:42 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Keep cleaning up, even if something fails
|
|
|
|
set +e
|
2017-12-15 14:25:17 +00:00
|
|
|
|
|
|
|
# Clean up after running the integration tests.
|
|
|
|
# Drop your cleanup script(s) in integration_tests/<protocol>/cleanup(.*).sh
|
|
|
|
|
|
|
|
echo "Cleaning up integration tests..."
|
|
|
|
|
|
|
|
pushd integration_tests
|
|
|
|
for mod in $(ls); do
|
|
|
|
if [ -d "$mod" ]; then
|
|
|
|
pushd $mod
|
|
|
|
for cleanup in $(ls cleanup*.sh); do
|
|
|
|
echo "Cleaning up $mod (integration_tests/$mod/$cleanup)..."
|
|
|
|
if ! ./$cleanup; then
|
|
|
|
echo "Warning: cleanup for $mod/$cleanup failed with exit code $?"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
|
|
|
|
echo "Integration test cleanup finished."
|