summaryrefslogtreecommitdiff
path: root/cpp/src/tests
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2010-04-28 20:29:54 +0000
committerStephen D. Huston <shuston@apache.org>2010-04-28 20:29:54 +0000
commit58cdb48940860621befd579f75a444796b221690 (patch)
tree164cea9b44244491af88901e7321f5fb6cd03f13 /cpp/src/tests
parent1e8f35396e4d5722b7e9322d8784b3724f3ca093 (diff)
downloadqpid-python-58cdb48940860621befd579f75a444796b221690.tar.gz
Fix path to broker exe so it can be stopped when needed.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@939077 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests')
-rw-r--r--cpp/src/tests/run_acl_tests.ps111
1 files changed, 6 insertions, 5 deletions
diff --git a/cpp/src/tests/run_acl_tests.ps1 b/cpp/src/tests/run_acl_tests.ps1
index 81c10e03f0..a1848779c7 100644
--- a/cpp/src/tests/run_acl_tests.ps1
+++ b/cpp/src/tests/run_acl_tests.ps1
@@ -41,8 +41,10 @@ Function start_broker($acl_options)
"Cannot locate qpidd.exe"
exit 1
}
- $BROKER_EXE = $prog
- Remove-Item qpidd.port
+ $Global:BROKER_EXE = $prog
+ if (Test-Path qpidd.port) {
+ Remove-Item qpidd.port
+ }
$cmdline = "$prog --auth=no --no-module-dir --port=0 --log-to-file qpidd.log $acl_options | foreach { set-content qpidd.port `$_ }"
$cmdblock = $executioncontext.invokecommand.NewScriptBlock($cmdline)
. $srcdir\background.ps1 $cmdblock
@@ -61,13 +63,12 @@ Function start_broker($acl_options)
Function stop_broker
{
- "Stopping $BROKER_EXE"
- Invoke-Expression "$BROKER_EXE --no-module-dir -q --port $env:BROKER_PORT" | Write-Output
+ "Stopping $Global:BROKER_EXE"
+ Invoke-Expression "$Global:BROKER_EXE --no-module-dir -q --port $env:BROKER_PORT" | Write-Output
Remove-Item qpidd.port
}
$DATA_DIR = [IO.Directory]::GetCurrentDirectory() + "\data_dir"
-"DATA_DIR is $DATA_DIR"
Remove-Item $DATA_DIR -recurse
New-Item $DATA_DIR -type directory
Copy-Item $srcdir\policy.acl $DATA_DIR