Closed brandongregoryscott closed 3 years ago
Update: Confirmed that this runs on my Macbook Pro just fine:
> and-cli@1.2.0 test /Users/Brandon/acc/fork/AndcultureCode.Cli
> jest "and-cli-dotnet-test"
PASS ./and-cli-dotnet-test.test.js (60.808s)
and-cli-dotnet-test
Run by project
when no solution can be found
✓ it displays an error (364ms)
when solution exists
✓ given a passing test suite, it prints success message (16895ms)
✓ given a solution with multiple projects, it runs each project individually (22734ms)
Run by solution
when no solution can be found
✓ it displays an error (330ms)
when solution exists
✓ given a passing test suite, it prints success message (17937ms)
given '-h'
✓ it displays the help menu (329ms)
given '--help'
✓ it displays the help menu (326ms)
----------------------------|---------|----------|---------|---------|-------------------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------------------------|---------|----------|---------|---------|-------------------------------
All files | 46.19 | 19.9 | 33.88 | 46.74 |
modules | 30.26 | 1.79 | 5.88 | 30.65 |
commands.js | 100 | 100 | 100 | 100 |
constants.js | 100 | 100 | 100 | 100 |
dir.js | 41.67 | 0 | 0 | 41.67 | 21-35
dotnet-build.js | 40 | 0 | 0 | 40 | 22-60
dotnet-clean.js | 29.55 | 0 | 0 | 29.55 | 29-36,46-64,75-116
dotnet-path.js | 22.22 | 5.88 | 15.38 | 22.22 | 82-200,211,228-274
dotnet-restore.js | 40 | 0 | 0 | 40 | 20-51
dotnet-test.js | 22.12 | 0 | 6.25 | 22.12 | 71-95,108-127,138-148,154-312
echo.js | 20 | 0 | 0 | 20.59 | 32-87
file.js | 25 | 0 | 0 | 25 | 28-63
formatters.js | 62.5 | 0 | 14.29 | 100 | 33-34
variables.js | 100 | 100 | 100 | 100 |
tests | 70.73 | 36.73 | 60.53 | 71.31 |
shared-specs.js | 94.44 | 60 | 91.67 | 94.44 | 63,123
test-utils.js | 60.92 | 30.77 | 46.15 | 61.63 | 48,99,113,182,226-351
utilities | 86.67 | 50 | 93.33 | 87.67 |
command-string-factory.js | 92 | 33.33 | 100 | 91.67 | 59-60
option-string-factory.js | 84 | 57.14 | 88.89 | 85.71 | 30,83,87,95-96,102-103
----------------------------|---------|----------|---------|---------|-------------------------------
Test Suites: 1 passed, 1 total
Tests: 7 passed, 7 total
Snapshots: 0 total
Time: 60.987s, estimated 75s
Ran all test suites matching /and-cli-dotnet-test/i.
.NET Core SDK (reflecting any global.json):
Version: 3.1.102
Commit: 573d158fea
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
Base Path: /usr/local/share/dotnet/sdk/3.1.102/
Host (useful for support):
Version: 3.1.2
Commit: 916b5cba26
.NET Core SDKs installed:
2.1.4 [/usr/local/share/dotnet/sdk]
2.1.300 [/usr/local/share/dotnet/sdk]
2.2.207 [/usr/local/share/dotnet/sdk]
2.2.402 [/usr/local/share/dotnet/sdk]
3.1.102 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Stumbled upon this issue this morning - might be related. Investigate the way that TestUtils
sets the HOME
env variable when spawning processes, and maybe try the NUGET_PACKAGES
env variable: https://github.com/NuGet/Home/issues/2960
Update: It looks like it is related to the stripped down environment variables that we are assigning spawned processes from TestUtils
. Merging overrides into process.env
seems to fix the issue. Look into adding a Windows job to validate builds for our most common use-case environment. Would be awesome to integration test for dotnet core 2.x as well as 3.x, but if not possible, let's prefer the newer version.
This should be fixed after pulling in the latest code from upstream/main into your fork. Feel free to post here with additional info if you are still seeing issues after cleaning, rebuilding and running the test:integration
script.
Not sure what's going on here, this will require some digging. It fails running the whole suite, or just filtered down to
and-cli-dotnet-test
:This is my current
dotnet --info
output:The Travis script runs the build on .NET Core 2.2.1, so something must have changed between there. Investigate possible issues with the way the dotnet cli scaffolds solutions/projects.