diff options
| author | Stephen D. Huston <shuston@apache.org> | 2009-06-22 22:51:32 +0000 |
|---|---|---|
| committer | Stephen D. Huston <shuston@apache.org> | 2009-06-22 22:51:32 +0000 |
| commit | 7bc75b04fd99b401306a0951568044fbde5a7d8d (patch) | |
| tree | 6c3c9802a03e5e241c06342e45b351988e568bad /qpid/cpp/src/tests/run_test.ps1 | |
| parent | 307c989abad544bc92c88e1c1c0897d8c7a6a6a4 (diff) | |
| download | qpid-python-7bc75b04fd99b401306a0951568044fbde5a7d8d.tar.gz | |
Script fixes to get tests going on Windows; includes properly licensed background.ps1
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@787431 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/run_test.ps1')
| -rw-r--r-- | qpid/cpp/src/tests/run_test.ps1 | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/qpid/cpp/src/tests/run_test.ps1 b/qpid/cpp/src/tests/run_test.ps1 index fccf205b9d..ebbef07f1d 100644 --- a/qpid/cpp/src/tests/run_test.ps1 +++ b/qpid/cpp/src/tests/run_test.ps1 @@ -27,6 +27,7 @@ $env:BOOST_TEST_SHOW_PROGRESS = "yes" # and PATH to look in the corresponding configuration off the src directory, # one level up. $prog = $args[0] +$is_script = $prog -match ".ps1$" if (Test-Path $prog) { $env:QPID_LIB_DIR = ".." $env:PATH += ";.." @@ -51,4 +52,21 @@ if (Test-Path qpidd.port) { set-item -path env:QPID_PORT -value (get-content -path qpidd.port -totalcount 1) } -exit Invoke-Item "$args" | Out-Default +#$p = new-object System.Diagnostics.Process +$si = new-object System.Diagnostics.ProcessStartInfo +$si.WorkingDirectory = $pwd +$si.UseShellExecute = $true + +if ($is_script) { + $si.FileName = (get-command powershell.exe).Definition + $si.Arguments = $args +} +else { + $si.FileName = $args[0] + if ($args.length > 1) { + $si.Arguments = $args[1..$args.length-1] + } +} +$p = [diagnostics.process]::Start($si) +$p.WaitForExit() +exit $? |
