summaryrefslogtreecommitdiffstats
path: root/tests/mysqld-stop.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mysqld-stop.sh')
-rwxr-xr-xtests/mysqld-stop.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/mysqld-stop.sh b/tests/mysqld-stop.sh
new file mode 100755
index 0000000..6ac76dd
--- /dev/null
+++ b/tests/mysqld-stop.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+# This is not a real test, but a script to stop mysql. It is
+# implemented as test so that we can stop mysql at the time we need
+# it (do so via Makefile.am).
+# Copyright (C) 2018 Rainer Gerhards and Adiscon GmbH
+# Released under ASL 2.0
+. ${srcdir:=.}/diag.sh init
+if [ "$MYSQLD_STOP_CMD" == "" ]; then
+ exit_test
+fi
+printf 'stopping mysqld...\n'
+eval $MYSQLD_STOP_CMD
+sleep 1 # cosmetic: give mysqld a chance to emit shutdown message
+exit_test