Commit 3144ea8b authored by bescoto's avatar bescoto

Updated tests for new CVS format


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@240 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 88bfe3be
......@@ -16,12 +16,21 @@ PYTHONPATH=$RDB_ROOT $RDB_ROOT/rdiff-backup
Running the unit tests:
-----------------------
If you want to try some of tests, you first have to untar the
testfiles.tar.gz as root (the tarball contains device files, files
with various uid/gid, etc):
If you want to try some of tests, you first have to get the
testfiles.tar.gz tarball. It is available at
http://rdiff-backup.stanford.edu/testfiles.tar.gz
and untar it as root in the testing directory. Root is required
because the tarball contains device files, files with various uid/gid,
etc. If you don't have root, it's ok, all the tests except for
roottest.py may still work.
cd testing; tar -xvzf testfiles.tar.gz
Then run the various *test.py files, for instance:
cd testing; python lazytest.py
If python restoretest.py doesn't work, try running ./makerestoretest3.
#!/usr/bin/python
import sys, os
sys.path.insert(0, "../src")
from rpath import *
from connection import *
import Globals
#sys.path.insert(0, "../src")
from rdiff_backup.rpath import *
from rdiff_backup.connection import *
from rdiff_backup import Globals
lc = Globals.local_connection
......
from __future__ import generators
execfile("manage.py")
from manage import *
from rpath import *
#######################################################################
#
......
from __future__ import generators
import marshal, sha, types
execfile("iterfile.py")
from rdiff_backup.iterfile import *
#######################################################################
#
......
import unittest, types, tempfile, os, sys
from commontest import *
from connection import *
import Globals
from rdiff_backup.connection import *
from rdiff_backup import Globals
class LocalConnectionTest(unittest.TestCase):
"""Test the dummy connection"""
......
import unittest
from commontest import *
from C import *
from rpath import *
from rdiff_backup.C import *
from rdiff_backup.rpath import *
class CTest(unittest.TestCase):
"""Test the C module by comparing results to python functions"""
......
from __future__ import generators
import unittest
from commontest import *
from rpath import *
from selection import *
import Globals
from rdiff_backup.rpath import *
from rdiff_backup.selection import *
from rdiff_backup import Globals
Log.setverbosity(4)
......
import unittest, StringIO
execfile("commontest.py")
rbexec("filelist.py")
from commontest import *
from rdiff_backup.filelist import *
class FilelistTest(unittest.TestCase):
......
import unittest, os, re, sys
from commontest import *
from log import *
from rpath import *
import Globals
from rdiff_backup.log import *
from rdiff_backup.rpath import *
from rdiff_backup import Globals
"""Regression tests"""
......
import os, unittest
from commontest import *
from rpath import *
import Globals, Hardlink
from rdiff_backup.rpath import *
from rdiff_backup import Globals, Hardlink
Log.setverbosity(7)
......
import unittest
from commontest import *
import Globals, SetConnections
from rdiff_backup import Globals, SetConnections
class RemoteMirrorTest(unittest.TestCase):
"""Test mirroring"""
......
import unittest, os
from commontest import *
from log import *
from rpath import *
from restore import *
from rdiff_backup.log import *
from rdiff_backup.rpath import *
from rdiff_backup.restore import *
lc = Globals.local_connection
Globals.change_source_perms = 1
......
import unittest, StringIO
from commontest import *
from iterfile import *
from rdiff_backup.iterfile import *
class testIterFile(unittest.TestCase):
......
import unittest, os, signal, sys, random, time
from commontest import *
from log import *
import Globals, Main
from rdiff_backup.log import *
from rdiff_backup import Globals, Main
"""Test consistency by killing rdiff-backup as it is backing up"""
......
from __future__ import generators
import unittest, pickle
from commontest import *
from lazy import *
from rdiff_backup.lazy import *
class Iterators(unittest.TestCase):
one_to_100 = lambda s: iter(range(1, 101))
......
import unittest, random
from commontest import *
from log import *
from selection import *
import Globals, Rdiff
from rdiff_backup.log import *
from rdiff_backup.selection import *
from rdiff_backup import Globals, Rdiff
Log.setverbosity(6)
......
import unittest, os
from commontest import *
from log import *
from rpath import *
import Globals, SetConnections
from rdiff_backup.log import *
from rdiff_backup.rpath import *
from rdiff_backup import Globals, SetConnections
"""Regression tests
......
import unittest
from commontest import *
from log import *
from restore import *
import Globals
from rdiff_backup.log import *
from rdiff_backup.restore import *
from rdiff_backup import Globals
Log.setverbosity(3)
......
import unittest
execfile("commontest.py")
rbexec("rlist.py")
from commontest import *
from rdiff_backup.rlist import *
class BasicObject:
"""The simplest object that can be used with RList"""
......
import os, unittest
from commontest import *
from rpath import *
from robust import *
from rdiff_backup.rpath import *
from rdiff_backup.robust import *
class TestRobustAction(unittest.TestCase):
......
import unittest, os
from commontest import *
from log import *
import Globals
from rdiff_backup.log import *
from rdiff_backup import Globals
"""Root tests
......
import unittest
from commontest import *
from log import *
from rpath import *
from rorpiter import *
import Globals
from rdiff_backup.log import *
from rdiff_backup.rpath import *
from rdiff_backup.rorpiter import *
from rdiff_backup import Globals
#Log.setverbosity(8)
......
import os, cPickle, sys, unittest
from commontest import *
from rpath import *
from rdiff_backup.rpath import *
class RPathTest(unittest.TestCase):
......
import os, unittest
from commontest import *
import rdiff_backup.Security, Security
import rdiff_backup.Security
#Log.setverbosity(5)
......
from __future__ import generators
import re, StringIO, unittest
from commontest import *
from selection import *
from destructive_stepping import *
import Globals
from rdiff_backup.selection import *
from rdiff_backup.destructive_stepping import *
from rdiff_backup import Globals
class MatchingTest(unittest.TestCase):
......
......@@ -22,8 +22,8 @@ if len(sys.argv) > 2:
try:
if len(sys.argv) == 2: sys.path.insert(0, sys.argv[1])
import Globals
from connection import *
import rdiff_backup.Globals
from rdiff_backup.connection import *
except (OSError, IOError, ImportError):
print_usage()
raise
......
import unittest
from commontest import *
import SetConnections
from rdiff_backup import SetConnections
class SetConnectionsTest(unittest.TestCase):
"""Set SetConnections Class"""
......
import unittest, types
from commontest import *
from static import *
from rdiff_backup.static import *
class D:
......
import unittest
from commontest import *
from statistics import *
from rdiff_backup.statistics import *
class StatsObjTest(unittest.TestCase):
"""Test StatsObj class"""
......
import unittest, time
from commontest import *
import Globals, Time
from rdiff_backup import Globals, Time
class TimeTest(unittest.TestCase):
def testConversion(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment