36 lines
910 B
Python
Executable File
36 lines
910 B
Python
Executable File
#!/usr/bin/python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import os
|
|
import sys
|
|
locale_dir = os.path.realpath(os.path.join(os.getcwd(), "i18n"))
|
|
os.environ['TEXTDOMAINDIR'] = locale_dir
|
|
|
|
import unittest
|
|
sys.path.insert(0,'../client')
|
|
sys.path.insert(0,'../../client')
|
|
sys.path.insert(0,'.')
|
|
sys.path.insert(0,'../')
|
|
# set unit testing mode
|
|
from entropy.const import etpSys
|
|
import entropy.tools
|
|
etpSys['unittest'] = True
|
|
|
|
from tests import db, client, server, misc, fetchers, tools, dep, i18n, spm, \
|
|
qa, core, security, const
|
|
rc = 0
|
|
|
|
# Add to the list the module to test
|
|
mods = [db, client, server, misc, fetchers, tools, dep, i18n, spm, qa, core,
|
|
security, const]
|
|
|
|
tests = []
|
|
for mod in mods:
|
|
tests.append(unittest.TestLoader().loadTestsFromModule(mod))
|
|
|
|
result = unittest.TextTestRunner(verbosity = 1).run(unittest.TestSuite(tests))
|
|
if result.errors:
|
|
rc = 1
|
|
entropy.tools.kill_threads()
|
|
raise SystemExit(rc)
|