Author: aconway
Date: Tue Jun 17 20:48:09 2014
New Revision: 1603289

URL: http://svn.apache.org/r1603289
Log:
NO-JIRA: ctest runs all tests in the build tree, added valgrind support.

Updated README with info on running tests.

Wrapper script tests/run.py to run tests, allows ctest to run with no 
environment settings.
(tests/run.py replaces build_env.py)

System tests also run by ctest in the build tree.

Valgrind support added, OFF by default: many memory errors, slows down system 
tests.
To try it out: cmake -DUSE_VALGRIND=ON

Note: test.sh behaves as before, it runs unit tests in the build and system 
tests in the install tree.

Added:
    qpid/dispatch/trunk/tests/run.py.in   (with props)
    qpid/dispatch/trunk/tests/system_tests_two_routers_ssl.py
      - copied, changed from r1602963, 
qpid/dispatch/trunk/tests/config_build.sh.in
    qpid/dispatch/trunk/tests/valgrind.supp
Removed:
    qpid/dispatch/trunk/build_env.py.in
    qpid/dispatch/trunk/tests/config_build.sh.in
Modified:
    qpid/dispatch/trunk/CMakeLists.txt
    qpid/dispatch/trunk/README
    qpid/dispatch/trunk/bin/test.sh
    qpid/dispatch/trunk/doc/man/CMakeLists.txt
    qpid/dispatch/trunk/tests/CMakeLists.txt
    qpid/dispatch/trunk/tests/management/node.py
    qpid/dispatch/trunk/tests/run_system_tests.py
    qpid/dispatch/trunk/tests/system_test.py
    qpid/dispatch/trunk/tests/system_tests_two_routers.py

Modified: qpid/dispatch/trunk/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/dispatch/trunk/CMakeLists.txt?rev=1603289&r1=1603288&r2=1603289&view=diff
==============================================================================
--- qpid/dispatch/trunk/CMakeLists.txt (original)
+++ qpid/dispatch/trunk/CMakeLists.txt Tue Jun 17 20:48:09 2014
@@ -97,9 +97,6 @@ set(CATCH_UNDEFINED "-Wl,--no-undefined"
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/conditionals.h.in
                ${CMAKE_CURRENT_BINARY_DIR}/conditionals.h)
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/build_env.py.in
-               ${CMAKE_CURRENT_BINARY_DIR}/build_env.py)
-
 ##
 ## Build the Multi-Threaded Server Library
 ##
@@ -173,8 +170,8 @@ install(FILES ${DOC_FILES}
         DESTINATION ${DOC_INSTALL_DIR}/qpid-dispatch)
 
 ##
-## Build Tests
+## Build Tests first as other subdirs use tests/run.py
 ##
+add_subdirectory(tests)
 add_subdirectory(doc)
 add_subdirectory(router)
-add_subdirectory(tests)

Modified: qpid/dispatch/trunk/README
URL: 
http://svn.apache.org/viewvc/qpid/dispatch/trunk/README?rev=1603289&r1=1603288&r2=1603289&view=diff
==============================================================================
--- qpid/dispatch/trunk/README (original)
+++ qpid/dispatch/trunk/README Tue Jun 17 20:48:09 2014
@@ -4,32 +4,52 @@ Qpid Dispatch
 A lightweight AMQP router for building scalable, available, and performant 
messaging
 interconnect.
 
-Building
-========
+Building and testing
+====================
 
 From the dispatch directory:
 
-$ mkdir build
-$ cd build
+$ mkdir my_build    # or directory of your choice.
+$ cd my_build
 $ cmake ..
 $ make
-$ make test # see below
+$ ctest -VV
 
-Note:  Your PYTHONPATH _must_ include <dispatch>/python in its list of paths 
in order
-to test and run Dispatch.
 
 Running The Tests
 =================
 
-Prior to running the unit tests, you should source the file config.sh which is
-found in the root directory.
+From the <build> directory you can run all the system and tests with:
+$ ctest -VV
 
-$ source config.sh
+ctest uses the script <build>/test/run.py to set up the correct environment for
+tests. You can use it to run tests individually from the <build>/tests
+directory, for example:
 
