Skip to content

Find out why 9 known failing tests on PowerShell Core pass in AppVeyor environment #964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bergmeister opened this issue Apr 8, 2018 · 3 comments

Comments

@bergmeister
Copy link
Collaborator

bergmeister commented Apr 8, 2018

We recently added PowerShell Core CI on Windows and Ubuntu and the number of tests that I had to fix for that were surprisingly small.
Locally, I always have 9 failures for PowerShell Core (both OS) but not in AppVeyor and when running the tests in the hosted Linux agent of VSTS confirm that it is probably AppVeyor that is hiding something.
We should find out about this BEFORE we fix the tests. The tests seem to have always failed for PowerShell Core by rerunning them on an old commit from January this year, therefore this is just technical debt due to the non-existence of PowerShell Core CI before.
The tests in question are listed in #944:
pssa_corefailures1
pssa_corefailures2

P.S. Below is a snippet to run the tests in the PowerShell v2 task in VSTS:

Import-Module .\tools\appveyor.psm1; Invoke-AppveyorInstall
if ($IsCoreClr) {
  Invoke-AppveyorBuild -CheckoutPath $env:BUILD_SOURCESDIRECTORY -BuildConfiguration Release -BuildType 'NetStandard'
}
else {
  Invoke-AppveyorBuild -CheckoutPath $env:BUILD_SOURCESDIRECTORY -BuildConfiguration Release -BuildType 'FullCLR'
}

$modulePath = $env:PSModulePath.Split([System.IO.Path]::PathSeparator) | Where-Object { Test-Path $_} | Select-Object -First 1
Copy-Item "$env:BUILD_SOURCESDIRECTORY\out\PSScriptAnalyzer" "$modulePath\" -Recurse -Force
$testScripts = "$env:BUILD_SOURCESDIRECTORY\Tests\Engine","$env:BUILD_SOURCESDIRECTORY\Tests\Rules"
$testResults = Invoke-Pester -Script $testScripts -OutputFormat NUnitXml -OutputFile "TestResults.xml" -PassThru
@bergmeister
Copy link
Collaborator Author

bergmeister commented Apr 26, 2018

@kalgiz If you are interested, this would be a good and important issue to look into. It would be good to find out why the tests pass in AppVeyor or find a way of making them fail. Only after we have clarity about what happens in AppVeyor, the tests should be fixed.

@bergmeister
Copy link
Collaborator Author

Note that I found that at least on Windows, there can be environments (OS or hardware) where all tests pass for some reason...

@bergmeister
Copy link
Collaborator Author

Issue is outdated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant