2014-01-27 06:23:15 +01:00
|
|
|
## @file
|
|
|
|
# Unit tests for BaseTools utilities
|
|
|
|
#
|
|
|
|
# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
|
|
|
|
#
|
2019-04-04 01:03:11 +02:00
|
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
2014-01-27 06:23:15 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
##
|
|
|
|
# Import Modules
|
|
|
|
#
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
import unittest
|
2019-05-09 08:50:05 +02:00
|
|
|
|
|
|
|
try:
|
|
|
|
import distutils.util
|
|
|
|
except ModuleNotFoundError:
|
|
|
|
sys.exit('''
|
|
|
|
Python reported: "No module named 'distutils.util"
|
|
|
|
''')
|
|
|
|
|
2014-01-27 06:23:15 +01:00
|
|
|
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)
|
|
|
|
|