-
Notifications
You must be signed in to change notification settings - Fork 791
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #20827: Tmp. Launch tests in auxiliary shell setting the envionm…
…ent with .ps1 Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
- Loading branch information
Showing
2 changed files
with
60 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Param( | ||
[Parameter(Position=0, Mandatory=$true)] | ||
[ValidateScript({Test-Path $_ -PathType Leaf -IsValid })] | ||
[String] | ||
# python3 binary | ||
$python_path, | ||
|
||
[Parameter(Position=1, Mandatory=$true)] | ||
[ValidateScript({Test-Path $_ -PathType Leaf -IsValid })] | ||
[String] | ||
# python script that keeps the testing | ||
$test_script, | ||
|
||
[Parameter(Position=2, Mandatory=$true)] | ||
[ValidateScript({Test-Path $_ -PathType Leaf -IsValid })] | ||
[String] | ||
# fast server creation binary full qualified path | ||
$tool_path, | ||
|
||
[Parameter(Position=3, Mandatory=$true)] | ||
[ValidateNotNullOrEmpty()] | ||
[String] | ||
# test_name | ||
$test_name | ||
) | ||
|
||
$test = Start-Process -Passthru -Wait ` | ||
-FilePath $python_path ` | ||
-ArgumentList ($test_script, $tool_path, $test_name) ` | ||
-WindowStyle Hidden | ||
|
||
if( $test.ExitCode -ne 0 ) | ||
{ | ||
$error_message = "Test: $test_name failed with exit code $($test.ExitCode)." | ||
throw $error_message | ||
} |