-The file sets up the environment so that the tests can find the Python
-libraries, etc.
+$ ./run.py unit_tests_size 3
+$ ./run.py -m unittest system_tests_qdstat
 
-Run the test.sh script to run a clean, top-to-bottom build, install,
-and test.
+Run it without arguments to get a summary of how it can be used:
+$ ./run.py
 
-$ test.sh
+
+Clean build, install and test
+=============================
+
+$ source config.sh; test.sh
+
+This does the following:
+- NOTE: delete any existing directories 'build' and 'install'
+- Do a fresh cmake and make in directory 'build'
+- Run unit tests (not system tests) in 'build'
+- Do 'make install' into the directory 'install'
+- Run system tests on the installation in 'install'.
+
+
+Valgrind support
+================
+
+If valgrind is installed it will be used by default when running the tests.
+Set the cmake option 'USE_VALGRIND' to 'ON' or 'OFF' to enable/disable 
valgrind.
+You can also set the environment variable 'USE_VALGRIND' to 'ON or 'OFF'.
+If set the environment variable takes precendence over the cmake option.

Modified: qpid/dispatch/trunk/bin/test.sh
URL: 
http://svn.apache.org/viewvc/qpid/dispatch/trunk/bin/test.sh?rev=1603289&r1=1603288&r2=1603289&view=diff
==============================================================================
--- qpid/dispatch/trunk/bin/test.sh (original)
+++ qpid/dispatch/trunk/bin/test.sh Tue Jun 17 20:48:09 2014
@@ -32,8 +32,10 @@ rm -rf $INSTALL_DIR
 mkdir $BUILD_DIR
 cd $BUILD_DIR
 
-cmake -D CMAKE_INSTALL_PREFIX=$INSTALL_DIR -D CMAKE_BUILD_TYPE=Debug 
$SOURCE_DIR
+cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_BUILD_TYPE=Debug $SOURCE_DIR
 make -j4
 make install
-ctest -VV
+# Run unit tests on the build.
+ctest -VV -E system_tests
+# Run system tests on the install.
 python $INSTALL_DIR/lib/qpid-dispatch/tests/run_system_tests.py

