Add lib/, t/lib/, and sandbox/. All modules are updated and passing on MySQL 5.1.

This commit is contained in:
Daniel Nichter
2011-06-24 11:22:06 -06:00
parent 01e0175ad9
commit 6c501128e6
567 changed files with 335952 additions and 0 deletions

60
sandbox/stop-sandbox Executable file
View File

@@ -0,0 +1,60 @@
#!/bin/sh
err() {
echo
for msg; do
echo $msg
done
echo "See http://code.google.com/p/maatkit/wiki/Testing for more information."
echo
}
# ###########################################################################
# Sanity check the cmd line options.
# ###########################################################################
if [ $# -lt 1 ]; then
err "Usage: stop-sandbox [remove] all|port [port...]" \
"The 'all' option stops sandboxes /tmp/123[0-9]*." \
"The sandbox directories are removed if the first option is 'remove'."
exit 1
fi
# ###########################################################################
# Stop the sandboxes.
# ###########################################################################
exit_status=0
for port in $@; do
if [ "$port" = "remove" ]; then
continue
fi
if [ "$port" = "all" ]; then
ls /tmp/1234* >/dev/null 2>&1
if [ $? -eq 0 ]; then
for a in /tmp/123[0-9]*; do
$a/stop
if [ $? -ne 0 ]; then
exit_status=1
fi
if [ $1 = "remove" ]; then
rm -rf $a
fi
done
break
fi
fi
if [ -d "/tmp/$port" ]; then
/tmp/$port/stop
if [ $? -ne 0 ]; then
exit_status=1
fi
if [ $1 = "remove" ]; then
rm -rf /tmp/$port
fi
fi
done
exit $exit_status