summaryrefslogtreecommitdiffstats
path: root/BaseTools/Tests/RunTests.py
blob: 81af736cd8cf8c71af7e803b1db5d06fcd726b99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
## @file
# Unit tests for BaseTools utilities
#
#  Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
#
#  SPDX-License-Identifier: BSD-2-Clause-Patent
#

##
# Import Modules
#
import os
import sys
import unittest

try:
    import distutils.util
except ModuleNotFoundError:
    sys.exit('''
Python reported: "No module named 'distutils.util"
''')

import TestTools

def GetCTestSuite():
    import CToolsTests
    return CToolsTests.TheTestSuite()

def GetPythonTestSuite():
    import PythonToolsTests
    return PythonToolsTests.TheTestSuite()

def GetAllTestsSuite():
    return unittest.TestSuite([GetCTestSuite(), GetPythonTestSuite()])

if __name__ == '__main__':
    allTests = GetAllTestsSuite()
    unittest.TextTestRunner(verbosity=2).run(allTests)