Modified: qpid/dispatch/trunk/doc/man/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/dispatch/trunk/doc/man/CMakeLists.txt?rev=1603289&r1=1603288&r2=1603289&view=diff
==============================================================================
--- qpid/dispatch/trunk/doc/man/CMakeLists.txt (original)
+++ qpid/dispatch/trunk/doc/man/CMakeLists.txt Tue Jun 17 20:48:09 2014
@@ -36,7 +36,7 @@ file (GLOB_RECURSE MAN_PAGE_GENERATOR
 set (QDROUTERD_MAN qdrouterdconf.conf.5.new)
 
 add_custom_command (OUTPUT ${QDROUTERD_MAN}
-    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/build_env.py 
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qdrouterd_man.py 
${QDROUTERD_MAN}
+    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/tests/run.py -s 
${CMAKE_CURRENT_SOURCE_DIR}/qdrouterd_man.py ${QDROUTERD_MAN}
     DEPENDS ${MAN_PAGE_GENERATOR})
 
 add_custom_target(man ALL DEPENDS ${QDROUTERD_MAN})

Modified: qpid/dispatch/trunk/tests/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/CMakeLists.txt?rev=1603289&r1=1603288&r2=1603289&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/CMakeLists.txt (original)
+++ qpid/dispatch/trunk/tests/CMakeLists.txt Tue Jun 17 20:48:09 2014
@@ -17,6 +17,14 @@
 ## under the License.
 ##
 
+# Check for valgrind
+find_program(VALGRIND_EXECUTABLE valgrind DOC "Location of the valgrind 
program")
+mark_as_advanced(VALGRIND_EXECUTABLE)
+find_package_handle_standard_args(VALGRIND DEFAULT_MSG VALGRIND_EXECUTABLE)
+if (VALGRIND_FOUND)
+  option(USE_VALGRIND "Use valgrind when running tests" OFF)
+endif(VALGRIND_FOUND)
+
 ##
 ## Build test applications
 ##
@@ -42,21 +50,26 @@ set(unit_test_size_SOURCES
 add_executable(unit_tests_size ${unit_test_size_SOURCES})
 target_link_libraries(unit_tests_size qpid-dispatch)
 
-add_test(unit_tests_size_10000 unit_tests_size 10000)
-add_test(unit_tests_size_512   unit_tests_size 512)
-add_test(unit_tests_size_10    unit_tests_size 10)
-add_test(unit_tests_size_7     unit_tests_size 7)
-add_test(unit_tests_size_5     unit_tests_size 5)
-add_test(unit_tests_size_3     unit_tests_size 3)
-add_test(unit_tests_size_2     unit_tests_size 2)
-add_test(unit_tests_size_1     unit_tests_size 1)
-add_test(unit_tests            unit_tests 
${CMAKE_CURRENT_SOURCE_DIR}/threads4.conf)
-add_test(router_tests          ${PYTHON_EXECUTABLE} 
${CMAKE_CURRENT_SOURCE_DIR}/router_engine_test.py -v)
-add_test(management_tests      ${PYTHON_EXECUTABLE} 
${CMAKE_BINARY_DIR}/build_env.py ${PYTHON_EXECUTABLE} -m unittest -v management)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/run.py.in 
${CMAKE_CURRENT_BINARY_DIR}/run.py)
 
-set(SYSTEM_TEST_FILES run_system_tests.py system_test.py 
system_tests_one_router.py system_tests_two_routers.py system_tests_broker.py 
system_tests_management.py system_tests_qdstat.py)
+set(TEST_WRAP ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/run.py)
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config_build.sh.in 
${CMAKE_CURRENT_BINARY_DIR}/config_build.sh)
+add_test(unit_tests_size_10000 ${TEST_WRAP} --vg unit_tests_size 10000)
+add_test(unit_tests_size_512   ${TEST_WRAP} --vg unit_tests_size 512)
+add_test(unit_tests_size_10    ${TEST_WRAP} --vg unit_tests_size 10)
+add_test(unit_tests_size_7     ${TEST_WRAP} --vg unit_tests_size 7)
+add_test(unit_tests_size_5     ${TEST_WRAP} --vg unit_tests_size 5)
+add_test(unit_tests_size_3     ${TEST_WRAP} --vg unit_tests_size 3)
+add_test(unit_tests_size_2     ${TEST_WRAP} --vg unit_tests_size 2)
+add_test(unit_tests_size_1     ${TEST_WRAP} --vg unit_tests_size 1)
+add_test(unit_tests            ${TEST_WRAP} --vg unit_tests 
${CMAKE_CURRENT_SOURCE_DIR}/threads4.conf)
+add_test(router_tests          ${TEST_WRAP} -s 
${CMAKE_CURRENT_SOURCE_DIR}/router_engine_test.py -v)
+add_test(management_tests      ${TEST_WRAP} -m unittest -v management)
+add_test(system_tests          ${TEST_WRAP} -m run_system_tests -v)
+
+set(SYSTEM_TEST_FILES ${CMAKE_CURRENT_BINARY_DIR}/run.py run_system_tests.py 
system_test.py
+  system_tests_one_router.py system_tests_two_routers.py 
system_tests_two_routers_ssl.py
+  system_tests_broker.py system_tests_management.py system_tests_qdstat.py)
 
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-2/A-ssl.conf.in 
${CMAKE_CURRENT_BINARY_DIR}/config-2/A-ssl.conf)
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-2/B-ssl.conf.in 
${CMAKE_CURRENT_BINARY_DIR}/config-2/B-ssl.conf)

Modified: qpid/dispatch/trunk/tests/management/node.py
URL: 
http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/management/node.py?rev=1603289&r1=1603288&r2=1603289&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/management/node.py (original)
+++ qpid/dispatch/trunk/tests/management/node.py Tue Jun 17 20:48:09 2014
@@ -20,7 +20,7 @@
 """Tests for management.amqp"""
 
 import unittest
-from qpid_dispatch_internal.management.node import Url
+from qpid_dispatch_internal.management import Url
 
 class UrlTest(unittest.TestCase):
 

