remove IV validation step from RestoreHelper
[python-delta-tar] / runtests.py
CommitLineData
be60ffd0 1#!/usr/bin/env python3
ae48acc8 2
866c42e6
DGM
3# Copyright (C) 2013 Intra2net AG
4#
494b38aa
DGM
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU Lesser General Public License as published
7# by the Free Software Foundation; either version 3 of the License, or
866c42e6
DGM
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
494b38aa 13# GNU Lesser General Public License for more details.
866c42e6
DGM
14#
15# You should have received a copy of the GNU General Public License
494b38aa
DGM
16# along with this program. If not, see
17# <http://www.gnu.org/licenses/lgpl-3.0.html>
866c42e6
DGM
18
19
ae48acc8
ERE
20import unittest
21
8ab92b45 22from testing.test_multivol import MultivolGnuFormatTest, MultivolPaxFormatTest
5fdff89f 23from testing.test_concat_compress import ConcatCompressTest
0112ba0d 24from testing.test_rescue_tar import RescueTarTest
6e812ad9 25from testing.test_encryption import EncryptionTest
1a985013
ERE
26from testing.test_deltatar import (DeltaTarTest, DeltaTar2Test,
27 DeltaTarStreamTest, DeltaTarGzipTest, DeltaTarGzipStreamTest,
28 DeltaTarGzipConcatTest, DeltaTarGzipAes128ConcatTest,
5ed1df9a 29 DeltaTarAes128ConcatTest
ac5e4184 30 )
08bb4b4a 31from testing.test_compression_level import suite
ae48acc8
ERE
32
33if __name__ == "__main__":
0165ca3c
PG
34 import sys
35 if len (sys.argv) == 1:
36 unittest.TextTestRunner().run(suite())
37 unittest.main()
38 else:
39 suite = unittest.TestSuite ()
40 def add (n):
41 ret = False
42 for group in [#testing.test_multivol
43 MultivolGnuFormatTest, MultivolPaxFormatTest
44 # testing.test_concat_compress
45 , ConcatCompressTest
46 # testing.test_rescue_tar
47 , RescueTarTest
48 # testing.test_encryption
49 , EncryptionTest
50 # testing.test_deltatar
51 , DeltaTarTest, DeltaTar2Test
52 , DeltaTarStreamTest, DeltaTarGzipTest
53 , DeltaTarGzipStreamTest, DeltaTarGzipConcatTest
54 , DeltaTarGzipAes128ConcatTest
5ed1df9a 55 , DeltaTarAes128ConcatTest
0165ca3c
PG
56 ]:
57 try:
58 t = group (n)
59 except ValueError: # no such test
60 continue
61 print ("including ā€œ%sā€" % n)
62 suite.addTest(t)
63 ret = True
64 return ret
65 n = 0
66 for arg in sys.argv [1:]:
67 if add (arg) is True:
68 n += 1
69 if n == 0:
70 print ("ERROR: no valid test name specified, please double-check",
71 file=sys.stderr)
72 sys.exit (-1)
73 runner = unittest.TextTestRunner ()
74 runner.run (suite)
75