Skip to content

Commit

Permalink
all_databases test now runs Maatkit before backup
Browse files Browse the repository at this point in the history
  • Loading branch information
m00dawg committed May 11, 2010
1 parent 39334e4 commit 35983b2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test_suite/tests/providers/mysqldump/all_databases/run.py
Expand Up @@ -36,6 +36,16 @@ def execute(cmd, config):
stderr=errorLog)
subprocess.call([pwd + '/sandbox/mysql/start'], stdout=outputLog, stderr=errorLog)

# Run Maatkit before backup
maatkit_output = open('results/before-restore.mkt', 'w')
subprocess.call(shlex.split('mk-table-checksum localhost' +
' --port=' + config.get('sandbox', 'port') +
' --user=' + config.get('sandbox', 'user') +
' --password=' + config.get('sandbox', 'password')),
stdout=maatkit_output,
stderr=errorLog)
maatkit_output.close()

# Setup Holland virtual environment
if not os.path.exists(config.get('global', 'holland_install_dir')):
os.mkdir(config.get('global', 'holland_install_dir'))
Expand Down Expand Up @@ -83,6 +93,8 @@ def execute(cmd, config):
'etc/holland/holland.conf bk'),
cwd=holland_path)



# Cleanup
subprocess.call([pwd + '/sandbox/mysql/stop'])
shutil.rmtree(pwd + '/sandbox/mysql')
Expand Down

0 comments on commit 35983b2

Please sign in to comment.