From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out01.mta.xmission.com (out01.mta.xmission.com [166.70.13.231]) by mx.groups.io with SMTP id smtpd.web09.4290.1625191211932911789 for ; Thu, 01 Jul 2021 19:00:12 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bsdio.com header.s=xmission header.b=fStr+Sg7; spf=none, err=SPF record not found (domain: bsdio.com, ip: 166.70.13.231, mailfrom: rebecca@bsdio.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=bsdio.com; s=xmission; h=Subject:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID: From:References:To:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=tr6e37qF7CUH+mdwuotz0+HcGE32suA1yM2/tSIA4LY=; b=fStr+Sg7OyZ+tsh5LS5Q0f6ngz hVIDvrtlAjpbqHZxfAo30A4MubYvgn3fsZJsdS53W0y6UcDHbe0Cn9uX0hw+Fp06RfWYegwM4PrvG fViHHZR2hRsC33z5ogMrSUBcvMsYwlYTIiegLuGjIRNt5avrENfVUSjV3MLoEPHNnQfc=; Received: from in01.mta.xmission.com ([166.70.13.51]) by out01.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lz8TS-00EmKj-9Y; Thu, 01 Jul 2021 20:00:10 -0600 Received: from mta5.zcs.xmission.com ([166.70.13.69]:35966) by in01.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lz8TP-00CuSE-97; Thu, 01 Jul 2021 20:00:09 -0600 Received: from localhost (localhost [127.0.0.1]) by mta5.zcs.xmission.com (Postfix) with ESMTP id 0DBAE12816A2; Thu, 1 Jul 2021 20:00:07 -0600 (MDT) X-Amavis-Modified: Mail body modified (using disclaimer) - mta5.zcs.xmission.com Received: from mta5.zcs.xmission.com ([127.0.0.1]) by localhost (mta5.zcs.xmission.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2bURQt5qGCES; Thu, 1 Jul 2021 20:00:06 -0600 (MDT) Received: from photon.int.bsdio.com (c-174-52-16-57.hsd1.ut.comcast.net [174.52.16.57]) by mta5.zcs.xmission.com (Postfix) with ESMTPSA id A8E10128139F; Thu, 1 Jul 2021 20:00:06 -0600 (MDT) To: devel@edk2.groups.io, steven.shi@intel.com, Bret Barkelew , "rebecca@nuviainc.com" References: <1493b987-b1ed-cb10-8049-107ba1b6f3b0@nuviainc.com> <18761d7c-2069-93e2-b444-1ada9e0a8966@nuviainc.com> From: "Rebecca Cran" Message-ID: <1350abe8-83ba-3b4e-6b8d-8f872c73347d@bsdio.com> Date: Thu, 1 Jul 2021 20:00:06 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: X-XM-SPF: eid=1lz8TP-00CuSE-97;;;mid=<1350abe8-83ba-3b4e-6b8d-8f872c73347d@bsdio.com>;;;hst=in01.mta.xmission.com;;;ip=166.70.13.69;;;frm=rebecca@bsdio.com;;;spf=none X-SA-Exim-Connect-IP: 166.70.13.69 X-SA-Exim-Mail-From: rebecca@bsdio.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa07.xmission.com X-Spam-Level: *** X-Spam-Status: No, score=3.8 required=8.0 tests=ALL_TRUSTED,BAYES_20, DCC_CHECK_NEGATIVE,FVGT_m_MULTI_ODD,HTML_FONT_LOW_CONTRAST, HTML_MESSAGE,HTTPS_HTTP_MISMATCH,LotsOfNums_01,NICE_REPLY_A, T_TM2_M_HEADER_IN_MSG,TooManyTo_001,TooManyTo_002,TooManyTo_003, TooManyTo_004,XMSubLong,XM_B_Unicode,XM_B_Unsub autolearn=disabled version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -0.0 BAYES_20 BODY: Bayes spam probability is 5 to 20% * [score: 0.1245] * 0.7 XMSubLong Long Subject * 0.5 TooManyTo_002 Multiple "To" Header Recipients 3x (uncommon) * 0.3 TooManyTo_001 Multiple "To" Header Recipients 2x (uncommon) * 0.5 TooManyTo_004 Multiple "To" Header Recipients 5x (uncommon) * 0.6 TooManyTo_003 Multiple "To" Header Recipients 4x (uncommon) * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.0 XM_B_Unicode BODY: Testing for specific types of unicode * 1.2 LotsOfNums_01 BODY: Lots of long strings of numbers * 0.0 HTML_FONT_LOW_CONTRAST BODY: HTML font color similar or * identical to background * 0.1 HTTPS_HTTP_MISMATCH BODY: No description available. * 0.0 HTML_MESSAGE BODY: HTML included in message * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa07 1397; IP=ok Body=1 Fuz1=1] [Fuz2=1] * 0.4 FVGT_m_MULTI_ODD Contains multiple odd letter combinations * 0.5 XM_B_Unsub Unsubscribe in body of email but missing unsubscribe * header * -0.0 NICE_REPLY_A Looks like a legit reply (A) X-Spam-DCC: XMission; sa07 1397; IP=ok Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ***;devel@edk2.groups.io, steven.shi@intel.com, Bret Barkelew , "rebecca@nuviainc.com" X-Spam-Relay-Country: X-Spam-Timing: total 2285 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 11 (0.5%), b_tie_ro: 9 (0.4%), parse: 3.3 (0.1%), extract_message_metadata: 105 (4.6%), get_uri_detail_list: 25 (1.1%), tests_pri_-1000: 39 (1.7%), tests_pri_-950: 1.36 (0.1%), tests_pri_-900: 1.12 (0.0%), tests_pri_-90: 160 (7.0%), check_bayes: 130 (5.7%), b_tokenize: 60 (2.6%), b_tok_get_all: 19 (0.8%), b_comp_prob: 5 (0.2%), b_tok_touch_all: 42 (1.8%), b_finish: 0.97 (0.0%), tests_pri_0: 1889 (82.7%), check_dkim_signature: 2.9 (0.1%), check_dkim_adsp: 48 (2.1%), poll_dns_idle: 40 (1.8%), tests_pri_10: 3.1 (0.1%), tests_pri_500: 65 (2.8%), rewrite_mail: 0.00 (0.0%) Subject: Re: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in Linux? X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) X-Groupsio-MsgNum: 77433 Content-Type: multipart/alternative; boundary="------------52089C791F9FEE1AE4B10F3A" Content-Language: en-US --------------52089C791F9FEE1AE4B10F3A Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit That means you need to install the various mono assemblies, such as the libmono-system-net-http4.0-cil package in Ubuntu. I spent some time chasing down the dependencies last year which got very frustrating and tedious, but have forgotten which were needed. All I remember is there were quite a lot. -- Rebecca Cran On 7/1/21 7:36 PM, Steven Shi wrote: > > I already installed mono, but NuGet.exe still fails to work in my > side. I’m behind a proxy but don’t know how to configure the NuGet.exe > proxy in .pytool. Below is my verbose error message. > > (unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ stuart_update > -c .pytool/CISettings.py TOOL_CHAIN_TAG=GCC5 -v > > … … > > SECTION - Start Invocable Tool > > SECTION - Initial update of environment > > DEBUG - --- self_describing_environment.update_extdeps() > > DEBUG - Verify 'mu_nasm' returning 'False'. > > DEBUG - Verify 'edk2-acpica-iasl' returning 'False'. > > DEBUG - Creating 5 threads for the SDE update > > UpdatingDEBUG - Verify 'gcc_aarch64_linux' returning 'True'. > > DEBUG - Verify 'gcc_riscv64_unknown' returning 'True'. > > DEBUG - Verify 'mu_nasm' returning 'False'. > > DEBUG - Verify 'gcc_arm_linux' returning 'True'. > > DEBUG - Verify 'edk2-acpica-iasl' returning 'False'. > > DEBUG - Cleaning dependency directory for 'mu_nasm'... > > DEBUG - Cleaning dependency directory for 'edk2-acpica-iasl'... > > INFO - Cmd to run is: mono > /home/jshi19/wksp_efi/unit_test_env/lib/python3.8/site-packages/edk2toolext/bin/NuGet.exe > locals global-packages -list > > INFO - Cmd to run is: mono > /home/jshi19/wksp_efi/unit_test_env/lib/python3.8/site-packages/edk2toolext/bin/NuGet.exe > locals global-packages -list > > INFO - ------------------------------------------------ > > INFO - ------------------------------------------------ > > INFO - --------------Cmd Output Starting--------------- > > INFO - --------------Cmd Output Starting--------------- > > INFO - ------------------------------------------------ > > INFO - ------------------------------------------------ > > ...INFO - Could not load file or assembly 'System.Net.Http, > Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or > one of its dependencies. > > INFO -   Could not load file or assembly 'System.Net.Http, > Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or > one of its dependencies. > > INFO -   Could not load file or assembly 'System.Net.Http, > Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or > one of its dependencies. > > INFO -   Could not load file or assembly 'System.Net.Http, > Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or > one of its dependencies. > > INFO -   Could not load file or assembly 'System.Net.Http, > Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or > one of its dependencies. > > INFO - System.AggregateException: One or more errors occurred. (Could > not load file or assembly 'System.Net.Http, Version=4.0.0.0, > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its > dependencies.) (Could not load file or assembly 'System.Net.Http, > Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or > one of its dependencies.) (Could not load file or assembly > 'System.Net.Http, Version=4.0.0.0, Culture=neutral, > PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could > not load file or assembly 'System.Net.Http, Version=4.0.0.0, > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its > dependencies.) (Could not load file or assembly 'System.Net.Http, > Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or > one of its dependencies.) ---> System.IO.FileNotFoundException: Could > not load file or assembly 'System.Net.Http, Version=4.0.0.0, > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its > dependencies. > > INFO -    --- End of inner exception stack trace --- > > … … > > If I run the Cmd manually, I get below error: > > (unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ mono > /home/jshi19/wksp_efi/unit_test_env/lib/python3.8/site-packages/edk2toolext/bin/NuGet.exe > locals global-packages -list > > Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its > dependencies. > >   Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its > dependencies. > >   Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its > dependencies. > >   Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its > dependencies. > >   Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its > dependencies. > > System.AggregateException: One or more errors occurred. (Could not > load file or assembly 'System.Net.Http, Version=4.0.0.0, > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its > dependencies.) (Could not load file or assembly 'System.Net.Http, > Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or > one of its dependencies.) (Could not load file or assembly > 'System.Net.Http, Version=4.0.0.0, Culture=neutral, > PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could > not load file or assembly 'System.Net.Http, Version=4.0.0.0, > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its > dependencies.) (Could not load file or assembly 'System.Net.Http, > Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or > one of its dependencies.) ---> System.IO.FileNotFoundException: Could > not load file or assembly 'System.Net.Http, Version=4.0.0.0, > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its > dependencies. > >    --- End of inner exception stack trace --- > >   at NuGet.CommandLine.Program.Initialize (NuGet.IFileSystem > fileSystem, NuGet.CommandLine.IConsole console) [0x000ce] in > :0 > >   at NuGet.CommandLine.Program.MainCore (System.String > workingDirectory, System.String[] args) [0x000d8] in > :0 > > ---> (Inner Exception #0) System.IO.FileNotFoundException: Could not > load file or assembly 'System.Net.Http, Version=4.0.0.0, > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its > dependencies. > > File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, > PublicKeyToken=b03f5f7f11d50a3a'<--- > > ---> (Inner Exception #1) System.IO.FileNotFoundException: Could not > load file or assembly 'System.Net.Http, Version=4.0.0.0, > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its > dependencies. > > File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, > PublicKeyToken=b03f5f7f11d50a3a'<--- > > ---> (Inner Exception #2) System.IO.FileNotFoundException: Could not > load file or assembly 'System.Net.Http, Version=4.0.0.0, > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its > dependencies. > > File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, > PublicKeyToken=b03f5f7f11d50a3a'<--- > > ---> (Inner Exception #3) System.IO.FileNotFoundException: Could not > load file or assembly 'System.Net.Http, Version=4.0.0.0, > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its > dependencies. > > File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, > PublicKeyToken=b03f5f7f11d50a3a'<--- > > ---> (Inner Exception #4) System.IO.FileNotFoundException: Could not > load file or assembly 'System.Net.Http, Version=4.0.0.0, > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its > dependencies. > > File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, > PublicKeyToken=b03f5f7f11d50a3a'<--- > > Thanks > > *Steven Shi*** > > ** > > *From:* Bret Barkelew > *Sent:* Friday, July 2, 2021 9:04 AM > *To:* Shi, Steven ; devel@edk2.groups.io; > rebecca@nuviainc.com > *Subject:* RE: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests > work in Linux? > > I believe the Azure DevOps build agents that are used by the EDK2 CI > pipeline already have mono installed. > > - Bret > > *From: *Shi, Steven > *Sent: *Thursday, July 1, 2021 5:54 PM > *To: *devel@edk2.groups.io ; Bret > Barkelew ; rebecca@nuviainc.com > > *Subject: *RE: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests > work in Linux? > > Hi Bret, Rebecca, > > Thanks for the info. Does edk2 CI run the .pytool unit tests in Linux? > If yes, how does edk2 CI solve the nuget dependency problem in Linux > right now? > > Thanks > > *Steven Shi* > > ** > > *From:* devel@edk2.groups.io > > *On Behalf Of > *Bret Barkelew via groups.io > *Sent:* Wednesday, June 30, 2021 1:02 AM > *To:* devel@edk2.groups.io ; > rebecca@nuviainc.com ; Shi, Steven > > > *Subject:* Re: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests > work in Linux? > > Hmmm. If that works well, we might be able to investigate carrying > both and picking based on the host OS. > > - Bret > > *From:*devel@edk2.groups.io > > on behalf of > Rebecca Cran via groups.io > > *Sent:* Tuesday, June 29, 2021 9:42:41 AM > *To:* devel@edk2.groups.io > >; > steven.shi@intel.com > > > *Subject:* [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work > in Linux? > > Your Linux distribution should have a nuget package available (e.g. > https://packages.ubuntu.com/hirsute/nuget > ) > but the EDK2 CI is designed to use the copy of nuget installed with > the edk2toolext package. > > -- > Rebecca Cran > > On 6/29/21 9:44 AM, Steven Shi wrote: > > Cran, Thanks. I’m curious whether the .pytool has native Linux > executable binary to run? It looks the edk2 CI framework has more > dependency in Linux than Windows. > > Thanks > > *Steven Shi* > > *Intel\IAGS\SFP\FIA (Firmware Infrastructure Automation)* > > ** > > *From:* devel@edk2.groups.io > *On Behalf Of > * Rebecca Cran > *Sent:* Tuesday, June 29, 2021 8:13 PM > *To:* devel@edk2.groups.io ; Shi, > Steven > *Subject:* Re: [edk2-devel] Do the edk2 CI unit tests work in Linux? > > NuGet.exe is a .NET assembly/executable, so on Linux you'll need > to install Mono (https://www.mono-project.com/ > ). > > -- > > Rebecca Cran > > On 6/28/21 7:45 PM, Steven Shi wrote: > > Hello, > > I’m interested in the edk2 CI unit > tests(https://github.com/tianocore/edk2/tree/master/.pytool > ). > I tested it in my local. It works well in Windows but does not > work in Linux. It looks the NuGet in pytool only has windows > version > (C:\steven\unit_test_env\Lib\site-packages\edk2toolext\bin\NuGet.exe) > but not support the Linux. Below is my detail test steps. Do > the edk2 CI unit tests work in Linux? > > 1. Windows : > > c:\steven>py -m venv unit_test_env > > c:\steven>cd  c:\steven\edk2 > > c:\steven\edk2>c:\steven\unit_test_env\Scripts\activate.bat > > (unit_test_env) c:\steven\edk2>pip install --upgrade -r > pip-requirements.txt > > (unit_test_env) c:\steven\edk2>stuart_setup -c > .pytool/CISettings.py TOOL_CHAIN_TAG=VS2019 > > (unit_test_env) c:\steven\edk2>stuart_update -c > .pytool/CISettings.py TOOL_CHAIN_TAG=VS2019 > > (unit_test_env) c:\steven\edk2>edksetup.bat > > (unit_test_env) c:\steven\edk2>edksetup.bat Rebuild > > (unit_test_env) c:\steven\edk2>stuart_ci_build -c > .pytool/CISettings.py TOOL_CHAIN_TAG=VS2019 -a X64,IA32 -t > DEBUG --verbose > > … > > PROGRESS - Overall Build Status: Success > > SECTION - Summary > > PROGRESS - Success > > 2. Linux: > > jshi19@ub2-uefi-b01:~/wksp_efi$ python3 -m venv unit_test_env > > jshi19@ub2-uefi-b01:~/wksp_efi$ source unit_test_env/bin/activate > > (unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ pip > install --upgrade -r pip-requirements.txt > > (unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ make -C > BaseTools/ > > (unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ > stuart_setup -c .pytool/CISettings.py TOOL_CHAIN_TAG=GCC5 > > (unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ > stuart_update -c .pytool/CISettings.py TOOL_CHAIN_TAG=GCC5 > > SECTION - Init SDE > > WARNING - Using Pip Tools based BaseTools > > SECTION - Loading Plugins > > SECTION - Start Invocable Tool > > SECTION - Initial update of environment > > UpdatingWARNING - [SDE] Failed to fetch NugetDependecy: > edk2-acpica-iasl@20200717.0.0 > : [Nuget] We failed to > install this version 20200717.0.0 of edk2-acpica-iasl > > WARNING - [SDE] Failed to fetch NugetDependecy: > mu_nasm@2.15.05 : [Nuget] We failed to > install this version 2.15.05 of mu_nasm > > . Done > > SECTION -       Updated/Verified 3 dependencies > > SECTION - Second pass update of environment > > UpdatingWARNING - [SDE] Failed to fetch NugetDependecy: > edk2-acpica-iasl@20200717.0.0 > : [Nuget] We failed to > install this version 20200717.0.0 of edk2-acpica-iasl > > WARNING - [SDE] Failed to fetch NugetDependecy: > mu_nasm@2.15.05 : [Nuget] We failed to > install this version 2.15.05 of mu_nasm > > . Done > > SECTION -       Updated/Verified 3 dependencies > > ERROR - We were unable to successfully update 2 dependencies > in environment > > SECTION - Summary > > ERROR - Error > > Thanks > > *Steven Shi* > > ** > > ** > > --------------52089C791F9FEE1AE4B10F3A Content-Type: multipart/related; boundary="------------E2AAEC0B237EB516B23CB57C" --------------E2AAEC0B237EB516B23CB57C Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit

That means you need to install the various mono assemblies, such as the libmono-system-net-http4.0-cil package in Ubuntu.

I spent some time chasing down the dependencies last year which got very frustrating and tedious, but have forgotten which were needed. All I remember is there were quite a lot.


--
Rebecca Cran


On 7/1/21 7:36 PM, Steven Shi wrote:

I already installed mono, but NuGet.exe still fails to work in my side. I’m behind a proxy but don’t know how to configure the NuGet.exe proxy in .pytool. Below is my verbose error message.

 

(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ stuart_update -c .pytool/CISettings.py TOOL_CHAIN_TAG=GCC5 -v

… …

SECTION - Start Invocable Tool

SECTION - Initial update of environment

DEBUG - --- self_describing_environment.update_extdeps()

DEBUG - Verify 'mu_nasm' returning 'False'.

DEBUG - Verify 'edk2-acpica-iasl' returning 'False'.

DEBUG - Creating 5 threads for the SDE update

UpdatingDEBUG - Verify 'gcc_aarch64_linux' returning 'True'.

DEBUG - Verify 'gcc_riscv64_unknown' returning 'True'.

DEBUG - Verify 'mu_nasm' returning 'False'.

DEBUG - Verify 'gcc_arm_linux' returning 'True'.

DEBUG - Verify 'edk2-acpica-iasl' returning 'False'.

DEBUG - Cleaning dependency directory for 'mu_nasm'...

DEBUG - Cleaning dependency directory for 'edk2-acpica-iasl'...

INFO - Cmd to run is: mono /home/jshi19/wksp_efi/unit_test_env/lib/python3.8/site-packages/edk2toolext/bin/NuGet.exe locals global-packages -list

INFO - Cmd to run is: mono /home/jshi19/wksp_efi/unit_test_env/lib/python3.8/site-packages/edk2toolext/bin/NuGet.exe locals global-packages -list

INFO - ------------------------------------------------

INFO - ------------------------------------------------

INFO - --------------Cmd Output Starting---------------

INFO - --------------Cmd Output Starting---------------

INFO - ------------------------------------------------

INFO - ------------------------------------------------

...INFO - Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

INFO -   Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

INFO -   Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

INFO -   Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

INFO -   Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

INFO - System.AggregateException: One or more errors occurred. (Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

INFO -    --- End of inner exception stack trace ---

… …

 

 

If I run the Cmd manually, I get below error:

(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ mono /home/jshi19/wksp_efi/unit_test_env/lib/python3.8/site-packages/edk2toolext/bin/NuGet.exe locals global-packages -list

Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

  Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

  Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

  Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

  Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

System.AggregateException: One or more errors occurred. (Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) (Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.) ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

   --- End of inner exception stack trace ---

  at NuGet.CommandLine.Program.Initialize (NuGet.IFileSystem fileSystem, NuGet.CommandLine.IConsole console) [0x000ce] in <ff502667b3fe4a85827635c6fe6b0d0d>:0

  at NuGet.CommandLine.Program.MainCore (System.String workingDirectory, System.String[] args) [0x000d8] in <ff502667b3fe4a85827635c6fe6b0d0d>:0

---> (Inner Exception #0) System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'<---

 

---> (Inner Exception #1) System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'<---

 

---> (Inner Exception #2) System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'<---

 

---> (Inner Exception #3) System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'<---

 

---> (Inner Exception #4) System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

File name: 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'<---

 

 

Thanks

 

Steven Shi

 

 

From: Bret Barkelew <Bret.Barkelew@microsoft.com>
Sent: Friday, July 2, 2021 9:04 AM
To: Shi, Steven <steven.shi@intel.com>; devel@edk2.groups.io; rebecca@nuviainc.com
Subject: RE: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?

 

I believe the Azure DevOps build agents that are used by the EDK2 CI pipeline already have mono installed.

 

- Bret

 

From: Shi, Steven
Sent: Thursday, July 1, 2021 5:54 PM
To: devel@edk2.groups.io; Bret Barkelew; rebecca@nuviainc.com
Subject: RE: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?

 

Hi Bret, Rebecca,

Thanks for the info. Does edk2 CI run the .pytool unit tests in Linux? If yes, how does edk2 CI solve the nuget dependency problem in Linux right now?

 

 

Thanks

 

Steven Shi

 

 

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bret Barkelew via groups.io
Sent: Wednesday, June 30, 2021 1:02 AM
To: devel@edk2.groups.io; rebecca@nuviainc.com; Shi, Steven <steven.shi@intel.com>
Subject: Re: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?

 

Hmmm. If that works well, we might be able to investigate carrying both and picking based on the host OS.

 

- Bret

From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Rebecca Cran via groups.io <rebecca=nuviainc.com@groups.io>
Sent: Tuesday, June 29, 2021 9:42:41 AM
To: devel@edk2.groups.io <devel@edk2.groups.io>; steven.shi@intel.com <steven.shi@intel.com>
Subject: [EXTERNAL] Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?

 

Your Linux distribution should have a nuget package available (e.g. https://packages.ubuntu.com/hirsute/nuget) but the EDK2 CI is designed to use the copy of nuget installed with the edk2toolext package.

 

--
Rebecca Cran

 

On 6/29/21 9:44 AM, Steven Shi wrote:

Cran, Thanks. I’m curious whether the .pytool has native Linux executable binary to run? It looks the edk2 CI framework has more dependency in Linux than Windows.

 

 

Thanks

 

Steven Shi

Intel\IAGS\SFP\FIA (Firmware Infrastructure Automation)

 

 

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Rebecca Cran
Sent: Tuesday, June 29, 2021 8:13 PM
To: devel@edk2.groups.io; Shi, Steven <steven.shi@intel.com>
Subject: Re: [edk2-devel] Do the edk2 CI unit tests work in Linux?

 

NuGet.exe is a .NET assembly/executable, so on Linux you'll need to install Mono (https://www.mono-project.com/).

 

--

Rebecca Cran

 

 

On 6/28/21 7:45 PM, Steven Shi wrote:

Hello,

I’m interested in the edk2 CI unit tests(https://github.com/tianocore/edk2/tree/master/.pytool). I tested it in my local. It works well in Windows but does not work in Linux. It looks the NuGet in pytool only has windows version (C:\steven\unit_test_env\Lib\site-packages\edk2toolext\bin\NuGet.exe) but not support the Linux. Below is my detail test steps. Do the edk2 CI unit tests work in Linux?

 

  1. Windows :

c:\steven>py -m venv unit_test_env

c:\steven>cd  c:\steven\edk2

c:\steven\edk2>c:\steven\unit_test_env\Scripts\activate.bat

(unit_test_env) c:\steven\edk2>pip install --upgrade -r pip-requirements.txt

(unit_test_env) c:\steven\edk2>stuart_setup -c .pytool/CISettings.py TOOL_CHAIN_TAG=VS2019

(unit_test_env) c:\steven\edk2>stuart_update -c .pytool/CISettings.py TOOL_CHAIN_TAG=VS2019

(unit_test_env) c:\steven\edk2>edksetup.bat

(unit_test_env) c:\steven\edk2>edksetup.bat Rebuild

(unit_test_env) c:\steven\edk2>stuart_ci_build -c .pytool/CISettings.py TOOL_CHAIN_TAG=VS2019 -a X64,IA32 -t DEBUG --verbose

PROGRESS - Overall Build Status: Success

SECTION - Summary

PROGRESS - Success

 

  1. Linux:

jshi19@ub2-uefi-b01:~/wksp_efi$ python3 -m venv unit_test_env

jshi19@ub2-uefi-b01:~/wksp_efi$ source unit_test_env/bin/activate

(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ pip install --upgrade -r pip-requirements.txt

(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ make -C BaseTools/

(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ stuart_setup -c .pytool/CISettings.py TOOL_CHAIN_TAG=GCC5

(unit_test_env) jshi19@ub2-uefi-b01:~/wksp_efi/edk2-2$ stuart_update -c .pytool/CISettings.py TOOL_CHAIN_TAG=GCC5

SECTION - Init SDE

WARNING - Using Pip Tools based BaseTools

SECTION - Loading Plugins

SECTION - Start Invocable Tool

SECTION - Initial update of environment

UpdatingWARNING - [SDE] Failed to fetch NugetDependecy: edk2-acpica-iasl@20200717.0.0: [Nuget] We failed to install this version 20200717.0.0 of edk2-acpica-iasl

WARNING - [SDE] Failed to fetch NugetDependecy: mu_nasm@2.15.05: [Nuget] We failed to install this version 2.15.05 of mu_nasm

. Done

SECTION -       Updated/Verified 3 dependencies

SECTION - Second pass update of environment

UpdatingWARNING - [SDE] Failed to fetch NugetDependecy: edk2-acpica-iasl@20200717.0.0: [Nuget] We failed to install this version 20200717.0.0 of edk2-acpica-iasl

WARNING - [SDE] Failed to fetch NugetDependecy: mu_nasm@2.15.05: [Nuget] We failed to install this version 2.15.05 of mu_nasm

. Done

SECTION -       Updated/Verified 3 dependencies

ERROR - We were unable to successfully update 2 dependencies in environment

SECTION - Summary

ERROR - Error

 

 

 

 

Thanks

 

Steven Shi

 

 

 

 



--------------E2AAEC0B237EB516B23CB57C Content-Type: image/png; name="image005.png" Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: inline; filename="image005.png" iVBORw0KGgoAAAANSUhEUgAAAisAAAACCAYAAACZkpz/AAAAAXNSR0IArs4c6QAAAAlwSFlzAAAO xAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUATWljcm9zb2Z0IE9mZmljZX/tNXEAAABDSURBVFhH 7dAxEQAgDACxDijC/4ACDOCChYkWGwx5BX9pY66bVSdEgAABAgQIEPhQoGXWurH7h2+WCBAgQIAA AQLxAIkkDVkDoC+rAAAAAElFTkSuQmCC --------------E2AAEC0B237EB516B23CB57C-- --------------52089C791F9FEE1AE4B10F3A--