diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-03-11 22:28:40 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-03-11 22:28:40 +0000 |
commit | 6e9ae142e8a02ce497c777454f40d59e51183fcc (patch) | |
tree | 37f03ffb327c44591bd483486d1a1ea2d423db99 | |
parent | 088bb52c014bd3d0ecdd434510a22ab726a68155 (diff) | |
download | obnam-6e9ae142e8a02ce497c777454f40d59e51183fcc.tar.gz |
Add locking tests to setup.py check
-rw-r--r-- | setup.py | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -23,6 +23,8 @@ import glob import os import shutil import subprocess +import tempfile + class GenerateManpage(build): @@ -80,6 +82,13 @@ class Check(Command): print "run black box tests" subprocess.check_call(['cmdtest', 'tests']) + + print "run locking tests" + num_clients = '4' + num_generations = '128' + test_repo = tempfile.mkdtemp() + subprocess.check_call(['./test-locking', num_clients, num_generations, + test_repo, test_repo]) if self.network: print "run sftp tests" @@ -90,6 +99,13 @@ class Check(Command): env['OBNAM_TEST_SFTP_ROOT'] = 'yes' env['OBNAM_TEST_SFTP_REPOSITORY'] = 'yes' subprocess.check_call(['cmdtest', 'tests'], env=env) + + print "re-run locking tests using localhost networking" + repo_url = 'sftp://localhost/%s' % test_repo + subprocess.check_call(['./test-locking', num_clients, + num_generations, repo_url, test_repo]) + + shutil.rmtree(test_repo) print "setup.py check done" |