Added: qpid/dispatch/trunk/tests/run.py.in
URL: 
http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/run.py.in?rev=1603289&view=auto
==============================================================================
--- qpid/dispatch/trunk/tests/run.py.in (added)
+++ qpid/dispatch/trunk/tests/run.py.in Tue Jun 17 20:48:09 2014
@@ -0,0 +1,135 @@
+#!/usr/bin/env python
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License.  You may obtain a copy of the License at
+##
+##   http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied.  See the License for the
+## specific language governing permissions and limitations
+## under the License
+##
+
+
+"""
+Run a tool or test in a build tree with the correct PATH, PYTHONPATH, etc.
+Run with no arguments for help.
+"""
+
+usage="""
+Run a tool or test in a build tree with the correct PATH, PYTHONPATH, etc.
+
+Usage:
+run.py <program> [<arg>....]               # Run a program, can be an 
interactive shell.
+run.py -m <python-module>  [<arg>....]     # Run a python module.
+run.py -s <python-script>.py  [<arg>....]  # Run a python script.
+run.py --vg <program> [<arg>....]          # Run a program with valgrind if 
enabled.
+run.py --sh                                # Output a shell script to set the 
environment.
+
+Valgrind can be enabled or disabled by the cmake 'USE_VALGRIND' option and the
+environment variable 'USE_VALGRIND' (set to 'ON' or 'OFF'). The environment
+variable takes precendence if set."""
+
+import os, sys, runpy
+from subprocess import Popen, PIPE
+
+def dedup(l):
+    """Remove duplicates from list l, keep first instance. Keep order of l."""
+    s = set()
+    return [i for i in l if i not in s and (s.add(i) or True)]
+
+sys.path = dedup([
+    "${CMAKE_SOURCE_DIR}/python",
+    "${CMAKE_BINARY_DIR}/python",
+    "${CMAKE_SOURCE_DIR}/tests"
+] + sys.path)
+
+env_vars = {
+    'PYTHONPATH': os.pathsep.join(sys.path),
+    'PATH': os.pathsep.join(dedup(["${CMAKE_BINARY_DIR}",
+                                   os.path.join("${CMAKE_BINARY_DIR}", 
'tests'),
+                                   os.path.join("${CMAKE_BINARY_DIR}", 
'router'),
+                                   os.path.join("${CMAKE_BINARY_DIR}", 
'tools'),
+                                   os.path.join("${CMAKE_SOURCE_DIR}", 'bin')] 
+
+                                  os.environ['PATH'].split(os.pathsep))),
+    'SOURCE_DIR': "${CMAKE_SOURCE_DIR}",
+    'BUILD_DIR': "${CMAKE_BINARY_DIR}",
+    'QPID_DISPATCH_HOME': "${CMAKE_SOURCE_DIR}"
+}
+os.environ.update(env_vars)
+
+# Valgrind setup
+valgrind_exe = "${VALGRIND_EXECUTABLE}"
+
+def use_valgrind():
+    """True if we should use valgrind"""
+    if not os.path.exists(valgrind_exe): return False
+    def on(str):
+        return str.lower() in ['on', 'yes', '1']
+    env = os.environ.get('USE_VALGRIND')
+    if env: return on(env)
+    return on("${USE_VALGRIND}")
+
+def find_exe(program):
+    """Find an executable in the system PATH"""
+    def is_exe(fpath):
+        return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
+    mydir, name = os.path.split(program)
+    if mydir:
+        if is_exe(program): return program
+    else:
+        for path in os.environ["PATH"].split(os.pathsep):
+            exe_file = os.path.join(path, program)
+            if is_exe(exe_file): return exe_file
+    return None
+
+def is_binary_exe(program):
+    """True if the program is a binary executable"""
+    if not program: return None
+    p = Popen(['file', '-bi', program], stdout=PIPE, stderr=PIPE)
+    return p.communicate()[0].startswith('application/x-executable')
+
+def with_valgrind(args):
+    if use_valgrind() and is_binary_exe(find_exe(args[0])):
+        opts = ['--leak-check=full',
+                '--demangle=yes',
+                '--suppressions=${CMAKE_SOURCE_DIR}/tests/valgrind.supp',
+                '--num-callers=12',
+                '--error-exitcode=42',
+                '--quiet']
+        return [valgrind_exe]+opts+args
+    return args
+
+if __name__ == "__main__":
+    try:
+        if len(sys.argv) == 1:
+            print usage
+        elif sys.argv[1] == '-m':
+            sys.argv = sys.argv[2:]
+            runpy.run_module(sys.argv[0], alter_sys=True, run_name="__main__")
+        elif sys.argv[1] == '-s':
+            sys.argv = sys.argv[2:]
+            runpy.run_path(sys.argv[0], run_name="__main__")
+        elif sys.argv[1] == '--sh':
+            for name, value in env_vars.iteritems(): print "%s=%s"%(name, 
value)
+            print "export %s"%' '.join(env_vars.keys())
+        elif sys.argv[1] == '--vg':
+            args = with_valgrind(sys.argv[2:])
+            os.execvp(args[0], args)
+        elif sys.argv[1].startswith('-'):
+            print usage
+        else:
+            args = sys.argv[1:]
+            os.execvp(args[0], args)
+
+    except Exception, e:
+        print "Error in %s: %s"%(" ".join(sys.argv), e)
+        sys.exit(1)

