qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shus...@apache.org
Subject svn commit: r1293340 - in /qpid/trunk/qpid/cpp/src/tests: CMakeLists.txt python_tests.ps1 run_acl_tests.ps1 run_federation_tests.ps1 run_header_test.ps1 run_store_tests.ps1 run_test.ps1
Date Fri, 24 Feb 2012 17:08:53 GMT
Author: shuston
Date: Fri Feb 24 17:08:52 2012
New Revision: 1293340

URL: http://svn.apache.org/viewvc?rev=1293340&view=rev
Log:
Generate a correct test_env.ps1 for Windows test runs; modify the python-invoking test scripts
to pick up proper settings from test_env.ps1. Also improved run_test.ps1 to not look for an
exe whose proper path has been supplied already; allowed ha_test to try to execute. Fixes
QPID-3870

Modified:
    qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/tests/python_tests.ps1
    qpid/trunk/qpid/cpp/src/tests/run_acl_tests.ps1
    qpid/trunk/qpid/cpp/src/tests/run_federation_tests.ps1
    qpid/trunk/qpid/cpp/src/tests/run_header_test.ps1
    qpid/trunk/qpid/cpp/src/tests/run_store_tests.ps1
    qpid/trunk/qpid/cpp/src/tests/run_test.ps1

Modified: qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt?rev=1293340&r1=1293339&r2=1293340&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt Fri Feb 24 17:08:52 2012
@@ -34,8 +34,14 @@ set (abs_builddir ${CMAKE_CURRENT_BINARY
 set (abs_top_srcdir ${CMAKE_SOURCE_DIR})
 set (abs_top_builddir ${CMAKE_BINARY_DIR})
 set (builddir_lib_suffix "")
-configure_file (${CMAKE_CURRENT_SOURCE_DIR}/test_env.sh.in
-  ${CMAKE_CURRENT_BINARY_DIR}/test_env.sh)
+
+if (CMAKE_SYSTEM_NAME STREQUAL Windows)
+  configure_file (${CMAKE_CURRENT_SOURCE_DIR}/test_env.ps1.in
+    ${CMAKE_CURRENT_BINARY_DIR}/test_env.ps1)
+else (CMAKE_SYSTEM_NAME STREQUAL Windows)
+  configure_file (${CMAKE_CURRENT_SOURCE_DIR}/test_env.sh.in
+    ${CMAKE_CURRENT_BINARY_DIR}/test_env.sh)
+endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
 
 
 # If valgrind is selected in the configuration step, set up the path to it

Modified: qpid/trunk/qpid/cpp/src/tests/python_tests.ps1
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/python_tests.ps1?rev=1293340&r1=1293339&r2=1293340&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/python_tests.ps1 (original)
+++ qpid/trunk/qpid/cpp/src/tests/python_tests.ps1 Fri Feb 24 17:08:52 2012
@@ -26,8 +26,7 @@ if (!(Test-Path $PYTHON_DIR -pathType Co
     exit 1
 }
 
-$PYTHON_TEST_DIR = "$srcdir\..\..\..\tests\src\py"
-$QMF_LIB = "$srcdir\..\..\..\extras\qmf\src\py"
+. .\test_env.ps1
 
 if (Test-Path env:FAILING) {
     $fails = "-I $env:FAILING"
@@ -39,7 +38,5 @@ else {
     $tests = "$args"
 }
 
-#cd $PYTHON_DIR
-$env:PYTHONPATH="$PYTHON_DIR;$PYTHON_TEST_DIR;$env:PYTHONPATH;$QMF_LIB"
 python $PYTHON_DIR/qpid-python-test -m qpid_tests.broker_0_10 -m qpid.tests -b localhost:$env:QPID_PORT
$fails $tests
 exit $LASTEXITCODE

Modified: qpid/trunk/qpid/cpp/src/tests/run_acl_tests.ps1
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/run_acl_tests.ps1?rev=1293340&r1=1293339&r2=1293340&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_acl_tests.ps1 (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_acl_tests.ps1 Fri Feb 24 17:08:52 2012
@@ -20,15 +20,12 @@
 # Run the acl tests.
 
 $srcdir = Split-Path $myInvocation.InvocationName
-$PYTHON_DIR = "$srcdir\..\..\..\python"
+. .\test_env.ps1
 if (!(Test-Path $PYTHON_DIR -pathType Container)) {
     "Skipping acl tests as python libs not found"
     exit 1
 }
 
-$PYTHON_TEST_DIR = "$srcdir\..\..\..\tests\src\py"
-$QMF_LIB = "$srcdir\..\..\..\extras\qmf\src\py"
-$env:PYTHONPATH="$PYTHON_DIR;$srcdir;$PYTHON_TEST_DIR;$QMF_LIB"
 $Global:BROKER_EXE = ""
 
 Function start_broker($acl_options)

Modified: qpid/trunk/qpid/cpp/src/tests/run_federation_tests.ps1
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/run_federation_tests.ps1?rev=1293340&r1=1293339&r2=1293340&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_federation_tests.ps1 (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_federation_tests.ps1 Fri Feb 24 17:08:52 2012
@@ -26,8 +26,7 @@ if (!(Test-Path $PYTHON_DIR -pathType Co
     exit 1
 }
 
-$PYTHON_TEST_DIR = "$srcdir\..\..\..\tests\src\py"
-$QMF_LIB = "$srcdir\..\..\..\extras\qmf\src\py"
+. .\test_env.ps1
 
 # Test runs from the tests directory but the broker executable is one level
 # up, and most likely in a subdirectory from there based on what build type.

Modified: qpid/trunk/qpid/cpp/src/tests/run_header_test.ps1
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/run_header_test.ps1?rev=1293340&r1=1293339&r2=1293340&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_header_test.ps1 (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_header_test.ps1 Fri Feb 24 17:08:52 2012
@@ -28,6 +28,8 @@ if (!(Test-Path $PYTHON_DIR -pathType Co
     exit 0
 }
 
+. .\test_env.ps1
+
 if (Test-Path qpidd.port) {
    set-item -path env:QPID_PORT -value (get-content -path qpidd.port -totalcount 1)
 }
@@ -42,6 +44,5 @@ if (!(Test-Path $prog)) {
 }
 
 Invoke-Expression "$prog -p $env:QPID_PORT" | Write-Output
-$env:PYTHONPATH="$PYTHON_DIR;$env:PYTHONPATH"
 Invoke-Expression "python $srcdir/header_test.py localhost $env:QPID_PORT" | Write-Output
 exit $LASTEXITCODE

Modified: qpid/trunk/qpid/cpp/src/tests/run_store_tests.ps1
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/run_store_tests.ps1?rev=1293340&r1=1293339&r2=1293340&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_store_tests.ps1 (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_store_tests.ps1 Fri Feb 24 17:08:52 2012
@@ -30,14 +30,14 @@ if ($test_store -ne "MSSQL" -and $test_s
 }
 
 $srcdir = Split-Path $myInvocation.InvocationName
-$PYTHON_DIR = "$srcdir\..\..\..\python"
+
+. .\test_env.ps1
+
 if (!(Test-Path $PYTHON_DIR -pathType Container)) {
     "Skipping store tests as python libs not found"
     exit 1
 }
 
-$QMF_LIB = "$srcdir\..\..\..\extras\qmf\src\py"
-
 # Test runs from the tests directory but the broker executable is one level
 # up, and most likely in a subdirectory from there based on what build type.
 # Look around for it before trying to start it.
@@ -97,7 +97,7 @@ set-item -path env:QPID_PORT -value (get
 Remove-Item qpidd-store.port
 
 $PYTHON_TEST_DIR = "$srcdir\..\..\..\tests\src\py\qpid_tests\broker_0_10"
-$env:PYTHONPATH="$PYTHON_DIR;$PYTHON_TEST_DIR;$env:PYTHONPATH;$QMF_LIB"
+$env:PYTHONPATH="$PYTHON_TEST_DIR;$srcdir;$env:PYTHONPATH"
 python $PYTHON_DIR/qpid-python-test -m dtx -m persistence -b localhost:$env:QPID_PORT $fails
$tests
 $RETCODE=$LASTEXITCODE
 if ($RETCODE -ne 0) {
@@ -111,7 +111,6 @@ Invoke-Expression "$prog --quit --port $
 # Test 2... store.py starts/stops/restarts its own brokers
 
 $tests = "*"
-$env:PYTHONPATH="$PYTHON_DIR;$QMF_LIB;$srcdir"
 $env:QPIDD_EXEC="$prog"
 $env:STORE_LIB="$store_dir\store$suffix.dll"
 if ($test_store -eq "MSSQL") {

Modified: qpid/trunk/qpid/cpp/src/tests/run_test.ps1
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/run_test.ps1?rev=1293340&r1=1293339&r2=1293340&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_test.ps1 (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_test.ps1 Fri Feb 24 17:08:52 2012
@@ -20,8 +20,7 @@
 $srcdir = Split-Path $myInvocation.InvocationName
 
 # Set up environment and run a test executable or script.
-$env:QPID_DATA_DIR = ""
-$env:BOOST_TEST_SHOW_PROGRESS = "yes"
+. .\test_env.ps1
 
 # The test exe is probably not in the current binary dir - it's usually
 # placed in a subdirectory based on the configuration built in Visual Studio.
@@ -30,7 +29,7 @@ $env:BOOST_TEST_SHOW_PROGRESS = "yes"
 # one level up.
 $prog = $args[0]
 $is_script = $prog -match ".ps1$"
-if (!$is_script) {
+if (!$is_script -and !(Test-Path "$prog")) {
    . $srcdir\find_prog.ps1 $prog
    $args[0] = $prog
    $env:QPID_LIB_DIR = "..\$sub"



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message