diff options
Diffstat (limited to 'roms/edk2/BaseTools/Tests/RunTests.py')
-rw-r--r-- | roms/edk2/BaseTools/Tests/RunTests.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/roms/edk2/BaseTools/Tests/RunTests.py b/roms/edk2/BaseTools/Tests/RunTests.py new file mode 100644 index 000000000..81af736cd --- /dev/null +++ b/roms/edk2/BaseTools/Tests/RunTests.py @@ -0,0 +1,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)
+
|