test: add a bypass wrapper for the UI smoke script
Windows PowerShell with an AllSigned policy refuses unsigned .ps1 files. ui-smoke.cmd runs ui-smoke.ps1 with a process-scoped -ExecutionPolicy Bypass (no system policy change) and keeps the window open when double-clicked.
This commit is contained in:
11
agent/tests/ui-smoke.cmd
Normal file
11
agent/tests/ui-smoke.cmd
Normal file
@@ -0,0 +1,11 @@
|
||||
@echo off
|
||||
setlocal
|
||||
rem Double-clickable wrapper: Windows PowerShell may refuse unsigned .ps1 files
|
||||
rem (AllSigned policy). This runs the script with a process-scoped Bypass.
|
||||
set "SCRIPT=%~dp0ui-smoke.ps1"
|
||||
"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT%" %*
|
||||
set "CODE=%ERRORLEVEL%"
|
||||
if not "%CODE%"=="0" echo.&echo UI smoke exited with code %CODE%.
|
||||
rem Keep the window open when launched without arguments (double-click).
|
||||
if "%~1"=="" pause
|
||||
exit /b %CODE%
|
||||
Reference in New Issue
Block a user