From 190ec8796409870d5af2bcd53482cd56cd73f33e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Jul 2011 10:50:24 +1000 Subject: s4-test: added dbcheck run to test suite This should catch corruption that happens during a test run Pair-Programmed-With: Andrew Bartlett --- source4/selftest/quick | 1 + source4/selftest/tests.py | 3 +++ testprogs/blackbox/dbcheck.sh | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100755 testprogs/blackbox/dbcheck.sh diff --git a/source4/selftest/quick b/source4/selftest/quick index 1827caf48f..aa602fd383 100644 --- a/source4/selftest/quick +++ b/source4/selftest/quick @@ -34,3 +34,4 @@ rpc.handles rpc.echo smb.signing drs.unit +samba4.blackbox.dbcheck diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index 292b428dc2..9997628cee 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -464,3 +464,6 @@ plantestsuite("samba4.blackbox.provision-backend.py", "none", ["PYTHON=%s" % pyt # Test renaming the DC plantestsuite("samba4.blackbox.renamedc.sh", "none", ["PYTHON=%s" % python, os.path.join(bbdir, "renamedc.sh"), '$PREFIX/provision']) + +# check the database is all OK. PLEASE LEAVE THIS AS THE LAST TEST +plantestsuite("samba4.blackbox.dbcheck.sh", "dc:local", ["PYTHON=%s" % python, os.path.join(bbdir, "dbcheck.sh"), '$PREFIX/provision', configuration]) diff --git a/testprogs/blackbox/dbcheck.sh b/testprogs/blackbox/dbcheck.sh new file mode 100755 index 0000000000..447d14a8c8 --- /dev/null +++ b/testprogs/blackbox/dbcheck.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then +cat <