2
# -*- mode: python; indent-tabs-mode: nil; -*-
3
# vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
5
# Copyright (C) 2011 Patrick Crews
8
# This program is free software; you can redistribute it and/or modify
9
# it under the terms of the GNU General Public License as published by
10
# the Free Software Foundation; either version 2 of the License, or
11
# (at your option) any later version.
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
18
# You should have received a copy of the GNU General Public License
19
# along with this program; if not, write to the Free Software
20
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
from lib.util.crashme_methods import execute_crashme
27
server_requirements = [[]]
32
class crashmeTest(unittest.TestCase):
35
# """ If we need to do anything pre-test, we do it here.
36
# Any code here is executed before any test method we
44
def test_runCrashme(self):
45
test_cmd = "$SQLBENCH_DIR/crash-me --server=drizzled --host=127.0.0.1 --force --dir=$DRIZZLE_TEST_WORKDIR --connect-options=port=$MASTER_MYPORT --verbose --debug --user=root"
46
test_status, retcode, output = execute_crashme(test_cmd, test_executor, servers)
47
self.assertTrue(retcode==0, output)
48
self.assertTrue(test_status=='pass', output)
51
server_manager.reset_servers(test_executor.name)
54
def run_test(output_file):
55
suite = unittest.TestLoader().loadTestsFromTestCase(crashmeTest)
56
return unittest.TextTestRunner(stream=output_file, verbosity=2).run(suite)