Skip to content

Commit

Permalink
Revert "BaseTools:code of test python module is moved to edksetup"
Browse files Browse the repository at this point in the history
This reverts commit df7c81b.

In commint df7c81b,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 <[email protected]>
Cc: Liming Gao <[email protected]>
Signed-off-by: Zhiju.Fan <[email protected]>
Reviewed-by: Bob Feng <[email protected]>
  • Loading branch information
zhijufan authored and BobCF committed May 9, 2019
1 parent 51e9be0 commit 4969320
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
8 changes: 8 additions & 0 deletions BaseTools/Tests/RunTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
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():
Expand Down
15 changes: 2 additions & 13 deletions edksetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,22 +177,11 @@ function SetupPython()
SetupPython3
}

function TestUtilModule()
{
if ( $PYTHON_COMMAND -c "import distutils.util" >/dev/null 2>&1 );then
return 1
else
echo Error: "No module named 'distutils.util"
return 0
fi
}

function SourceEnv()
{
SetWorkspace &&
SetupEnv &&
SetupPython &&
TestUtilModule
SetupEnv
SetupPython
}

I=$#
Expand Down

0 comments on commit 4969320

Please sign in to comment.