Skip to content

Commit

Permalink
Merge pull request connamara#419 from zherr/atrun-dep-removal
Browse files Browse the repository at this point in the history
Atrun dep removal
  • Loading branch information
cbusbey authored Jun 2, 2017
2 parents 1f619ff + e547714 commit 4c03a60
Show file tree
Hide file tree
Showing 27 changed files with 142 additions and 164 deletions.
2 changes: 1 addition & 1 deletion .slugignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Examples
QuickFIXn.sln
docs
spec
acceptance_test.bat
acceptance_test.ps1
generator
unit_test.bat
PerformanceTests
Expand Down
1 change: 0 additions & 1 deletion AcceptanceTest/ATRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ static void Main(string[] args)
acceptor.Start();
while (true)
{
System.Console.WriteLine("o hai "+System.DateTime.Now.ToString());
System.Threading.Thread.Sleep(1000);

// for tests of logout
Expand Down
Binary file removed AcceptanceTest/atrun/release/Process.obj
Binary file not shown.
Binary file removed AcceptanceTest/atrun/release/ProcessTestCase.obj
Binary file not shown.
Binary file removed AcceptanceTest/atrun/release/getopt.obj
Binary file not shown.
Binary file removed AcceptanceTest/atrun/release/main.obj
Binary file not shown.
Binary file removed AcceptanceTest/atrun/release/vc80.idb
Binary file not shown.
Binary file removed AcceptanceTest/release/at/at.exe
Binary file not shown.
Binary file removed AcceptanceTest/release/at/at_net.exe
Binary file not shown.
Binary file removed AcceptanceTest/release/at/at_net.pdb
Binary file not shown.
Binary file removed AcceptanceTest/release/at/atrun.exe
Binary file not shown.
Binary file removed AcceptanceTest/release/at/quickfix_net.dll
Binary file not shown.
Binary file removed AcceptanceTest/release/at/quickfix_net.pdb
Binary file not shown.
Binary file removed AcceptanceTest/release/at/quickfix_net_messages.dll
Binary file not shown.
Binary file removed AcceptanceTest/release/pt/pt.exe
Binary file not shown.
Binary file removed AcceptanceTest/release/pt/pt_net.exe
Binary file not shown.
Binary file removed AcceptanceTest/release/pt/quickfix_net.dll
Binary file not shown.
Binary file removed AcceptanceTest/release/pt/quickfix_net.pdb
Binary file not shown.
Binary file removed AcceptanceTest/release/pt/quickfix_net_messages.dll
Binary file not shown.
Binary file removed AcceptanceTest/release/ut/ut.exe
Binary file not shown.
49 changes: 0 additions & 49 deletions AcceptanceTest/runat.bat

This file was deleted.

61 changes: 61 additions & 0 deletions AcceptanceTest/runat.ps1
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Acceptance Tests
----------------
To run the full suite of acceptance tests:

acceptance_test.bat
acceptance_test.ps1

An HTML report of the test results will then be available here:

Expand All @@ -92,9 +92,9 @@ An HTML report of the test results will then be available here:
To run one particular acceptance test, e.g. fix42\14e_IncorrectEnumValue.def:

cd AcceptanceTest
runat.bat release 5003 definitions\server\fix42\14e_IncorrectEnumValue.def cfg\at_42.cfg
runat.ps1 release 5003 definitions\server\fix42\14e_IncorrectEnumValue.def cfg\at_42.cfg

(See acceptance_test.bat for the proper port numbers and config files to use in the above command.)
(See acceptance_test.ps1 for the proper port numbers and config files to use in the above command.)

The test results will then be available in AcceptanceTests\TestResults.xml and
debug information will be available in the AcceptanceTests\log directory.
Expand Down
107 changes: 0 additions & 107 deletions acceptance_test.bat

This file was deleted.

73 changes: 73 additions & 0 deletions acceptance_test.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
$return_value=0
$success_string="`r`nTest Suite Results:"

function TestSpec
{
param(
[Parameter(Mandatory=$True,Position=0)]
[string]$release,

[Parameter(Mandatory=$True,Position=1)]
[string]$port,

[Parameter(Mandatory=$True,Position=2)]
[string]$def,

[Parameter(Mandatory=$True,Position=3)]
[string]$conf,

[Parameter(Mandatory=$True,Position=4)]
[string]$dest
)
if(Test-Path TestResult.xml){ Remove-Item TestResult.xml }

Invoke-Expression ".\runat.ps1 $release $port $def $conf"

if($LASTEXITCODE -eq 1){ $script:return_value = $script:return_value + 1 }
$result = "$dest tests result:$LASTEXITCODE"
echo $result
$script:success_string = $script:success_string + "`r`n`t$result"
Copy-Item TestResult.xml -Destination $dest
}

Push-Location -Path "AcceptanceTest" -StackName AcceptanceTest

Remove-Item AcceptanceTests_*.xml

# Fix 40
TestSpec "release" "5001" "definitions/server/fix40/*.def" "cfg/at_40.cfg" "AcceptanceTests_40.xml"

# Fix 41
TestSpec "release" "5002" "definitions/server/fix41/*.def" "cfg/at_41.cfg" "AcceptanceTests_41.xml"

# Fix 42
TestSpec "release" "5003" "definitions/server/fix42/*.def" "cfg/at_42.cfg" "AcceptanceTests_42.xml"

# Fix 43
TestSpec "release" "5004" "definitions/server/fix43/*.def" "cfg/at_43.cfg" "AcceptanceTests_43.xml"

# Fix 44
TestSpec "release" "5005" "definitions/server/fix44/*.def" "cfg/at_44.cfg" "AcceptanceTests_44.xml"

# Fix 44 No Reset
TestSpec "release" "5005" "definitions/server/fix44noreset/*.def" "cfg/at_44_noreset.cfg" "AcceptanceTests_44_noreset.xml"

# Fix 50
TestSpec "release" "5006" "definitions/server/fix50/*.def" "cfg/at_50.cfg" "AcceptanceTests_50.xml"

# Fix 50sp1
TestSpec "release" "5007" "definitions/server/fix50sp1/*.def" "cfg/at_50_sp1.cfg" "AcceptanceTests_50_SP1.xml"

# Fix 50sp2
TestSpec "release" "5008" "definitions/server/fix50sp2/*.def" "cfg/at_50_sp2.cfg" "AcceptanceTests_50_SP2.xml"

# Misc
TestSpec "release" "5003" "definitions/server/misc/*.def" "cfg/at_42.misc.cfg" "AcceptanceTests_Misc.xml"

Pop-Location -StackName AcceptanceTest

echo $success_string

echo "Script returns: $return_value"
echo "(0 means success)"
Exit $return_value
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ version: 1.0.{build}
install:
- cmd: >-
gem install nokogiri -v 1.6.8.1
generate.bat
build_script:
- cmd: build.bat

test_script:
- cmd: >-
unit_test.bat
acceptance_test.bat
appveyor_test.bat
1 change: 1 addition & 0 deletions appveyor_test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PowerShell .\acceptance_test.ps1

0 comments on commit 4c03a60

Please sign in to comment.