Back to index

obnam  1.1
Public Member Functions | Public Attributes | Static Public Attributes
setup.Check Class Reference
Inheritance diagram for setup.Check:
Inheritance graph
[legend]
Collaboration diagram for setup.Check:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def initialize_options
def finalize_options
def run

Public Attributes

 fast
 network
 network_only

Static Public Attributes

list user_options

Detailed Description

Definition at line 69 of file setup.py.


Member Function Documentation

Definition at line 82 of file setup.py.

00082 
00083     def finalize_options(self):
00084         pass

Definition at line 77 of file setup.py.

00077 
00078     def initialize_options(self):
00079         self.fast = False
00080         self.network = False
00081         self.network_only = False

def setup.Check.run (   self)

Definition at line 85 of file setup.py.

00085 
00086     def run(self):
00087         local = not self.network_only
00088         network = self.network or self.network_only
00089         fast = self.fast
00090         slow = not self.fast
00091 
00092         if local and fast:
00093             print "run unit tests"
00094             runcmd(['python', '-m', 'CoverageTestRunner',
00095                     '--ignore-missing-from=without-tests'])
00096             os.remove('.coverage')
00097 
00098         if local and fast:
00099             print "run black box tests"
00100             runcmd(['cmdtest', 'tests'])
00101 
00102         num_clients = '2'
00103         num_generations = '16'
00104 
00105         if local and slow:
00106             print "run locking tests"
00107             test_repo = tempfile.mkdtemp()
00108             runcmd(['./test-locking', num_clients, 
00109                     num_generations, test_repo, test_repo])
00110             shutil.rmtree(test_repo)
00111 
00112         if local and slow:
00113             print "run crash test"
00114             runcmd(['./crash-test', '200'])
00115 
00116         if network and fast:
00117             print "run sftp tests"
00118             runcmd(['./test-sftpfs'])
00119 
00120         if network and fast:
00121             print "re-run black box tests using localhost networking"
00122             env = dict(os.environ)
00123             env['OBNAM_TEST_SFTP_ROOT'] = 'yes'
00124             env['OBNAM_TEST_SFTP_REPOSITORY'] = 'yes'
00125             runcmd(['cmdtest', 'tests'], env=env)
00126 
00127         if network and slow:
00128             print "re-run locking tests using localhost networking"
00129             test_repo = tempfile.mkdtemp()
00130             repo_url = 'sftp://localhost/%s' % test_repo
00131             runcmd(['./test-locking', num_clients, 
00132                     num_generations, repo_url, test_repo])
00133             shutil.rmtree(test_repo)
00134             
00135         print "setup.py check done"
00136 
00137 
00138 setup(name='obnam',
00139       version='1.1',
00140       description='Backup software',
00141       author='Lars Wirzenius',
00142       author_email='liw@liw.fi',
00143       url='http://liw.fi/obnam/',
00144       scripts=['obnam', 'obnam-benchmark', 'obnam-viewprof'],
00145       packages=['obnamlib', 'obnamlib.plugins'],
00146       ext_modules=[Extension('obnamlib._obnam', sources=['_obnammodule.c'])],
00147       data_files=[('share/man/man1', glob.glob('*.1'))],
00148       cmdclass={
00149         'build': GenerateManpage,
00150         'check': Check,
00151         'clean': CleanMore,
00152       },
00153      )

Here is the call graph for this function:


Member Data Documentation

Definition at line 78 of file setup.py.

Definition at line 79 of file setup.py.

Definition at line 80 of file setup.py.

list setup.Check.user_options [static]
Initial value:
[
        ('fast', 'f', 'run fast tests only?'),
        ('network', 'n', 'run network tests to localhost?'),
        ('network-only', 'N', 'only run network tests to localhost?'),
    ]

Definition at line 71 of file setup.py.


The documentation for this class was generated from the following file: