]>
Commit | Line | Data |
---|---|---|
f51461c8 LG |
1 | ## @file\r |
2 | # Unit tests for BaseTools utilities\r | |
3 | #\r | |
4 | # Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r | |
5 | #\r | |
6 | # This program and the accompanying materials\r | |
7 | # are licensed and made available under the terms and conditions of the BSD License\r | |
8 | # which accompanies this distribution. The full text of the license may be found at\r | |
9 | # http://opensource.org/licenses/bsd-license.php\r | |
10 | #\r | |
11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | #\r | |
14 | \r | |
15 | ##\r | |
16 | # Import Modules\r | |
17 | #\r | |
18 | import os\r | |
19 | import sys\r | |
20 | import unittest\r | |
21 | \r | |
407f5a05 FB |
22 | try:\r |
23 | import distutils.util\r | |
24 | except ModuleNotFoundError:\r | |
25 | sys.exit('''\r | |
26 | Python reported: "No module named 'distutils.util"\r | |
27 | ''')\r | |
28 | \r | |
f51461c8 LG |
29 | import TestTools\r |
30 | \r | |
f51461c8 LG |
31 | def GetCTestSuite():\r |
32 | import CToolsTests\r | |
33 | return CToolsTests.TheTestSuite()\r | |
34 | \r | |
35 | def GetPythonTestSuite():\r | |
36 | import PythonToolsTests\r | |
37 | return PythonToolsTests.TheTestSuite()\r | |
38 | \r | |
39 | def GetAllTestsSuite():\r | |
40 | return unittest.TestSuite([GetCTestSuite(), GetPythonTestSuite()])\r | |
41 | \r | |
42 | if __name__ == '__main__':\r | |
43 | allTests = GetAllTestsSuite()\r | |
44 | unittest.TextTestRunner(verbosity=2).run(allTests)\r | |
45 | \r |