From 9557857f8f36d2f942ee761d37234cd09e6c186a Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 27 May 2010 20:02:30 +0000 Subject: Fix problems with cluster_authentication_soak test in VPATH build. - Fix SASL version testing logic in cluster_authentication_soak and SaslAuthenticator - Generate all SASL config in the build directory in sasl_test_setup.sh - Compile cluster_authentication_soak only if SASL is available. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@948968 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/cluster_authentication_soak.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'qpid/cpp/src/tests/cluster_authentication_soak.cpp') diff --git a/qpid/cpp/src/tests/cluster_authentication_soak.cpp b/qpid/cpp/src/tests/cluster_authentication_soak.cpp index 9e878be6d1..31714a19a6 100644 --- a/qpid/cpp/src/tests/cluster_authentication_soak.cpp +++ b/qpid/cpp/src/tests/cluster_authentication_soak.cpp @@ -43,6 +43,7 @@ #include #include +#include #ifdef HAVE_CONFIG_H #include "config.h" @@ -117,13 +118,13 @@ bool runPerftest ( bool hangTest ) { stringstream portSs; portSs << newbiePort; - + string portStr = portSs.str(); char const * path = "./qpid-perftest"; vector argv; argv.push_back ( "./qpid-perftest" ); argv.push_back ( "-p" ); - argv.push_back ( portSs.str().c_str() ); + argv.push_back ( portStr.c_str() ); argv.push_back ( "--username" ); argv.push_back ( "zig" ); argv.push_back ( "--password" ); @@ -166,7 +167,7 @@ runPerftest ( bool hangTest ) { if ( returned_pid == pid ) { int exit_status = WEXITSTATUS(status); if ( exit_status ) { - cerr << "qpid-perftest failed. exit_status was: " << exit_status; + cerr << "qpid-perftest failed. exit_status was: " << exit_status << endl; return false; } else { @@ -242,9 +243,10 @@ int main ( int argc, char ** argv ) { // I need the SASL_PATH_TYPE_CONFIG feature, which did not appear until SASL 2.1.22 - #if (SASL_VERSION_MAJOR < 2) || (SASL_VERSION_MINOR < 1) || (SASL_VERSION_STEP < 22) +#if (SASL_VERSION_FULL < ((2<<16)|(1<<8)|22)) + cout << "Skipping SASL test, SASL version too low." << endl; return 0; - #endif +#endif int n_iterations = argc > 1 ? atoi(argv[1]) : 1; runSilent = argc > 2 ? atoi(argv[2]) : 1; // default to silent @@ -253,12 +255,6 @@ main ( int argc, char ** argv ) int n_brokers = 3; brokerVector brokers; - #ifndef HAVE_SASL - if ( ! runSilent ) - cout << "No SASL support. cluster_authentication_soak disabled."; - return 0; - #endif - srand ( getpid() ); string clusterName; makeClusterName ( clusterName ); -- cgit v1.2.1