Pester icon indicating copy to clipboard operation
Pester copied to clipboard

Add FreeBSD support

Open Thefrank opened this issue 2 years ago • 1 comments

PR Summary

  • Adds platform detection support for FreeBSD
  • Adds a FreeBSD test
  • Updates a few existing tests to be executed under FreeBSD

PR Checklist

  • [x] PR has meaningful title
  • [x] Summary describes changes
  • [ ] PR is ready to be merged
  • [x] Tests are added/update (if required)
  • [ ] Documentation is updated/added (if required)

A few notes

  • This PR should not be merged until https://github.com/PowerShell/PowerShell-Native/pull/92 and https://github.com/PowerShell/PowerShell/pull/20041 are merged. The first fixes the build and test issues of the native library PS uses so it works under FreeBSD the second one adds build and operation support to PS under FreeBSD
  • FreeBSD has a platform in dotNET and community support for building/using it.
  • Tests were executed against my fork (pending PR) of Powershell port for FreeBSD (https://github.com/Thefrank/PowerShell/tree/freebsd). build ./build.ps1 -Clean -Inline. test: Import-Module .\bin\Pester.psd1 -Force then ./test.ps1 -CI -PassThru -NoBuild
    • Two tests report a single failure: Pester.RSpec.InNewProcess.ts.ps1 and Pester.RSpec.Output.ts.ps1
      • RSpec.InNewProcess: Keeps original exit code from Invoke-Pester fails returning a "Check the spelling" instead of the expected ExitCode=2
      • RSpec.Output: Multiline string has ansi style at start of every line and reset at end of last line fails returning a '\Hello World\' is not recognized as a name of a cmdlet

Thefrank avatar Jul 31 '23 18:07 Thefrank

LGTM so far.

nohwnd avatar Aug 01 '23 09:08 nohwnd

@Thefrank this is still a draft, do you have plans to finish this? Closing for now, let me know if you want to continue.

nohwnd avatar Jul 02 '24 09:07 nohwnd

Sorry about leaving this open for so long!

It is stalled upstream from the two listed PRs. I will reopen/remake this if the required support is merged.

Thefrank avatar Jul 02 '24 14:07 Thefrank