This reverts commit df7c81b5b2.
In commint df7c81b5b219c9,used a function to test python module
But the Boolean value of the return value of this function is the
opposite of the Correct result, resulting in an unexpected result
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
		
	
		
			
				
	
	
		
			40 lines
		
	
	
		
			812 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			812 B
		
	
	
	
		
			Python
		
	
	
	
	
	
## @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)
 | 
						|
 |