runtests.py 2.54 KB
Newer Older
1
#!/usr/bin/env python3
2 3
# -*- coding: utf-8 -*-
#
4
# Copyright (C) 2007-2010, TUBITAK/UEKAE
5 6 7 8 9 10 11 12 13
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
#

14
import os
15 16
import unittest

Suleyman Poyraz's avatar
Suleyman Poyraz committed
17 18
import inary
import inary.context as ctx
19

20 21 22 23 24 25 26 27 28
#Database tests
from databaseTests.testRepoDB import RepoDBTestCase
from databaseTests.testPackageDB import PackageDBTestCase
from databaseTests.testSourceDB import SourceDBTestCase
from databaseTests.testInstallDB import InstallDBTestCase
from databaseTests.testComponentDB import ComponentDBTestCase
from databaseTests.testFilesLDB import FilesDBTestCase
from databaseTests.testLazyDB import LazyDBTestCase
from databaseTests.testItembyRepo import ItemByRepoTestCase
29

30 31 32 33 34 35 36 37
#Package Tests
from packageTests.testConflict import ConflictTestCase
from packageTests.testDependency import DependencyTestCase
from packageTests.testFiles import FilesTestCase
from packageTests.testHistory import HistoryTestCase
from packageTests.testMetadata import MetadataTestCase
from packageTests.testPackage import PackageTestCase
from packageTests.testPspec import SpecFileTestCase
Suleyman Poyraz's avatar
Suleyman Poyraz committed
38
from packageTests.testRelations import RelationTestCase
39 40 41 42 43 44 45 46
from packageTests.testReplace import ReplaceTestCase

#File Tests
from fileTests.testArchive import ArchiveTestCase
from fileTests.testFile import FileTestCase
from fileTests.testSrcArchive import SourceArchiveTestCase

#Inary Tests
Suleyman Poyraz's avatar
Suleyman Poyraz committed
47
from inaryTests.testConstants import ConstantTestCase
48
from inaryTests.testConfigFile import ConfigFileTestCase
Suleyman Poyraz's avatar
Suleyman Poyraz committed
49
from inaryTests.testFetcher import FetchTestCase
50 51 52 53 54 55 56 57 58 59 60 61
from inaryTests.testMirrors import MirrorsTestCase
from inaryTests.testShell import ShellTestCase
from inaryTests.testUri import UriTestCase
from inaryTests.testUtil import UtilTestCase
from inaryTests.testVersion import VersionTestCase


#Type Tests
from typeTests.testOO import OOTestCase
from typeTests.testPgraph import GraphTestCase

# XML tests
Suleyman Poyraz's avatar
Suleyman Poyraz committed
62
from xmlTests.testAutoxml import AutoXmlTestCase
63

64
def setup():
Suleyman Poyraz's avatar
Suleyman Poyraz committed
65
    options = inary.config.Options()
66
    options.destdir = 'repos/tmp'
Suleyman Poyraz's avatar
Suleyman Poyraz committed
67 68
    inary.api.set_options(options)
    inary.api.set_scom(False)
69

Suleyman Poyraz's avatar
Suleyman Poyraz committed
70 71
    ctx.config.values.general.distribution = "Sulin"
    ctx.config.values.general.distribution_release = "2018"
72

73 74

if __name__ == '__main__':
75 76 77 78 79
    if os.path.exists("repos/tmp"):
        import shutil
        shutil.rmtree("repos/tmp")

    suite = unittest.TestSuite()
80
    unittest.main()
81