Propchange: qpid/dispatch/trunk/tests/run.py.in
------------------------------------------------------------------------------
    svn:executable = *

Modified: qpid/dispatch/trunk/tests/run_system_tests.py
URL: 
http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/run_system_tests.py?rev=1603289&r1=1603288&r2=1603289&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/run_system_tests.py (original)
+++ qpid/dispatch/trunk/tests/run_system_tests.py Tue Jun 17 20:48:09 2014
@@ -24,27 +24,12 @@ Note that each system test is an executa
 
 import os
 import sys
-import re
-import unittest
+from fnmatch import fnmatch
+import runpy
 
-# Collect all system_tests_*.py scripts
+# Collect all system_tests_*.py scripts in the same directory as this script.
 test_dir = os.path.normpath(os.path.dirname(__file__))
-os.environ.setdefault('QPID_DISPATCH_HOME', os.path.dirname(test_dir))
-tests = [[f] for f in os.listdir(test_dir) if re.match('^system_tests.*.py$', 
f)]
-
-# Tests to re-run with extra parameters
-tests += [['system_tests_two_routers.py', '--ssl']]
-
-status = 0
-
-def run_test(script, *args):
-    global status
-    cmd = "%s %s -v %s"%(sys.executable, os.path.join(test_dir,script), " 
".join(args))
-    sys.stderr.write("\nRunning %s\n"%cmd)
-    if os.system(cmd) != 0:
-        status = 1
-
-for test in tests:
-    run_test(*test)
-
-sys.exit(status)
+tests = [os.path.splitext(f)[0] for f in os.listdir(test_dir) if fnmatch(f, 
"system_tests_*.py")]
+sys.path = [test_dir] + sys.path # Find test modules in sys.path
+sys.argv = ['unittest', '-v'] + tests
+runpy.run_module('unittest', alter_sys=True, run_name="__main__")

Modified: qpid/dispatch/trunk/tests/system_test.py
URL: 
http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/system_test.py?rev=1603289&r1=1603288&r2=1603289&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/system_test.py (original)
+++ qpid/dispatch/trunk/tests/system_test.py Tue Jun 17 20:48:09 2014
@@ -57,6 +57,7 @@ from copy import copy
 import proton
 from proton import Message
 from qpid_dispatch_internal.management import Node
+from run import with_valgrind
 
 # Optional modules
 MISSING_MODULES = []
@@ -193,7 +194,10 @@ def message(**properties):
     return m
 
 class Process(subprocess.Popen):
-    """Popen that can be torn down at the end of a TestCase and stores its 
output."""
+    """
+    Popen that can be torn down at the end of a TestCase and stores its output.
+    Uses valgrind if enabled.
+    """
 
     # Expected states of a Process at teardown
     RUNNING = 1                   # Still running
@@ -216,6 +220,7 @@ class Process(subprocess.Popen):
         self.torndown = False
         kwargs.setdefault('stdout', self.out)
         kwargs.setdefault('stderr', kwargs['stdout'])
+        args = with_valgrind(args)
         super(Process, self).__init__(args, **kwargs)
 
     def assert_running(self):
@@ -229,7 +234,9 @@ class Process(subprocess.Popen):
         self.torndown = True
         status = self.poll()
         if status is None:
-            self.kill()
+            self.terminate()
+            if self.wait() is None:
+                self.kill()
         self.out.close()
         self.check_exit(status)
 
@@ -487,13 +494,15 @@ class Tester(object):
     def teardown(self):
         """Clean up (tear-down, stop or close) objects recorded via 
cleanup()"""
         self.cleanup_list.reverse()
-        for t in self.cleanup_list:
-            for m in ["teardown", "tearDown", "stop", "close"]:
-                a = getattr(t, m, None)
-                if a:
-                    a()
-                    break
-        if self.save_dir: os.chdir(self.save_dir)
+        try:
+            for t in self.cleanup_list:
+                for m in ["teardown", "tearDown", "stop", "close"]:
+                    a = getattr(t, m, None)
+                    if a:
+                        a()
+                        break
+        finally:
+            if self.save_dir: os.chdir(self.save_dir)
 
     def cleanup(self, x):
         """Record object x for clean-up during tear-down.

Modified: qpid/dispatch/trunk/tests/system_tests_two_routers.py
URL: 
http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/system_tests_two_routers.py?rev=1603289&r1=1603288&r2=1603289&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/system_tests_two_routers.py (original)
+++ qpid/dispatch/trunk/tests/system_tests_two_routers.py Tue Jun 17 20:48:09 
2014
@@ -23,8 +23,7 @@ from system_test import TestCase, Messen
 from qpid_dispatch_internal.management import Node
 
 class RouterTest(TestCase):
-    ssl_option = None
-
+    ssl_option = False
 
     @classmethod
     def setUpClass(cls):
@@ -800,8 +799,4 @@ class RouterTest(TestCase):
 
 
 if __name__ == '__main__':
-    if len(sys.argv) > 1:
-        if '--ssl' in sys.argv:
-            sys.argv.remove('--ssl')
-            RouterTest.ssl_option = "ssl"
     unittest.main()

Copied: qpid/dispatch/trunk/tests/system_tests_two_routers_ssl.py (from 
r1602963, qpid/dispatch/trunk/tests/config_build.sh.in)
URL: 
http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/system_tests_two_routers_ssl.py?p2=qpid/dispatch/trunk/tests/system_tests_two_routers_ssl.py&p1=qpid/dispatch/trunk/tests/config_build.sh.in&r1=1602963&r2=1603289&rev=1603289&view=diff
==============================================================================
--- qpid/dispatch/trunk/tests/config_build.sh.in (original)
+++ qpid/dispatch/trunk/tests/system_tests_two_routers_ssl.py Tue Jun 17 
20:48:09 2014
@@ -14,13 +14,16 @@
 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
-# under the License.
+# under the License
 #
 
-# Configuration for running tests directly against the build in src (no need 
to install)
-export SOURCE_DIR=${CMAKE_SOURCE_DIR}
-export BUILD_DIR=${CMAKE_BINARY_DIR}
-export QPID_DISPATCH_HOME=${CMAKE_SOURCE_DIR} # to pick up python system tests.
+import unittest
+from system_tests_two_routers import RouterTest
 
-export PYTHONPATH=$SOURCE_DIR/python:$SOURCE_DIR/tests:$PYTHONPATH
-export PATH=$BUILD_DIR:$BUILD_DIR/router:$BUILD_DIR/tools:$SOURCE_DIR/bin:$PATH
+class RouterTestSsl(RouterTest):
+    ssl_option = True
+
+del RouterTest                  # Don't run it twice.
+
+if __name__ == '__main__':
+    unittest.main()

Added: qpid/dispatch/trunk/tests/valgrind.supp
URL: 
http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/valgrind.supp?rev=1603289&view=auto
==============================================================================
--- qpid/dispatch/trunk/tests/valgrind.supp (added)
+++ qpid/dispatch/trunk/tests/valgrind.supp Tue Jun 17 20:48:09 2014
@@ -0,0 +1 @@
+



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to