Skip to content

Commit

Permalink
add atomic runner hooks (#158)
Browse files Browse the repository at this point in the history
* add atomic runner hooks

* add atomic runner hooks

* add atomic runner hooks

* add atomic runner hooks

* add atomic runner hooks
  • Loading branch information
clr2of8 authored Oct 4, 2023
1 parent 4570269 commit 044780b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Public/Invoke-AtomicRunner.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,17 @@ function Invoke-AtomicRunner {
$tr.InputArgs = ConvertFrom-StringData -StringData $theArgs
}
$sc = $tr.AtomicsFolder
if ($Cleanup) { if (Get-Command 'Invoke-AtomicRunnerPreAtomicCleanupHook' -errorAction SilentlyContinue) { Invoke-AtomicRunnerPreAtomicCleanupHook } }
elseif (-not($ShowDetails -or $CheckPrereqs -or $ShowDetailsBrief -or $GetPrereqs)) { if (Get-Command 'Invoke-AtomicRunnerPreAtomicHook' -errorAction SilentlyContinue) { Invoke-AtomicRunnerPreAtomicHook } }
#Run the Test based on if scheduleContext is 'private' or 'public'
if (($sc -eq 'public') -or ($null -eq $sc)) {
Invoke-AtomicTest $tr.Technique -TestGuids $tr.auto_generated_guid -InputArgs $tr.InputArgs -TimeoutSeconds $tr.TimeoutSeconds -ExecutionLogPath $artConfig.execLogPath -PathToAtomicsFolder $artConfig.PathToPublicAtomicsFolder @htvars -Cleanup:$Cleanup -supressPathToAtomicsFolder
}
elseif ($sc -eq 'private') {
Invoke-AtomicTest $tr.Technique -TestGuids $tr.auto_generated_guid -InputArgs $tr.InputArgs -TimeoutSeconds $tr.TimeoutSeconds -ExecutionLogPath $artConfig.execLogPath -PathToAtomicsFolder $artConfig.PathToPrivateAtomicsFolder @htvars -Cleanup:$Cleanup -supressPathToAtomicsFolder
}
if ($Cleanup) { if (Get-Command 'Invoke-AtomicRunnerPostAtomicCleanupHook' -errorAction SilentlyContinue) { Invoke-AtomicRunnerPostAtomicCleanupHook } }
elseif (-not($ShowDetails -or $CheckPrereqs -or $ShowDetailsBrief -or $GetPrereqs)) { if (Get-Command 'Invoke-AtomicRunnerPostAtomicHook' -errorAction SilentlyContinue) { Invoke-AtomicRunnerPostAtomicHook } }
}

function Rename-ThisComputer ($tr, $basehostname) {
Expand Down

0 comments on commit 044780b

Please sign in to comment.