From 293e0b4c5e12c19f36d1d24b1abbc7c0612fc1b7 Mon Sep 17 00:00:00 2001 From: silverqx Date: Tue, 28 Dec 2021 17:29:15 +0100 Subject: [PATCH] added Unix support for InvokeXTimes --- tools/InvokeXTimes.ps1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) mode change 100644 => 100755 tools/InvokeXTimes.ps1 diff --git a/tools/InvokeXTimes.ps1 b/tools/InvokeXTimes.ps1 old mode 100644 new mode 100755 index 8fe3fb37e..46a6c556a --- a/tools/InvokeXTimes.ps1 +++ b/tools/InvokeXTimes.ps1 @@ -1,3 +1,5 @@ +#!/usr/bin/env pwsh + Param( [Parameter(Position = 0, Mandatory = $false, HelpMessage = 'Specifies how many times all AutoTests should be invoked.')] @@ -69,7 +71,12 @@ function Write-HighlightedOutput { Write-Host "$($elapsed)ms" -ForegroundColor DarkGreen } -$tests = Get-ChildItem -Path *.exe -Recurse +if ($PSVersionTable.Platform -ceq 'Unix') { + $tests = find . -type f -and -executable -and -not -name '*.sh' -and -not -name 'lib*.so*' +} +else { + $tests = Get-ChildItem -Path *.exe -Recurse +} for ($i = 1; $i -le $Count; $i++) { if ($i -gt 1) {