forked from connamara/quickfixn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rewrite runat.bat into powershell for process management
- Loading branch information
Zachary Herr
committed
Oct 5, 2016
1 parent
6b878be
commit d9a1c5b
Showing
4 changed files
with
72 additions
and
62 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,61 @@ | ||
|
||
Param( | ||
[Parameter(Mandatory=$True,Position=1)] | ||
[string]$release, | ||
|
||
[Parameter(Mandatory=$True,Position=2)] | ||
[string]$port, | ||
|
||
[Parameter(Position=3)] | ||
[string]$tests=$null, | ||
|
||
[Parameter(Position=4)] | ||
[string] $conf= "cfg\at.cfg" | ||
) | ||
|
||
$result = 0 | ||
|
||
|
||
if([string]::IsNullOrEmpty($tests)) { | ||
$tests = "definitions/server/fix42/*.def" | ||
} | ||
|
||
|
||
if($release -eq "release") { | ||
$dir = "bin\Release" | ||
} | ||
elseif($release -eq "debug") { | ||
$dir = "bin\Debug" | ||
} | ||
else { Usage } | ||
|
||
|
||
function StartTests | ||
{ | ||
Start-Process -FilePath setup.bat -ArgumentList $port | ||
|
||
Start-Process -FilePath $dir\AcceptanceTest.exe -ArgumentList $conf -NoNewWindow | ||
|
||
Invoke-Expression -Command "ruby Runner.rb 127.0.0.1 $port $tests > TestResult.xml" | ||
|
||
Stop-Process -Name AcceptanceTest | ||
|
||
if($LASTEXITCODE -eq 1){ $script:result = 1 } | ||
|
||
type TestResult.xml | ||
Quit | ||
} | ||
|
||
function Usage | ||
{ | ||
echo "Usage: runat [release | debug] [port] [TESTFILE...]" | ||
$script:result = 1 | ||
Quit | ||
} | ||
|
||
function Quit | ||
{ | ||
Exit $result | ||
} | ||
|
||
StartTests |
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