From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2FD47211BA45C for ; Wed, 27 Feb 2019 18:04:56 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2019 18:04:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,421,1544515200"; d="scan'208";a="119674130" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.47]) by orsmga006.jf.intel.com with ESMTP; 27 Feb 2019 18:04:55 -0800 From: "Feng, Bob C" To: edk2-devel@lists.01.org Cc: Bob Feng , Liming Gao Date: Thu, 28 Feb 2019 10:04:47 +0800 Message-Id: <20190228020447.24768-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Subject: [Patch V2] BaseTools: Add python3-distutils Ubuntu package checking X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2019 02:04:57 -0000 Content-Transfer-Encoding: 8bit https://bugzilla.tianocore.org/show_bug.cgi?id=1509 V2: Remove OS/Package specific words. Print the error info which is from python error message. Add python3-distutils Ubuntu package checking. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao --- BaseTools/Tests/RunTests.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/BaseTools/Tests/RunTests.py b/BaseTools/Tests/RunTests.py index 0dd65632d0..f6d3f43653 100644 --- a/BaseTools/Tests/RunTests.py +++ b/BaseTools/Tests/RunTests.py @@ -17,10 +17,22 @@ # import os import sys import unittest +distutils_exist = True +try: + import distutils.util +except: + distutils_exist = False + +if not distutils_exist: + print(""" +Python report "No module named 'distutils.uitl'" +""") + sys.exit(-1) + import TestTools def GetCTestSuite(): import CToolsTests return CToolsTests.TheTestSuite() -- 2.20.1.windows.1