Skip to content

Commit

Permalink
add -NoBuild for P-tests (pester#2200)
Browse files Browse the repository at this point in the history
  • Loading branch information
fflaten authored Jun 30, 2022
1 parent 927b855 commit ed6135b
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Get-Module Pester | Remove-Module
if (-not $SkipPTests) {
$result = @(Get-ChildItem $PSScriptRoot/tst/*.ts.ps1 -Recurse |
foreach {
$r = & $_.FullName -PassThru
$r = & $_.FullName -PassThru -NoBuild:$NoBuild
if ($r.Failed -gt 0) {
[PSCustomObject]@{
FullName = $_.FullName
Expand Down
4 changes: 2 additions & 2 deletions tst/Pester.Mock.RSpec.ts.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
param ([switch] $PassThru)
param ([switch] $PassThru, [switch] $NoBuild)

Get-Module Pester.Runtime, Pester.Utility, P, Pester, Axiom, Stack | Remove-Module

Import-Module $PSScriptRoot\p.psm1 -DisableNameChecking
Import-Module $PSScriptRoot\axiom\Axiom.psm1 -DisableNameChecking

& "$PSScriptRoot\..\build.ps1"
if (-not $NoBuild) { & "$PSScriptRoot\..\build.ps1" }
Import-Module $PSScriptRoot\..\bin\Pester.psd1

$global:PesterPreference = [PesterConfiguration] @{
Expand Down
4 changes: 2 additions & 2 deletions tst/Pester.RSpec.BackCompat.ts.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
param ([switch] $PassThru)
param ([switch] $PassThru, [switch] $NoBuild)

Get-Module Pester.Runtime, Pester.Utility, P, Pester, Axiom, Stack | Remove-Module

Import-Module $PSScriptRoot\p.psm1 -DisableNameChecking
Import-Module $PSScriptRoot\axiom\Axiom.psm1 -DisableNameChecking

& "$PSScriptRoot\..\build.ps1"
if (-not $NoBuild) { & "$PSScriptRoot\..\build.ps1" }
Import-Module $PSScriptRoot\..\bin\Pester.psd1

$global:PesterPreference = @{
Expand Down
4 changes: 2 additions & 2 deletions tst/Pester.RSpec.Configuration.ts.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
param ([switch] $PassThru)
param ([switch] $PassThru, [switch] $NoBuild)

Get-Module Pester.Runtime, Pester.Utility, P, Pester, Axiom, Stack | Remove-Module

Import-Module $PSScriptRoot\p.psm1 -DisableNameChecking
Import-Module $PSScriptRoot\axiom\Axiom.psm1 -DisableNameChecking

& "$PSScriptRoot\..\build.ps1"
if (-not $NoBuild) { & "$PSScriptRoot\..\build.ps1" }
Import-Module $PSScriptRoot\..\bin\Pester.psd1

$global:PesterPreference = @{
Expand Down
4 changes: 2 additions & 2 deletions tst/Pester.RSpec.Coverage.ts.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
param ([switch] $PassThru)
param ([switch] $PassThru, [switch] $NoBuild)

Get-Module Pester.Runtime, Pester.Utility, P, Pester, Axiom, Stack | Remove-Module

Import-Module $PSScriptRoot\p.psm1 -DisableNameChecking
Import-Module $PSScriptRoot\axiom\Axiom.psm1 -DisableNameChecking

& "$PSScriptRoot\..\build.ps1"
if (-not $NoBuild) { & "$PSScriptRoot\..\build.ps1" }
Import-Module $PSScriptRoot\..\bin\Pester.psd1

$global:PesterPreference = @{
Expand Down
4 changes: 2 additions & 2 deletions tst/Pester.RSpec.Demo.ts.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
param ([switch] $PassThru)
param ([switch] $PassThru, [switch] $NoBuild)

Get-Module Pester.Runtime, Pester.Utility, P, Pester, Axiom, Stack | Remove-Module

Import-Module $PSScriptRoot\p.psm1 -DisableNameChecking
Import-Module $PSScriptRoot\axiom\Axiom.psm1 -DisableNameChecking

& "$PSScriptRoot\..\build.ps1"
if (-not $NoBuild) { & "$PSScriptRoot\..\build.ps1" }
Import-Module $PSScriptRoot\..\bin\Pester.psd1

$global:PesterPreference = [PesterConfiguration]@{
Expand Down
4 changes: 2 additions & 2 deletions tst/Pester.RSpec.InNewProcess.ts.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
param ([switch] $PassThru)
param ([switch] $PassThru, [switch] $NoBuild)

Get-Module Pester.Runtime, Pester.Utility, P, Pester, Axiom, Stack | Remove-Module

Import-Module $PSScriptRoot\p.psm1 -DisableNameChecking
Import-Module $PSScriptRoot\axiom\Axiom.psm1 -DisableNameChecking

& "$PSScriptRoot\..\build.ps1"
if (-not $NoBuild) { & "$PSScriptRoot\..\build.ps1" }
Import-Module $PSScriptRoot\..\bin\Pester.psd1

$global:PesterPreference = @{
Expand Down
4 changes: 2 additions & 2 deletions tst/Pester.RSpec.Junit.TestResults.ts.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
param ([switch] $PassThru)
param ([switch] $PassThru, [switch] $NoBuild)

Get-Module Pester.Runtime, Pester.Utility, P, Pester, Axiom, Stack | Remove-Module

Import-Module $PSScriptRoot\p.psm1 -DisableNameChecking
Import-Module $PSScriptRoot\axiom\Axiom.psm1 -DisableNameChecking

& "$PSScriptRoot\..\build.ps1"
if (-not $NoBuild) { & "$PSScriptRoot\..\build.ps1" }
Import-Module $PSScriptRoot\..\bin\Pester.psd1

$global:PesterPreference = @{
Expand Down
4 changes: 2 additions & 2 deletions tst/Pester.RSpec.Nunit.TestResults.ts.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
param ([switch] $PassThru)
param ([switch] $PassThru, [switch] $NoBuild)

Get-Module Pester.Runtime, Pester.Utility, P, Pester, Axiom, Stack | Remove-Module

Import-Module $PSScriptRoot\p.psm1 -DisableNameChecking
Import-Module $PSScriptRoot\axiom\Axiom.psm1 -DisableNameChecking

& "$PSScriptRoot\..\build.ps1"
if (-not $NoBuild) { & "$PSScriptRoot\..\build.ps1" }
Import-Module $PSScriptRoot\..\bin\Pester.psd1

$global:PesterPreference = @{
Expand Down
4 changes: 2 additions & 2 deletions tst/Pester.RSpec.Output.ts.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
param ([switch] $PassThru)
param ([switch] $PassThru, [switch] $NoBuild)

Get-Module Pester.Runtime, Pester.Utility, P, Pester, Axiom, Stack | Remove-Module

Import-Module $PSScriptRoot\p.psm1 -DisableNameChecking
Import-Module $PSScriptRoot\axiom\Axiom.psm1 -DisableNameChecking

& "$PSScriptRoot\..\build.ps1"
if (-not $NoBuild) { & "$PSScriptRoot\..\build.ps1" }
Import-Module $PSScriptRoot\..\bin\Pester.psd1

$global:PesterPreference = @{
Expand Down
4 changes: 2 additions & 2 deletions tst/Pester.RSpec.Pester4ResultObject.ts.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
param ([switch] $PassThru)
param ([switch] $PassThru, [switch] $NoBuild)
# excluding this, as it produces errors because errors are processed differently between v4 and v5, but it is still useful to have around to confirm the overall shape of the result object is correct
return (i -PassThru:$PassThru { })

Expand All @@ -7,7 +7,7 @@ Get-Module Pester.Runtime, Pester.Utility, P, Pester, Axiom, Stack | Remove-Modu
Import-Module $PSScriptRoot\p.psm1 -DisableNameChecking
Import-Module $PSScriptRoot\axiom\Axiom.psm1 -DisableNameChecking

& "$PSScriptRoot\..\build.ps1"
if (-not $NoBuild) { & "$PSScriptRoot\..\build.ps1" }
Import-Module $PSScriptRoot\..\bin\Pester.psd1


Expand Down
4 changes: 2 additions & 2 deletions tst/Pester.RSpec.ts.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
param ([switch] $PassThru)
param ([switch] $PassThru, [switch] $NoBuild)

Get-Module Pester.Runtime, Pester.Utility, P, Pester, Axiom, Stack | Remove-Module

Import-Module $PSScriptRoot\p.psm1 -DisableNameChecking
Import-Module $PSScriptRoot\axiom\Axiom.psm1 -DisableNameChecking

& "$PSScriptRoot\..\build.ps1"
if (-not $NoBuild) { & "$PSScriptRoot\..\build.ps1" }
Import-Module $PSScriptRoot\..\bin\Pester.psd1

$global:PesterPreference = @{
Expand Down
4 changes: 2 additions & 2 deletions tst/Pester.Rspec.Filtering.ts.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
param ([switch] $PassThru)
param ([switch] $PassThru, [switch] $NoBuild)

Get-Module Pester.Runtime, Pester.Utility, P, Pester, Axiom, Stack | Remove-Module

Import-Module $PSScriptRoot\p.psm1 -DisableNameChecking
Import-Module $PSScriptRoot\axiom\Axiom.psm1 -DisableNameChecking

& "$PSScriptRoot\..\build.ps1"
if (-not $NoBuild) { & "$PSScriptRoot\..\build.ps1" }
Import-Module $PSScriptRoot\..\bin\Pester.psd1

$global:PesterPreference = @{
Expand Down
4 changes: 2 additions & 2 deletions tst/functions/New-Fixture.ts.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
param ([switch] $PassThru)
param ([switch] $PassThru, [switch] $NoBuild)

Get-Module Pester.Runtime, Pester.Utility, P, Pester, Axiom, Stack | Remove-Module

Import-Module $PSScriptRoot\..\p.psm1 -DisableNameChecking
Import-Module $PSScriptRoot\..\axiom\Axiom.psm1 -DisableNameChecking

& "$PSScriptRoot\..\..\build.ps1"
if (-not $NoBuild) { & "$PSScriptRoot\..\..\build.ps1" }
Import-Module $PSScriptRoot\..\..\bin\Pester.psd1

$global:PesterPreference = @{
Expand Down
4 changes: 2 additions & 2 deletions tst/functions/Pester.TestDrive.ts.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
param ([switch] $PassThru)
param ([switch] $PassThru, [switch] $NoBuild)

Get-Module Pester.Runtime, Pester.Utility, P, Pester, Axiom, Stack | Remove-Module

Import-Module $PSScriptRoot\..\p.psm1 -DisableNameChecking
Import-Module $PSScriptRoot\..\axiom\Axiom.psm1 -DisableNameChecking

& "$PSScriptRoot\..\..\build.ps1"
if (-not $NoBuild) { & "$PSScriptRoot\..\..\build.ps1" }
Import-Module $PSScriptRoot\..\..\bin\Pester.psd1

$global:PesterPreference = @{
Expand Down
4 changes: 2 additions & 2 deletions tst/functions/Pester.TestRegistry.ts.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
param ([switch] $PassThru)
param ([switch] $PassThru, [switch] $NoBuild)


Get-Module Pester.Runtime, Pester.Utility, P, Pester, Axiom, Stack | Remove-Module
Expand All @@ -11,7 +11,7 @@ if ($PSVersionTable.PSVersion.Major -gt 5 -and -not $IsWindows) {
return (i -PassThru:$PassThru { })
}

& "$PSScriptRoot\..\..\build.ps1"
if (-not $NoBuild) { & "$PSScriptRoot\..\..\build.ps1" }
Import-Module $PSScriptRoot\..\..\bin\Pester.psd1

$global:PesterPreference = @{
Expand Down

0 comments on commit ed6135b

Please sign in to comment.