summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rw-r--r--messagebus/CMakeLists.txt1
-rw-r--r--messagebus/src/binref/.gitignore3
-rw-r--r--messagebus/src/binref/CMakeLists.txt1
-rw-r--r--messagebus/src/testlist.txt41
-rw-r--r--messagebus/src/vespa/messagebus/testlib/CMakeLists.txt1
-rw-r--r--messagebus/test/CMakeLists.txt9
-rwxr-xr-xmessagebus/test/src/binref/compilejava.in11
l---------messagebus/test/src/binref/progctl.sh1
l---------messagebus/test/src/binref/sbcmd1
l---------messagebus/test/src/binref/slobrok1
l---------messagebus/test/src/binref/testrun.sh1
-rwxr-xr-xmessagebus/test/src/setup.sh11
-rw-r--r--messagebus/test/src/test-report-index.html17
-rw-r--r--messagebus/test/src/testlist.txt6
-rwxr-xr-xmessagebus/test/src/tests/compile-java/compile-java_test.sh7
-rwxr-xr-xmessagebus/test/src/tests/create-test.sh71
-rwxr-xr-xmessagebus/test/src/tests/error/ctl.sh4
-rwxr-xr-xmessagebus/test/src/tests/error/error_test.sh7
-rw-r--r--messagebus/test/src/tests/errorcodes/errorcodes_test.sh10
-rwxr-xr-xmessagebus/test/src/tests/speed/ctl.sh4
-rw-r--r--messagebus/test/src/tests/speed/speed_test.sh9
-rwxr-xr-xmessagebus/test/src/tests/trace/ctl.sh4
-rw-r--r--messagebus/test/src/tests/trace/trace_test.sh8
-rw-r--r--messagebus/test/testrun/.gitignore9
-rw-r--r--messagebus_test/CMakeLists.txt17
-rw-r--r--messagebus_test/OWNERS3
-rw-r--r--messagebus_test/README1
-rw-r--r--messagebus_test/src/.gitignore (renamed from messagebus/test/src/.gitignore)0
-rw-r--r--messagebus_test/src/binref/.gitignore (renamed from messagebus/test/src/binref/.gitignore)0
-rw-r--r--messagebus_test/src/binref/CMakeLists.txt (renamed from messagebus/test/src/binref/CMakeLists.txt)0
-rwxr-xr-xmessagebus_test/src/binref/compilejava.in11
-rw-r--r--messagebus_test/src/binref/env.sh.in (renamed from messagebus/test/src/binref/env.sh.in)2
l---------messagebus_test/src/binref/progctl.sh1
-rwxr-xr-xmessagebus_test/src/binref/runjava.in (renamed from messagebus/test/src/binref/runjava.in)4
-rw-r--r--messagebus_test/src/tests/compile-cpp/.gitignore (renamed from messagebus/test/src/tests/compile-cpp/.gitignore)0
-rw-r--r--messagebus_test/src/tests/compile-cpp/CMakeLists.txt (renamed from messagebus/test/src/tests/compile-cpp/CMakeLists.txt)1
-rw-r--r--messagebus_test/src/tests/compile-cpp/DESC (renamed from messagebus/test/src/tests/compile-cpp/DESC)0
-rw-r--r--messagebus_test/src/tests/compile-cpp/FILES (renamed from messagebus/test/src/tests/compile-cpp/FILES)0
-rw-r--r--messagebus_test/src/tests/compile-cpp/compile-cpp.cpp (renamed from messagebus/test/src/tests/compile-cpp/compile-cpp.cpp)0
-rw-r--r--messagebus_test/src/tests/compile-java/.gitignore (renamed from messagebus/test/src/tests/compile-java/.gitignore)0
-rw-r--r--messagebus_test/src/tests/compile-java/CMakeLists.txt (renamed from messagebus/test/src/tests/compile-java/CMakeLists.txt)2
-rw-r--r--messagebus_test/src/tests/compile-java/DESC (renamed from messagebus/test/src/tests/compile-java/DESC)0
-rw-r--r--messagebus_test/src/tests/compile-java/FILES (renamed from messagebus/test/src/tests/compile-java/FILES)0
-rw-r--r--messagebus_test/src/tests/compile-java/TestCompile.java (renamed from messagebus/test/src/tests/compile-java/TestCompile.java)0
-rwxr-xr-xmessagebus_test/src/tests/compile-java/compile-java_test.sh12
-rw-r--r--messagebus_test/src/tests/error/.gitignore (renamed from messagebus/test/src/tests/error/.gitignore)0
-rw-r--r--messagebus_test/src/tests/error/CMakeLists.txt (renamed from messagebus/test/src/tests/error/CMakeLists.txt)6
-rw-r--r--messagebus_test/src/tests/error/DESC (renamed from messagebus/test/src/tests/error/DESC)0
-rw-r--r--messagebus_test/src/tests/error/FILES (renamed from messagebus/test/src/tests/error/FILES)0
-rw-r--r--messagebus_test/src/tests/error/JavaClient.java (renamed from messagebus/test/src/tests/error/JavaClient.java)0
-rw-r--r--messagebus_test/src/tests/error/JavaServer.java (renamed from messagebus/test/src/tests/error/JavaServer.java)0
-rw-r--r--messagebus_test/src/tests/error/cpp-client.cpp (renamed from messagebus/test/src/tests/error/cpp-client.cpp)0
-rw-r--r--messagebus_test/src/tests/error/cpp-server.cpp (renamed from messagebus/test/src/tests/error/cpp-server.cpp)0
-rwxr-xr-xmessagebus_test/src/tests/error/ctl.sh10
-rw-r--r--messagebus_test/src/tests/error/error.cpp (renamed from messagebus/test/src/tests/error/error.cpp)16
-rwxr-xr-xmessagebus_test/src/tests/error/error_test.sh12
-rw-r--r--messagebus_test/src/tests/error/progdefs.sh (renamed from messagebus/test/src/tests/error/progdefs.sh)2
-rw-r--r--messagebus_test/src/tests/error/routing-template.cfg (renamed from messagebus/test/src/tests/error/routing-template.cfg)0
-rw-r--r--messagebus_test/src/tests/errorcodes/.gitignore (renamed from messagebus/test/src/tests/errorcodes/.gitignore)0
-rw-r--r--messagebus_test/src/tests/errorcodes/CMakeLists.txt (renamed from messagebus/test/src/tests/errorcodes/CMakeLists.txt)4
-rw-r--r--messagebus_test/src/tests/errorcodes/DESC (renamed from messagebus/test/src/tests/errorcodes/DESC)0
-rw-r--r--messagebus_test/src/tests/errorcodes/DumpCodes.java (renamed from messagebus/test/src/tests/errorcodes/DumpCodes.java)0
-rw-r--r--messagebus_test/src/tests/errorcodes/FILES (renamed from messagebus/test/src/tests/errorcodes/FILES)0
-rw-r--r--messagebus_test/src/tests/errorcodes/dumpcodes.cpp (renamed from messagebus/test/src/tests/errorcodes/dumpcodes.cpp)0
-rwxr-xr-xmessagebus_test/src/tests/errorcodes/errorcodes_test.sh15
-rw-r--r--messagebus_test/src/tests/errorcodes/ref-dump.txt (renamed from messagebus/test/src/tests/errorcodes/ref-dump.txt)0
-rw-r--r--messagebus_test/src/tests/speed/.gitignore (renamed from messagebus/test/src/tests/speed/.gitignore)0
-rw-r--r--messagebus_test/src/tests/speed/CMakeLists.txt (renamed from messagebus/test/src/tests/speed/CMakeLists.txt)6
-rw-r--r--messagebus_test/src/tests/speed/DESC (renamed from messagebus/test/src/tests/speed/DESC)0
-rw-r--r--messagebus_test/src/tests/speed/FILES (renamed from messagebus/test/src/tests/speed/FILES)0
-rw-r--r--messagebus_test/src/tests/speed/JavaClient.java (renamed from messagebus/test/src/tests/speed/JavaClient.java)0
-rw-r--r--messagebus_test/src/tests/speed/JavaServer.java (renamed from messagebus/test/src/tests/speed/JavaServer.java)0
-rw-r--r--messagebus_test/src/tests/speed/cpp-client.cpp (renamed from messagebus/test/src/tests/speed/cpp-client.cpp)0
-rw-r--r--messagebus_test/src/tests/speed/cpp-server.cpp (renamed from messagebus/test/src/tests/speed/cpp-server.cpp)0
-rwxr-xr-xmessagebus_test/src/tests/speed/ctl.sh10
-rw-r--r--messagebus_test/src/tests/speed/progdefs.sh (renamed from messagebus/test/src/tests/speed/progdefs.sh)2
-rw-r--r--messagebus_test/src/tests/speed/routing-template.cfg (renamed from messagebus/test/src/tests/speed/routing-template.cfg)0
-rw-r--r--messagebus_test/src/tests/speed/speed.cpp (renamed from messagebus/test/src/tests/speed/speed.cpp)17
-rwxr-xr-xmessagebus_test/src/tests/speed/speed_test.sh13
-rw-r--r--messagebus_test/src/tests/trace/.gitignore (renamed from messagebus/test/src/tests/trace/.gitignore)0
-rw-r--r--messagebus_test/src/tests/trace/CMakeLists.txt (renamed from messagebus/test/src/tests/trace/CMakeLists.txt)4
-rw-r--r--messagebus_test/src/tests/trace/DESC (renamed from messagebus/test/src/tests/trace/DESC)0
-rw-r--r--messagebus_test/src/tests/trace/FILES (renamed from messagebus/test/src/tests/trace/FILES)0
-rw-r--r--messagebus_test/src/tests/trace/JavaServer.java (renamed from messagebus/test/src/tests/trace/JavaServer.java)0
-rw-r--r--messagebus_test/src/tests/trace/cpp-server.cpp (renamed from messagebus/test/src/tests/trace/cpp-server.cpp)0
-rwxr-xr-xmessagebus_test/src/tests/trace/ctl.sh10
-rw-r--r--messagebus_test/src/tests/trace/progdefs.sh (renamed from messagebus/test/src/tests/trace/progdefs.sh)14
-rw-r--r--messagebus_test/src/tests/trace/routing-template.cfg32
-rw-r--r--messagebus_test/src/tests/trace/trace.cpp (renamed from messagebus/test/src/tests/trace/trace.cpp)12
-rwxr-xr-xmessagebus_test/src/tests/trace/trace_test.sh12
-rw-r--r--searchcorespi/src/tests/plugin/CMakeLists.txt24
92 files changed, 236 insertions, 278 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cc10f7cb73d..aed0ca2fc20 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,6 +41,7 @@ add_subdirectory(logd)
add_subdirectory(lowercasing_test)
add_subdirectory(memfilepersistence)
add_subdirectory(messagebus)
+add_subdirectory(messagebus_test)
add_subdirectory(metrics)
add_subdirectory(persistence)
add_subdirectory(persistencetypes)
diff --git a/messagebus/CMakeLists.txt b/messagebus/CMakeLists.txt
index 534887e011b..332e83128ed 100644
--- a/messagebus/CMakeLists.txt
+++ b/messagebus/CMakeLists.txt
@@ -17,7 +17,6 @@ vespa_define_module(
APPS
src/apps/printversion
- src/binref
TESTS
src/tests
diff --git a/messagebus/src/binref/.gitignore b/messagebus/src/binref/.gitignore
deleted file mode 100644
index cfb0e619824..00000000000
--- a/messagebus/src/binref/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.depend
-Makefile
-testrun.sh
diff --git a/messagebus/src/binref/CMakeLists.txt b/messagebus/src/binref/CMakeLists.txt
deleted file mode 100644
index 5c90dd5bfcc..00000000000
--- a/messagebus/src/binref/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
diff --git a/messagebus/src/testlist.txt b/messagebus/src/testlist.txt
deleted file mode 100644
index e096aa5a9a1..00000000000
--- a/messagebus/src/testlist.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-tests/advancedrouting
-tests/auto-reply
-tests/bucketsequence
-tests/blob
-tests/choke
-tests/configagent
-tests/context
-tests/emptyreply
-tests/error
-tests/identity
-tests/loadbalance
-tests/messagebus
-tests/messenger
-tests/oos
-tests/protocolrepository
-tests/queue
-tests/replygate
-tests/resender
-tests/result
-tests/retrypolicy
-tests/routable
-tests/routablequeue
-tests/routeparser
-tests/routing
-tests/routingcontext
-tests/routingspec
-tests/rpcserviceaddress
-tests/sendadapter
-tests/sequencer
-tests/serviceaddress
-tests/servicepool
-tests/shutdown
-tests/simple-roundtrip
-tests/simpleprotocol
-tests/slobrok
-tests/sourcesession
-tests/targetpool
-tests/throttling
-tests/timeout
-tests/trace-roundtrip
-tests/messageordering
diff --git a/messagebus/src/vespa/messagebus/testlib/CMakeLists.txt b/messagebus/src/vespa/messagebus/testlib/CMakeLists.txt
index 4c930bfd9aa..2c80b4d155c 100644
--- a/messagebus/src/vespa/messagebus/testlib/CMakeLists.txt
+++ b/messagebus/src/vespa/messagebus/testlib/CMakeLists.txt
@@ -13,5 +13,6 @@ vespa_add_library(messagebus_messagebus-test
testserver.cpp
INSTALL lib64
DEPENDS
+ messagebus
slobrok_slobrokserver
)
diff --git a/messagebus/test/CMakeLists.txt b/messagebus/test/CMakeLists.txt
deleted file mode 100644
index 1e2fb57b960..00000000000
--- a/messagebus/test/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-vespa_add_module_dependency(slobrok_slobrokserver)
-vespa_add_module_dependency(messagebus)
-add_subdirectory(src/binref)
-add_subdirectory(src/tests/compile-cpp)
-add_subdirectory(src/tests/compile-java)
-add_subdirectory(src/tests/error)
-add_subdirectory(src/tests/errorcodes)
-add_subdirectory(src/tests/speed)
-add_subdirectory(src/tests/trace)
diff --git a/messagebus/test/src/binref/compilejava.in b/messagebus/test/src/binref/compilejava.in
deleted file mode 100755
index bebe4374afb..00000000000
--- a/messagebus/test/src/binref/compilejava.in
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-unset VESPA_LOG_TARGET
-CLASSPATH=@PROJECT_BINARY_DIR@/messagebus/target/messagebus-jar-with-dependencies.jar
-CLASSPATH=$CLASSPATH:@PROJECT_BINARY_DIR@/component/target/component.jar
-CLASSPATH=$CLASSPATH:.
-
-if [ $# -lt 1 ]; then
- echo "usage: compilejava file ..."
- exit 1
-fi
-exec javac -classpath $CLASSPATH "$@"
diff --git a/messagebus/test/src/binref/progctl.sh b/messagebus/test/src/binref/progctl.sh
deleted file mode 120000
index 781d2058cf9..00000000000
--- a/messagebus/test/src/binref/progctl.sh
+++ /dev/null
@@ -1 +0,0 @@
-../../../../vespalib/src/vespa/vespalib/testkit/progctl.sh \ No newline at end of file
diff --git a/messagebus/test/src/binref/sbcmd b/messagebus/test/src/binref/sbcmd
deleted file mode 120000
index 49b9c735282..00000000000
--- a/messagebus/test/src/binref/sbcmd
+++ /dev/null
@@ -1 +0,0 @@
-../../../../slobrok/src/apps/sbcmd/sbcmd \ No newline at end of file
diff --git a/messagebus/test/src/binref/slobrok b/messagebus/test/src/binref/slobrok
deleted file mode 120000
index 5bc8ae2a9f2..00000000000
--- a/messagebus/test/src/binref/slobrok
+++ /dev/null
@@ -1 +0,0 @@
-../../../../slobrok/src/apps/slobrok/slobrok \ No newline at end of file
diff --git a/messagebus/test/src/binref/testrun.sh b/messagebus/test/src/binref/testrun.sh
deleted file mode 120000
index 457b9f75c5e..00000000000
--- a/messagebus/test/src/binref/testrun.sh
+++ /dev/null
@@ -1 +0,0 @@
-../../../../vespalib/src/vespa/vespalib/testkit/testrun.sh \ No newline at end of file
diff --git a/messagebus/test/src/setup.sh b/messagebus/test/src/setup.sh
deleted file mode 100755
index 2111dfb447c..00000000000
--- a/messagebus/test/src/setup.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh -e
-# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-MYDIR=`pwd`
-cp ../../src/cpp/Makefile.inc .
-cp ../../src/cpp/versiontag.mak .
-cp ../../src/cpp/config.cfg .
-cp ../../src/cpp/config_command.sh .
-sh config_command.sh
-echo MODULEDEP_INCLUDES += -I$MYDIR/../../src/cpp >> Makefile.ini
-echo LIBDIR_MESSAGEBUS=$MYDIR/../../src/cpp/messagebus >> Makefile.ini
-echo LIBDIR_MESSAGEBUS-TEST=$MYDIR/../../src/cpp/messagebus/testlib >> Makefile.ini
diff --git a/messagebus/test/src/test-report-index.html b/messagebus/test/src/test-report-index.html
deleted file mode 100644
index 4ddd6eab8f9..00000000000
--- a/messagebus/test/src/test-report-index.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
-<html>
- <title>Messagebus</title>
- <body>
- <h1>Messagebus Test Reports</h1>
- <ul>
- <li><a href="../../../messagebus/target/site/surefire-report.html">Messagebus Java Test Report</a></li>
- <li><a href="test-report-cpp/test-report.html">Messagebus C++ Test Report</a></li>
- <li><a href="test-report-cross/test-report.html">Messagebus Cross-language Test Report</a></li>
- </ul>
- <h1>Messagebus API Documentation</h1>
- <ul>
- <li><a href="../../../messagebus/src/java/docs/javadoc/index.html">Messagebus Java API Documentation</a></li>
- <li><a href="../../../messagebus/src/cpp/doxygen/html/index.html">Messagebus C++ API Documentation</a></li>
- </ul>
- </body>
-</html>
diff --git a/messagebus/test/src/testlist.txt b/messagebus/test/src/testlist.txt
deleted file mode 100644
index 3ff4369c385..00000000000
--- a/messagebus/test/src/testlist.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-tests/compile-java
-tests/compile-cpp
-tests/trace
-tests/error
-tests/errorcodes
-tests/speed
diff --git a/messagebus/test/src/tests/compile-java/compile-java_test.sh b/messagebus/test/src/tests/compile-java/compile-java_test.sh
deleted file mode 100755
index 9b94ffd51a1..00000000000
--- a/messagebus/test/src/tests/compile-java/compile-java_test.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-set -e
-. ../../binref/env.sh
-
-$BINREF/compilejava TestCompile.java
-$BINREF/runjava TestCompile
-
diff --git a/messagebus/test/src/tests/create-test.sh b/messagebus/test/src/tests/create-test.sh
deleted file mode 100755
index 27277838a07..00000000000
--- a/messagebus/test/src/tests/create-test.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/sh
-# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-gen_ignore_file() {
- echo "generating '$1' ..."
- echo ".depend" > $1
- echo "Makefile" >> $1
- echo "${test}_test" >> $1
-}
-
-gen_project_file() {
- echo "generating '$1' ..."
- echo "APPLICATION ${test}_test" > $1
- echo "OBJS $test" >> $1
- echo "EXTERNALLIBS messagebus messagebus-test" >> $1
- echo "EXTERNALLIBS slobrokserver slobrok fnet vespalib config vespalog" >> $1
- echo "" >> $1
- echo "CUSTOMMAKE" >> $1
- echo "test: depend ${test}_test" >> $1
- echo -e "\t@./${test}_test" >> $1
-}
-
-gen_source() {
- echo "generating '$1' ..."
- echo "#include <vespa/log/log.h>" > $1
- echo "LOG_SETUP(\"${test}_test\");" >> $1
- echo "#include <vespa/fastos/fastos.h>" >> $1
- echo "#include <vespa/vespalib/testkit/testapp.h>" >> $1
- echo "" >> $1
- echo "TEST_SETUP(Test);" >> $1
- echo "" >> $1
- echo "int" >> $1
- echo "Test::Main()" >> $1
- echo "{" >> $1
- echo " TEST_INIT(\"${test}_test\");" >> $1
- echo " TEST_DONE();" >> $1
- echo "}" >> $1
-}
-
-gen_desc() {
- echo "generating '$1' ..."
- echo "$test test. Take a look at $test.cpp for details." > $1
-}
-
-gen_file_list() {
- echo "generating '$1' ..."
- echo "$test.cpp" > $1
-}
-
-if [ $# -ne 1 ]; then
- echo "usage: $0 <name>"
- echo " name: name of the test to create"
- exit 1
-fi
-
-test=$1
-if [ -e $test ]; then
- echo "$test already present, don't want to mess it up..."
- exit 1
-fi
-
-echo "creating directory '$test' ..."
-mkdir -p $test || exit 1
-cd $test || exit 1
-test=`basename $test`
-
-gen_ignore_file .cvsignore
-gen_project_file fastos.project
-gen_source $test.cpp
-gen_desc DESC
-gen_file_list FILES
diff --git a/messagebus/test/src/tests/error/ctl.sh b/messagebus/test/src/tests/error/ctl.sh
deleted file mode 100755
index 864be4290ed..00000000000
--- a/messagebus/test/src/tests/error/ctl.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-exec ../../binref/progctl.sh progdefs.sh "$@"
diff --git a/messagebus/test/src/tests/error/error_test.sh b/messagebus/test/src/tests/error/error_test.sh
deleted file mode 100755
index e2b567f5823..00000000000
--- a/messagebus/test/src/tests/error/error_test.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-set -e
-. ../../binref/env.sh
-
-$BINREF/compilejava JavaServer.java
-$BINREF/compilejava JavaClient.java
-VESPA_LOG_LEVEL='all -spam' ./messagebus_test_error_test_app
diff --git a/messagebus/test/src/tests/errorcodes/errorcodes_test.sh b/messagebus/test/src/tests/errorcodes/errorcodes_test.sh
deleted file mode 100644
index 7c30378cd1a..00000000000
--- a/messagebus/test/src/tests/errorcodes/errorcodes_test.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-set -e
-. ../../binref/env.sh
-
-$BINREF/compilejava DumpCodes.java
-
-./messagebus_test_dumpcodes_app > cpp-dump.txt
-$BINREF/runjava DumpCodes > java-dump.txt
-diff -u ref-dump.txt cpp-dump.txt
-diff -u ref-dump.txt java-dump.txt
diff --git a/messagebus/test/src/tests/speed/ctl.sh b/messagebus/test/src/tests/speed/ctl.sh
deleted file mode 100755
index 864be4290ed..00000000000
--- a/messagebus/test/src/tests/speed/ctl.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-exec ../../binref/progctl.sh progdefs.sh "$@"
diff --git a/messagebus/test/src/tests/speed/speed_test.sh b/messagebus/test/src/tests/speed/speed_test.sh
deleted file mode 100644
index 77eb7e63e0c..00000000000
--- a/messagebus/test/src/tests/speed/speed_test.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-set -e
-
-. ../../binref/env.sh
-
-$BINREF/compilejava JavaServer.java
-$BINREF/compilejava JavaClient.java
-
-(ulimit -c; ulimit -H -c; ulimit -c unlimited; ./messagebus_test_speed_test_app)
diff --git a/messagebus/test/src/tests/trace/ctl.sh b/messagebus/test/src/tests/trace/ctl.sh
deleted file mode 100755
index 864be4290ed..00000000000
--- a/messagebus/test/src/tests/trace/ctl.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-exec ../../binref/progctl.sh progdefs.sh "$@"
diff --git a/messagebus/test/src/tests/trace/trace_test.sh b/messagebus/test/src/tests/trace/trace_test.sh
deleted file mode 100644
index 63005385332..00000000000
--- a/messagebus/test/src/tests/trace/trace_test.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-set -e
-
-. ../../binref/env.sh
-
-$BINREF/compilejava JavaServer.java
-
-./messagebus_test_trace_test_app
diff --git a/messagebus/test/testrun/.gitignore b/messagebus/test/testrun/.gitignore
deleted file mode 100644
index b29b0c6486c..00000000000
--- a/messagebus/test/testrun/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-test-report.html
-test-report.html.*
-test.*.*.desc
-test.*.*.file.*
-test.*.*.files.html
-test.*.*.log
-tmp.*
-xsync.log
-/test.*.*.result
diff --git a/messagebus_test/CMakeLists.txt b/messagebus_test/CMakeLists.txt
new file mode 100644
index 00000000000..96dc39327ac
--- /dev/null
+++ b/messagebus_test/CMakeLists.txt
@@ -0,0 +1,17 @@
+vespa_define_module(
+ DEPENDS
+ slobrok_slobrokserver
+ messagebus
+
+ APPS
+ src/binref
+
+ TESTS
+ src/tests/compile-cpp
+ src/tests/compile-java
+ src/tests/error
+ src/tests/errorcodes
+ src/tests/speed
+ src/tests/trace
+)
+
diff --git a/messagebus_test/OWNERS b/messagebus_test/OWNERS
new file mode 100644
index 00000000000..7379f3287ad
--- /dev/null
+++ b/messagebus_test/OWNERS
@@ -0,0 +1,3 @@
+dybis
+baldersheim
+
diff --git a/messagebus_test/README b/messagebus_test/README
new file mode 100644
index 00000000000..7c63f8b1a48
--- /dev/null
+++ b/messagebus_test/README
@@ -0,0 +1 @@
+This is the generic Vespa message bus infrastructure tests that combine C++ and Java.
diff --git a/messagebus/test/src/.gitignore b/messagebus_test/src/.gitignore
index 8689bfd3624..8689bfd3624 100644
--- a/messagebus/test/src/.gitignore
+++ b/messagebus_test/src/.gitignore
diff --git a/messagebus/test/src/binref/.gitignore b/messagebus_test/src/binref/.gitignore
index c1b83610972..c1b83610972 100644
--- a/messagebus/test/src/binref/.gitignore
+++ b/messagebus_test/src/binref/.gitignore
diff --git a/messagebus/test/src/binref/CMakeLists.txt b/messagebus_test/src/binref/CMakeLists.txt
index 20594f98d02..20594f98d02 100644
--- a/messagebus/test/src/binref/CMakeLists.txt
+++ b/messagebus_test/src/binref/CMakeLists.txt
diff --git a/messagebus_test/src/binref/compilejava.in b/messagebus_test/src/binref/compilejava.in
new file mode 100755
index 00000000000..3dca3c2f3db
--- /dev/null
+++ b/messagebus_test/src/binref/compilejava.in
@@ -0,0 +1,11 @@
+#!/bin/sh
+unset VESPA_LOG_TARGET
+CLASSPATH=@PROJECT_SOURCE_DIR@/messagebus/target/messagebus-jar-with-dependencies.jar
+CLASSPATH=$CLASSPATH:@PROJECT_SOURCE_DIR@/component/target/component.jar
+CLASSPATH=$CLASSPATH:.
+
+if [ $# -lt 1 ]; then
+ echo "usage: compilejava file ..."
+ exit 1
+fi
+exec javac -d . -classpath $CLASSPATH "$@"
diff --git a/messagebus/test/src/binref/env.sh.in b/messagebus_test/src/binref/env.sh.in
index dda4234226f..d485eb9dfea 100644
--- a/messagebus/test/src/binref/env.sh.in
+++ b/messagebus_test/src/binref/env.sh.in
@@ -1,2 +1,2 @@
BINREF=@CMAKE_CURRENT_BINARY_DIR@
-export BINREF
+export BINREF
diff --git a/messagebus_test/src/binref/progctl.sh b/messagebus_test/src/binref/progctl.sh
new file mode 120000
index 00000000000..2c1fb1d47ce
--- /dev/null
+++ b/messagebus_test/src/binref/progctl.sh
@@ -0,0 +1 @@
+../../../vespalib/src/vespa/vespalib/testkit/progctl.sh \ No newline at end of file
diff --git a/messagebus/test/src/binref/runjava.in b/messagebus_test/src/binref/runjava.in
index 20d4de0a477..f6427a1f7cc 100755
--- a/messagebus/test/src/binref/runjava.in
+++ b/messagebus_test/src/binref/runjava.in
@@ -1,8 +1,8 @@
#!/bin/sh
unset VESPA_LOG_TARGET
unset LD_PRELOAD
-CLASSPATH=@PROJECT_BINARY_DIR@/messagebus/target/messagebus-jar-with-dependencies.jar
-CLASSPATH=$CLASSPATH:@PROJECT_BINARY_DIR@/component/target/component.jar
+CLASSPATH=@PROJECT_SOURCE_DIR@/messagebus/target/messagebus-jar-with-dependencies.jar
+CLASSPATH=$CLASSPATH:@PROJECT_SOURCE_DIR@/component/target/component.jar
CLASSPATH=$CLASSPATH:.
if [ $# -lt 1 ]; then
echo "usage: runjava <class> [args]"
diff --git a/messagebus/test/src/tests/compile-cpp/.gitignore b/messagebus_test/src/tests/compile-cpp/.gitignore
index 14e4fb37c45..14e4fb37c45 100644
--- a/messagebus/test/src/tests/compile-cpp/.gitignore
+++ b/messagebus_test/src/tests/compile-cpp/.gitignore
diff --git a/messagebus/test/src/tests/compile-cpp/CMakeLists.txt b/messagebus_test/src/tests/compile-cpp/CMakeLists.txt
index aa82392d661..86e3d7388ab 100644
--- a/messagebus/test/src/tests/compile-cpp/CMakeLists.txt
+++ b/messagebus_test/src/tests/compile-cpp/CMakeLists.txt
@@ -3,5 +3,6 @@ vespa_add_executable(messagebus_test_compile-cpp_test_app TEST
SOURCES
compile-cpp.cpp
DEPENDS
+ messagebus
)
vespa_add_test(NAME messagebus_test_compile-cpp_test_app NO_VALGRIND COMMAND messagebus_test_compile-cpp_test_app)
diff --git a/messagebus/test/src/tests/compile-cpp/DESC b/messagebus_test/src/tests/compile-cpp/DESC
index 465d625ca9e..465d625ca9e 100644
--- a/messagebus/test/src/tests/compile-cpp/DESC
+++ b/messagebus_test/src/tests/compile-cpp/DESC
diff --git a/messagebus/test/src/tests/compile-cpp/FILES b/messagebus_test/src/tests/compile-cpp/FILES
index 956ce16a56e..956ce16a56e 100644
--- a/messagebus/test/src/tests/compile-cpp/FILES
+++ b/messagebus_test/src/tests/compile-cpp/FILES
diff --git a/messagebus/test/src/tests/compile-cpp/compile-cpp.cpp b/messagebus_test/src/tests/compile-cpp/compile-cpp.cpp
index e15b57859b7..e15b57859b7 100644
--- a/messagebus/test/src/tests/compile-cpp/compile-cpp.cpp
+++ b/messagebus_test/src/tests/compile-cpp/compile-cpp.cpp
diff --git a/messagebus/test/src/tests/compile-java/.gitignore b/messagebus_test/src/tests/compile-java/.gitignore
index d615ebbafe7..d615ebbafe7 100644
--- a/messagebus/test/src/tests/compile-java/.gitignore
+++ b/messagebus_test/src/tests/compile-java/.gitignore
diff --git a/messagebus/test/src/tests/compile-java/CMakeLists.txt b/messagebus_test/src/tests/compile-java/CMakeLists.txt
index 3e7665f5fed..f13175939f6 100644
--- a/messagebus/test/src/tests/compile-java/CMakeLists.txt
+++ b/messagebus_test/src/tests/compile-java/CMakeLists.txt
@@ -1,2 +1,2 @@
# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-vespa_add_test(NAME messagebus_test_compile-java_test NO_VALGRIND COMMAND sh compile-java_test.sh)
+vespa_add_test(NAME messagebus_test_compile-java_test NO_VALGRIND COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/compile-java_test.sh)
diff --git a/messagebus/test/src/tests/compile-java/DESC b/messagebus_test/src/tests/compile-java/DESC
index 465d625ca9e..465d625ca9e 100644
--- a/messagebus/test/src/tests/compile-java/DESC
+++ b/messagebus_test/src/tests/compile-java/DESC
diff --git a/messagebus/test/src/tests/compile-java/FILES b/messagebus_test/src/tests/compile-java/FILES
index 5b154bb1605..5b154bb1605 100644
--- a/messagebus/test/src/tests/compile-java/FILES
+++ b/messagebus_test/src/tests/compile-java/FILES
diff --git a/messagebus/test/src/tests/compile-java/TestCompile.java b/messagebus_test/src/tests/compile-java/TestCompile.java
index 443ae093794..443ae093794 100644
--- a/messagebus/test/src/tests/compile-java/TestCompile.java
+++ b/messagebus_test/src/tests/compile-java/TestCompile.java
diff --git a/messagebus_test/src/tests/compile-java/compile-java_test.sh b/messagebus_test/src/tests/compile-java/compile-java_test.sh
new file mode 100755
index 00000000000..d99e3e841e5
--- /dev/null
+++ b/messagebus_test/src/tests/compile-java/compile-java_test.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+set -e
+
+if [ -z "$SOURCE_DIRECTORY" ]; then
+ SOURCE_DIRECTORY="."
+fi
+
+. ../../binref/env.sh
+
+$BINREF/compilejava $SOURCE_DIRECTORY/TestCompile.java
+$BINREF/runjava TestCompile
+
diff --git a/messagebus/test/src/tests/error/.gitignore b/messagebus_test/src/tests/error/.gitignore
index 20cb631e9e8..20cb631e9e8 100644
--- a/messagebus/test/src/tests/error/.gitignore
+++ b/messagebus_test/src/tests/error/.gitignore
diff --git a/messagebus/test/src/tests/error/CMakeLists.txt b/messagebus_test/src/tests/error/CMakeLists.txt
index 5baadf2b18b..926047f31cd 100644
--- a/messagebus/test/src/tests/error/CMakeLists.txt
+++ b/messagebus_test/src/tests/error/CMakeLists.txt
@@ -3,15 +3,19 @@ vespa_add_executable(messagebus_test_error_test_app TEST
SOURCES
error.cpp
DEPENDS
+ messagebus_messagebus-test
)
-vespa_add_test(NAME messagebus_test_error_test_app NO_VALGRIND COMMAND sh error_test.sh)
vespa_add_executable(messagebus_test_cpp-server-error_app
SOURCES
cpp-server.cpp
DEPENDS
+ messagebus_messagebus-test
)
vespa_add_executable(messagebus_test_cpp-client-error_app
SOURCES
cpp-client.cpp
DEPENDS
+ messagebus_messagebus-test
)
+vespa_add_test(NAME messagebus_test_error_test_app NO_VALGRIND COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/error_test.sh
+ DEPENDS messagebus_test_error_test_app messagebus_test_cpp-server-error_app messagebus_test_cpp-client-error_app)
diff --git a/messagebus/test/src/tests/error/DESC b/messagebus_test/src/tests/error/DESC
index 171966761ee..171966761ee 100644
--- a/messagebus/test/src/tests/error/DESC
+++ b/messagebus_test/src/tests/error/DESC
diff --git a/messagebus/test/src/tests/error/FILES b/messagebus_test/src/tests/error/FILES
index 571002a917f..571002a917f 100644
--- a/messagebus/test/src/tests/error/FILES
+++ b/messagebus_test/src/tests/error/FILES
diff --git a/messagebus/test/src/tests/error/JavaClient.java b/messagebus_test/src/tests/error/JavaClient.java
index e263b3597da..e263b3597da 100644
--- a/messagebus/test/src/tests/error/JavaClient.java
+++ b/messagebus_test/src/tests/error/JavaClient.java
diff --git a/messagebus/test/src/tests/error/JavaServer.java b/messagebus_test/src/tests/error/JavaServer.java
index b5321f41fc3..b5321f41fc3 100644
--- a/messagebus/test/src/tests/error/JavaServer.java
+++ b/messagebus_test/src/tests/error/JavaServer.java
diff --git a/messagebus/test/src/tests/error/cpp-client.cpp b/messagebus_test/src/tests/error/cpp-client.cpp
index 4f94a13977c..4f94a13977c 100644
--- a/messagebus/test/src/tests/error/cpp-client.cpp
+++ b/messagebus_test/src/tests/error/cpp-client.cpp
diff --git a/messagebus/test/src/tests/error/cpp-server.cpp b/messagebus_test/src/tests/error/cpp-server.cpp
index 2eb929f6ca9..2eb929f6ca9 100644
--- a/messagebus/test/src/tests/error/cpp-server.cpp
+++ b/messagebus_test/src/tests/error/cpp-server.cpp
diff --git a/messagebus_test/src/tests/error/ctl.sh b/messagebus_test/src/tests/error/ctl.sh
new file mode 100755
index 00000000000..ca4fc7701e6
--- /dev/null
+++ b/messagebus_test/src/tests/error/ctl.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+if [ -z "$SOURCE_DIRECTORY" ]; then
+ SOURCE_DIRECTORY="."
+fi
+
+. ../../binref/env.sh
+
+exec $SOURCE_DIRECTORY/../../binref/progctl.sh $SOURCE_DIRECTORY/progdefs.sh "$@"
diff --git a/messagebus/test/src/tests/error/error.cpp b/messagebus_test/src/tests/error/error.cpp
index 9b01e5d61d0..749874a5ef2 100644
--- a/messagebus/test/src/tests/error/error.cpp
+++ b/messagebus_test/src/tests/error/error.cpp
@@ -3,6 +3,7 @@
#include <vespa/log/log.h>
LOG_SETUP("error_test");
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/messagebus/testlib/slobrok.h>
#include <vespa/vespalib/util/stringfmt.h>
@@ -16,6 +17,9 @@ Test::Main()
{
TEST_INIT("error_test");
Slobrok slobrok;
+ const std::string routing_template = TEST_PATH("routing-template.cfg");
+ const std::string ctl_script = TEST_PATH("ctl.sh");
+
{ // Make slobrok config
EXPECT_TRUE(system("echo slobrok[1] > slobrok.cfg") == 0);
EXPECT_TRUE(system(make_string("echo 'slobrok[0].connectionspec tcp/localhost:%d' "
@@ -23,23 +27,23 @@ Test::Main()
}
{ // CPP SERVER
{ // Make routing config
- EXPECT_TRUE(system("cat routing-template.cfg | sed 's#session#cpp/session#' > routing.cfg") == 0);
+ EXPECT_TRUE(system(("cat " + routing_template + " | sed 's#session#cpp/session#' > routing.cfg").c_str()) == 0);
}
fprintf(stderr, "STARTING CPP-SERVER\n");
- EXPECT_TRUE(system("sh ctl.sh start server cpp") == 0);
+ EXPECT_TRUE(system((ctl_script + " start server cpp").c_str()) == 0);
EXPECT_TRUE(system("./messagebus_test_cpp-client-error_app") == 0);
EXPECT_TRUE(system("../../binref/runjava JavaClient") == 0);
- EXPECT_TRUE(system("sh ctl.sh stop server cpp") == 0);
+ EXPECT_TRUE(system((ctl_script + " stop server cpp").c_str()) == 0);
}
{ // JAVA SERVER
{ // Make routing config
- EXPECT_TRUE(system("cat routing-template.cfg | sed 's#session#java/session#' > routing.cfg") == 0);
+ EXPECT_TRUE(system(("cat " + routing_template + " | sed 's#session#java/session#' > routing.cfg").c_str()) == 0);
}
fprintf(stderr, "STARTING JAVA-SERVER\n");
- EXPECT_TRUE(system("sh ctl.sh start server java") == 0);
+ EXPECT_TRUE(system((ctl_script + " start server java").c_str()) == 0);
EXPECT_TRUE(system("./messagebus_test_cpp-client-error_app") == 0);
EXPECT_TRUE(system("../../binref/runjava JavaClient") == 0);
- EXPECT_TRUE(system("sh ctl.sh stop server java") == 0);
+ EXPECT_TRUE(system((ctl_script + " stop server java").c_str()) == 0);
}
TEST_DONE();
}
diff --git a/messagebus_test/src/tests/error/error_test.sh b/messagebus_test/src/tests/error/error_test.sh
new file mode 100755
index 00000000000..0c39f3d1ad3
--- /dev/null
+++ b/messagebus_test/src/tests/error/error_test.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+set -e
+
+if [ -z "$SOURCE_DIRECTORY" ]; then
+ SOURCE_DIRECTORY="."
+fi
+
+. ../../binref/env.sh
+
+$BINREF/compilejava $SOURCE_DIRECTORY/JavaServer.java
+$BINREF/compilejava $SOURCE_DIRECTORY/JavaClient.java
+VESPA_LOG_LEVEL='all -spam' ./messagebus_test_error_test_app
diff --git a/messagebus/test/src/tests/error/progdefs.sh b/messagebus_test/src/tests/error/progdefs.sh
index 2f6f37a9425..47d02d95b93 100644
--- a/messagebus/test/src/tests/error/progdefs.sh
+++ b/messagebus_test/src/tests/error/progdefs.sh
@@ -1,3 +1,3 @@
# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
prog server cpp "" "./messagebus_test_cpp-server-error_app"
-prog server java "" "../../binref/runjava JavaServer"
+prog server java "" "$BINREF/runjava JavaServer"
diff --git a/messagebus/test/src/tests/error/routing-template.cfg b/messagebus_test/src/tests/error/routing-template.cfg
index 4b938c9cc82..4b938c9cc82 100644
--- a/messagebus/test/src/tests/error/routing-template.cfg
+++ b/messagebus_test/src/tests/error/routing-template.cfg
diff --git a/messagebus/test/src/tests/errorcodes/.gitignore b/messagebus_test/src/tests/errorcodes/.gitignore
index 13957172a38..13957172a38 100644
--- a/messagebus/test/src/tests/errorcodes/.gitignore
+++ b/messagebus_test/src/tests/errorcodes/.gitignore
diff --git a/messagebus/test/src/tests/errorcodes/CMakeLists.txt b/messagebus_test/src/tests/errorcodes/CMakeLists.txt
index 3e12ae340d3..b996c58464c 100644
--- a/messagebus/test/src/tests/errorcodes/CMakeLists.txt
+++ b/messagebus_test/src/tests/errorcodes/CMakeLists.txt
@@ -3,5 +3,7 @@ vespa_add_executable(messagebus_test_dumpcodes_app TEST
SOURCES
dumpcodes.cpp
DEPENDS
+ messagebus
)
-vespa_add_test(NAME messagebus_test_dumpcodes_app NO_VALGRIND COMMAND sh errorcodes_test.sh)
+vespa_add_test(NAME messagebus_test_dumpcodes_app NO_VALGRIND COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/errorcodes_test.sh
+ DEPENDS messagebus_test_dumpcodes_app)
diff --git a/messagebus/test/src/tests/errorcodes/DESC b/messagebus_test/src/tests/errorcodes/DESC
index 103ebb4698f..103ebb4698f 100644
--- a/messagebus/test/src/tests/errorcodes/DESC
+++ b/messagebus_test/src/tests/errorcodes/DESC
diff --git a/messagebus/test/src/tests/errorcodes/DumpCodes.java b/messagebus_test/src/tests/errorcodes/DumpCodes.java
index 8eb97813404..8eb97813404 100644
--- a/messagebus/test/src/tests/errorcodes/DumpCodes.java
+++ b/messagebus_test/src/tests/errorcodes/DumpCodes.java
diff --git a/messagebus/test/src/tests/errorcodes/FILES b/messagebus_test/src/tests/errorcodes/FILES
index 766402133fb..766402133fb 100644
--- a/messagebus/test/src/tests/errorcodes/FILES
+++ b/messagebus_test/src/tests/errorcodes/FILES
diff --git a/messagebus/test/src/tests/errorcodes/dumpcodes.cpp b/messagebus_test/src/tests/errorcodes/dumpcodes.cpp
index 121d8585726..121d8585726 100644
--- a/messagebus/test/src/tests/errorcodes/dumpcodes.cpp
+++ b/messagebus_test/src/tests/errorcodes/dumpcodes.cpp
diff --git a/messagebus_test/src/tests/errorcodes/errorcodes_test.sh b/messagebus_test/src/tests/errorcodes/errorcodes_test.sh
new file mode 100755
index 00000000000..e6ecc033ef3
--- /dev/null
+++ b/messagebus_test/src/tests/errorcodes/errorcodes_test.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+set -e
+
+if [ -z "$SOURCE_DIRECTORY" ]; then
+ SOURCE_DIRECTORY="."
+fi
+
+. ../../binref/env.sh
+
+$BINREF/compilejava $SOURCE_DIRECTORY/DumpCodes.java
+
+./messagebus_test_dumpcodes_app > cpp-dump.txt
+$BINREF/runjava DumpCodes > java-dump.txt
+diff -u $SOURCE_DIRECTORY/ref-dump.txt cpp-dump.txt
+diff -u $SOURCE_DIRECTORY/ref-dump.txt java-dump.txt
diff --git a/messagebus/test/src/tests/errorcodes/ref-dump.txt b/messagebus_test/src/tests/errorcodes/ref-dump.txt
index b8038816897..b8038816897 100644
--- a/messagebus/test/src/tests/errorcodes/ref-dump.txt
+++ b/messagebus_test/src/tests/errorcodes/ref-dump.txt
diff --git a/messagebus/test/src/tests/speed/.gitignore b/messagebus_test/src/tests/speed/.gitignore
index 326da75ebb6..326da75ebb6 100644
--- a/messagebus/test/src/tests/speed/.gitignore
+++ b/messagebus_test/src/tests/speed/.gitignore
diff --git a/messagebus/test/src/tests/speed/CMakeLists.txt b/messagebus_test/src/tests/speed/CMakeLists.txt
index 8e1018ec07c..5a5f9615c42 100644
--- a/messagebus/test/src/tests/speed/CMakeLists.txt
+++ b/messagebus_test/src/tests/speed/CMakeLists.txt
@@ -3,15 +3,19 @@ vespa_add_executable(messagebus_test_speed_test_app
SOURCES
speed.cpp
DEPENDS
+ messagebus_messagebus-test
)
-vespa_add_test(NAME messagebus_test_speed_test_app COMMAND messagebus_test_speed_test_app BENCHMARK)
vespa_add_executable(messagebus_test_cpp-server-speed_app
SOURCES
cpp-server.cpp
DEPENDS
+ messagebus_messagebus-test
)
vespa_add_executable(messagebus_test_cpp-client-speed_app
SOURCES
cpp-client.cpp
DEPENDS
+ messagebus_messagebus-test
)
+vespa_add_test(NAME messagebus_test_speed_test_app COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/speed_test.sh BENCHMARK
+ DEPENDS messagebus_test_speed_test_app messagebus_test_cpp-server-speed_app messagebus_test_cpp-client-speed_app )
diff --git a/messagebus/test/src/tests/speed/DESC b/messagebus_test/src/tests/speed/DESC
index 10734957438..10734957438 100644
--- a/messagebus/test/src/tests/speed/DESC
+++ b/messagebus_test/src/tests/speed/DESC
diff --git a/messagebus/test/src/tests/speed/FILES b/messagebus_test/src/tests/speed/FILES
index 09f0a5ec1d3..09f0a5ec1d3 100644
--- a/messagebus/test/src/tests/speed/FILES
+++ b/messagebus_test/src/tests/speed/FILES
diff --git a/messagebus/test/src/tests/speed/JavaClient.java b/messagebus_test/src/tests/speed/JavaClient.java
index b905ab07e91..b905ab07e91 100644
--- a/messagebus/test/src/tests/speed/JavaClient.java
+++ b/messagebus_test/src/tests/speed/JavaClient.java
diff --git a/messagebus/test/src/tests/speed/JavaServer.java b/messagebus_test/src/tests/speed/JavaServer.java
index afec6dcdba2..afec6dcdba2 100644
--- a/messagebus/test/src/tests/speed/JavaServer.java
+++ b/messagebus_test/src/tests/speed/JavaServer.java
diff --git a/messagebus/test/src/tests/speed/cpp-client.cpp b/messagebus_test/src/tests/speed/cpp-client.cpp
index c0c9d621a20..c0c9d621a20 100644
--- a/messagebus/test/src/tests/speed/cpp-client.cpp
+++ b/messagebus_test/src/tests/speed/cpp-client.cpp
diff --git a/messagebus/test/src/tests/speed/cpp-server.cpp b/messagebus_test/src/tests/speed/cpp-server.cpp
index c2cd9bf262a..c2cd9bf262a 100644
--- a/messagebus/test/src/tests/speed/cpp-server.cpp
+++ b/messagebus_test/src/tests/speed/cpp-server.cpp
diff --git a/messagebus_test/src/tests/speed/ctl.sh b/messagebus_test/src/tests/speed/ctl.sh
new file mode 100755
index 00000000000..ca4fc7701e6
--- /dev/null
+++ b/messagebus_test/src/tests/speed/ctl.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+if [ -z "$SOURCE_DIRECTORY" ]; then
+ SOURCE_DIRECTORY="."
+fi
+
+. ../../binref/env.sh
+
+exec $SOURCE_DIRECTORY/../../binref/progctl.sh $SOURCE_DIRECTORY/progdefs.sh "$@"
diff --git a/messagebus/test/src/tests/speed/progdefs.sh b/messagebus_test/src/tests/speed/progdefs.sh
index 4e0390142cf..0b2bd600db0 100644
--- a/messagebus/test/src/tests/speed/progdefs.sh
+++ b/messagebus_test/src/tests/speed/progdefs.sh
@@ -1,3 +1,3 @@
# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
prog server cpp "" "./messagebus_test_cpp-server-speed_app"
-prog server java "" "../../binref/runjava JavaServer"
+prog server java "" "$BINREF/runjava JavaServer"
diff --git a/messagebus/test/src/tests/speed/routing-template.cfg b/messagebus_test/src/tests/speed/routing-template.cfg
index 4b938c9cc82..4b938c9cc82 100644
--- a/messagebus/test/src/tests/speed/routing-template.cfg
+++ b/messagebus_test/src/tests/speed/routing-template.cfg
diff --git a/messagebus/test/src/tests/speed/speed.cpp b/messagebus_test/src/tests/speed/speed.cpp
index 31ea419ce5c..1cfe1ff5704 100644
--- a/messagebus/test/src/tests/speed/speed.cpp
+++ b/messagebus_test/src/tests/speed/speed.cpp
@@ -3,6 +3,7 @@
#include <vespa/log/log.h>
LOG_SETUP("speed_test");
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/messagebus/testlib/slobrok.h>
#include <vespa/vespalib/util/stringfmt.h>
@@ -16,6 +17,10 @@ Test::Main()
{
TEST_INIT("speed_test");
Slobrok slobrok;
+
+ const std::string routing_template = TEST_PATH("routing-template.cfg");
+ const std::string ctl_script = TEST_PATH("ctl.sh");
+
{ // Make slobrok config
EXPECT_EQUAL(system("echo slobrok[1] > slobrok.cfg"), 0);
EXPECT_EQUAL(system(make_string("echo 'slobrok[0].connectionspec tcp/localhost:%d' "
@@ -23,29 +28,29 @@ Test::Main()
}
{ // CPP SERVER
{ // Make routing config
- EXPECT_EQUAL(system("cat routing-template.cfg | sed 's#session#cpp/session#' > routing.cfg"), 0);
+ EXPECT_EQUAL(system(("cat " + routing_template + " | sed 's#session#cpp/session#' > routing.cfg").c_str()), 0);
}
fprintf(stderr, "STARTING CPP-SERVER\n");
- EXPECT_EQUAL(system("sh ctl.sh start server cpp"), 0);
+ EXPECT_EQUAL(system((ctl_script + " start server cpp").c_str()), 0);
fprintf(stderr, "STARTING CPP-CLIENT\n");
EXPECT_EQUAL(system("./messagebus_test_cpp-client-speed_app"), 0);
fprintf(stderr, "STARTING JAVA-CLIENT\n");
EXPECT_EQUAL(system("../../binref/runjava JavaClient"), 0);
fprintf(stderr, "STOPPING\n");
- EXPECT_EQUAL(system("sh ctl.sh stop server cpp"), 0);
+ EXPECT_EQUAL(system((ctl_script + " stop server cpp").c_str()), 0);
}
{ // JAVA SERVER
{ // Make routing config
- EXPECT_EQUAL(system("cat routing-template.cfg | sed 's#session#java/session#' > routing.cfg"), 0);
+ EXPECT_EQUAL(system(("cat " + routing_template + " | sed 's#session#java/session#' > routing.cfg").c_str()), 0);
}
fprintf(stderr, "STARTING JAVA-SERVER\n");
- EXPECT_EQUAL(system("sh ctl.sh start server java"), 0);
+ EXPECT_EQUAL(system((ctl_script + " start server java").c_str()), 0);
fprintf(stderr, "STARTING CPP-CLIENT\n");
EXPECT_EQUAL(system("./messagebus_test_cpp-client-speed_app"), 0);
fprintf(stderr, "STARTING JAVA-CLIENT\n");
EXPECT_EQUAL(system("../../binref/runjava JavaClient"), 0);
fprintf(stderr, "STOPPING\n");
- EXPECT_EQUAL(system("sh ctl.sh stop server java"), 0);
+ EXPECT_EQUAL(system((ctl_script + " stop server java").c_str()), 0);
}
TEST_DONE();
}
diff --git a/messagebus_test/src/tests/speed/speed_test.sh b/messagebus_test/src/tests/speed/speed_test.sh
new file mode 100755
index 00000000000..1d9ba27f84e
--- /dev/null
+++ b/messagebus_test/src/tests/speed/speed_test.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+set -e
+
+if [ -z "$SOURCE_DIRECTORY" ]; then
+ SOURCE_DIRECTORY="."
+fi
+
+. ../../binref/env.sh
+
+$BINREF/compilejava $SOURCE_DIRECTORY/JavaServer.java
+$BINREF/compilejava $SOURCE_DIRECTORY/JavaClient.java
+
+(ulimit -c; ulimit -H -c; ulimit -c unlimited; $VALGRIND ./messagebus_test_speed_test_app)
diff --git a/messagebus/test/src/tests/trace/.gitignore b/messagebus_test/src/tests/trace/.gitignore
index 1be907ec2f8..1be907ec2f8 100644
--- a/messagebus/test/src/tests/trace/.gitignore
+++ b/messagebus_test/src/tests/trace/.gitignore
diff --git a/messagebus/test/src/tests/trace/CMakeLists.txt b/messagebus_test/src/tests/trace/CMakeLists.txt
index af539fa2818..f43d66d9122 100644
--- a/messagebus/test/src/tests/trace/CMakeLists.txt
+++ b/messagebus_test/src/tests/trace/CMakeLists.txt
@@ -3,11 +3,13 @@ vespa_add_executable(messagebus_test_trace_test_app TEST
SOURCES
trace.cpp
DEPENDS
+ messagebus_messagebus-test
)
vespa_add_executable(messagebus_test_cpp-server-trace_app
SOURCES
cpp-server.cpp
DEPENDS
+ messagebus_messagebus-test
)
-vespa_add_test(NAME messagebus_test_trace_test_app NO_VALGRIND COMMAND sh trace_test.sh
+vespa_add_test(NAME messagebus_test_trace_test_app NO_VALGRIND COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/trace_test.sh
DEPENDS messagebus_test_trace_test_app messagebus_test_cpp-server-trace_app)
diff --git a/messagebus/test/src/tests/trace/DESC b/messagebus_test/src/tests/trace/DESC
index 452e75aefea..452e75aefea 100644
--- a/messagebus/test/src/tests/trace/DESC
+++ b/messagebus_test/src/tests/trace/DESC
diff --git a/messagebus/test/src/tests/trace/FILES b/messagebus_test/src/tests/trace/FILES
index 891e4df6273..891e4df6273 100644
--- a/messagebus/test/src/tests/trace/FILES
+++ b/messagebus_test/src/tests/trace/FILES
diff --git a/messagebus/test/src/tests/trace/JavaServer.java b/messagebus_test/src/tests/trace/JavaServer.java
index 5dfe15e3d0b..5dfe15e3d0b 100644
--- a/messagebus/test/src/tests/trace/JavaServer.java
+++ b/messagebus_test/src/tests/trace/JavaServer.java
diff --git a/messagebus/test/src/tests/trace/cpp-server.cpp b/messagebus_test/src/tests/trace/cpp-server.cpp
index 76e20bc3cfd..76e20bc3cfd 100644
--- a/messagebus/test/src/tests/trace/cpp-server.cpp
+++ b/messagebus_test/src/tests/trace/cpp-server.cpp
diff --git a/messagebus_test/src/tests/trace/ctl.sh b/messagebus_test/src/tests/trace/ctl.sh
new file mode 100755
index 00000000000..ca4fc7701e6
--- /dev/null
+++ b/messagebus_test/src/tests/trace/ctl.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+if [ -z "$SOURCE_DIRECTORY" ]; then
+ SOURCE_DIRECTORY="."
+fi
+
+. ../../binref/env.sh
+
+exec $SOURCE_DIRECTORY/../../binref/progctl.sh $SOURCE_DIRECTORY/progdefs.sh "$@"
diff --git a/messagebus/test/src/tests/trace/progdefs.sh b/messagebus_test/src/tests/trace/progdefs.sh
index fd35b6503e2..4071da4beb5 100644
--- a/messagebus/test/src/tests/trace/progdefs.sh
+++ b/messagebus_test/src/tests/trace/progdefs.sh
@@ -6,10 +6,10 @@ prog server cpp4 "" "./messagebus_test_cpp-server-trace_app server/cpp/3/A"
prog server cpp5 "" "./messagebus_test_cpp-server-trace_app server/cpp/3/B"
prog server cpp6 "" "./messagebus_test_cpp-server-trace_app server/cpp/3/C"
prog server cpp7 "" "./messagebus_test_cpp-server-trace_app server/cpp/3/D"
-prog server java1 "" "../../binref/runjava JavaServer server/java/1/A"
-prog server java2 "" "../../binref/runjava JavaServer server/java/2/A"
-prog server java3 "" "../../binref/runjava JavaServer server/java/2/B"
-prog server java4 "" "../../binref/runjava JavaServer server/java/3/A"
-prog server java5 "" "../../binref/runjava JavaServer server/java/3/B"
-prog server java6 "" "../../binref/runjava JavaServer server/java/3/C"
-prog server java7 "" "../../binref/runjava JavaServer server/java/3/D"
+prog server java1 "" "$BINREF/runjava JavaServer server/java/1/A"
+prog server java2 "" "$BINREF/runjava JavaServer server/java/2/A"
+prog server java3 "" "$BINREF/runjava JavaServer server/java/2/B"
+prog server java4 "" "$BINREF/runjava JavaServer server/java/3/A"
+prog server java5 "" "$BINREF/runjava JavaServer server/java/3/B"
+prog server java6 "" "$BINREF/runjava JavaServer server/java/3/C"
+prog server java7 "" "$BINREF/runjava JavaServer server/java/3/D"
diff --git a/messagebus_test/src/tests/trace/routing-template.cfg b/messagebus_test/src/tests/trace/routing-template.cfg
new file mode 100644
index 00000000000..72318131b99
--- /dev/null
+++ b/messagebus_test/src/tests/trace/routing-template.cfg
@@ -0,0 +1,32 @@
+routingtable[1]
+routingtable[0].protocol "Simple"
+routingtable[0].hop[3]
+routingtable[0].hop[0].name "hop1"
+routingtable[0].hop[0].selector "server/[All]/1/[All]/session"
+routingtable[0].hop[0].recipient[2]
+routingtable[0].hop[0].recipient[0] "server/cpp/1/A/session"
+routingtable[0].hop[0].recipient[1] "server/java/1/A/session"
+routingtable[0].hop[1].name "hop2"
+routingtable[0].hop[1].selector "server/[All]/2/[All]/session"
+routingtable[0].hop[1].recipient[4]
+routingtable[0].hop[1].recipient[0] "server/cpp/2/A/session"
+routingtable[0].hop[1].recipient[1] "server/cpp/2/B/session"
+routingtable[0].hop[1].recipient[2] "server/java/2/A/session"
+routingtable[0].hop[1].recipient[3] "server/java/2/B/session"
+routingtable[0].hop[2].name "hop3"
+routingtable[0].hop[2].selector "server/[All]/3/[All]/session"
+routingtable[0].hop[2].recipient[8]
+routingtable[0].hop[2].recipient[0] "server/cpp/3/A/session"
+routingtable[0].hop[2].recipient[1] "server/cpp/3/B/session"
+routingtable[0].hop[2].recipient[2] "server/cpp/3/C/session"
+routingtable[0].hop[2].recipient[3] "server/cpp/3/D/session"
+routingtable[0].hop[2].recipient[4] "server/java/3/A/session"
+routingtable[0].hop[2].recipient[5] "server/java/3/B/session"
+routingtable[0].hop[2].recipient[6] "server/java/3/C/session"
+routingtable[0].hop[2].recipient[7] "server/java/3/D/session"
+routingtable[0].route[1]
+routingtable[0].route[0].name "test"
+routingtable[0].route[0].hop[3]
+routingtable[0].route[0].hop[0] "hop1"
+routingtable[0].route[0].hop[1] "hop2"
+routingtable[0].route[0].hop[2] "hop3"
diff --git a/messagebus/test/src/tests/trace/trace.cpp b/messagebus_test/src/tests/trace/trace.cpp
index 94550460c84..f25c776ca74 100644
--- a/messagebus/test/src/tests/trace/trace.cpp
+++ b/messagebus_test/src/tests/trace/trace.cpp
@@ -3,6 +3,7 @@
#include <vespa/log/log.h>
LOG_SETUP("trace_test");
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/messagebus/testlib/slobrok.h>
#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/messagebus/emptyreply.h>
@@ -44,12 +45,19 @@ Test::Main()
{
TEST_INIT("trace_test");
Slobrok slobrok;
+ const std::string routing_template = TEST_PATH("routing-template.cfg");
+ const std::string ctl_script = TEST_PATH("ctl.sh");
+
{ // Make slobrok config
EXPECT_TRUE(system("echo slobrok[1] > slobrok.cfg") == 0);
EXPECT_TRUE(system(make_string("echo 'slobrok[0].connectionspec tcp/localhost:%d' "
">> slobrok.cfg", slobrok.port()).c_str()) == 0);
}
- EXPECT_TRUE(system("sh ctl.sh start all") == 0);
+ { // Make routing config
+ EXPECT_TRUE(system(("cat " + routing_template + " > routing.cfg").c_str()) == 0);
+ }
+
+ EXPECT_TRUE(system((ctl_script + " start all").c_str()) == 0);
RPCMessageBus mb(ProtocolSet().add(IProtocol::SP(new SimpleProtocol())),
RPCNetworkParams().setSlobrokConfig("file:slobrok.cfg"),
"file:routing.cfg");
@@ -108,6 +116,6 @@ Test::Main()
EXPECT_TRUE(!reply->hasErrors());
EXPECT_EQUAL(reply->getTrace().getRoot().encode(), expect.encode());
- EXPECT_TRUE(system("sh ctl.sh stop all") == 0);
+ EXPECT_TRUE(system((ctl_script + " stop all").c_str()) == 0);
TEST_DONE();
}
diff --git a/messagebus_test/src/tests/trace/trace_test.sh b/messagebus_test/src/tests/trace/trace_test.sh
new file mode 100755
index 00000000000..7bd344a8618
--- /dev/null
+++ b/messagebus_test/src/tests/trace/trace_test.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+set -e
+
+if [ -z "$SOURCE_DIRECTORY" ]; then
+ SOURCE_DIRECTORY="."
+fi
+
+. ../../binref/env.sh
+
+$BINREF/compilejava $SOURCE_DIRECTORY/JavaServer.java
+
+$VALGRIND ./messagebus_test_trace_test_app
diff --git a/searchcorespi/src/tests/plugin/CMakeLists.txt b/searchcorespi/src/tests/plugin/CMakeLists.txt
index ef7f0ad316f..333f927c3d2 100644
--- a/searchcorespi/src/tests/plugin/CMakeLists.txt
+++ b/searchcorespi/src/tests/plugin/CMakeLists.txt
@@ -1,14 +1,28 @@
# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+vespa_add_library(searchcorespi_tplugin
+ SOURCES
+ plugin.cpp
+ DEPENDS
+)
+vespa_add_library(searchcorespi_illegal-plugin
+ SOURCES
+ empty.cpp
+ DEPENDS
+)
vespa_add_executable(searchcorespi_plugin_test_app TEST
SOURCES
plugin_test.cpp
DEPENDS
searchcorespi
+ AFTER
+ searchcorespi_tplugin
+ searchcorespi_illegal-plugin
)
vespa_add_test(
NAME searchcorespi_plugin_test_app
COMMAND searchcorespi_plugin_test_app
ENVIRONMENT "LD_LIBRARY_PATH=."
+ DEPENDS searchcorespi_tplugin searchcorespi_illegal-plugin
)
vespa_add_executable(searchcorespi_factoryregistry_test_app TEST
SOURCES
@@ -17,13 +31,3 @@ vespa_add_executable(searchcorespi_factoryregistry_test_app TEST
searchcorespi
)
vespa_add_test(NAME searchcorespi_factoryregistry_test_app COMMAND searchcorespi_factoryregistry_test_app)
-vespa_add_library(searchcorespi_tplugin
- SOURCES
- plugin.cpp
- DEPENDS
-)
-vespa_add_library(searchcorespi_illegal-plugin
- SOURCES
- empty.cpp
- DEPENDS
-)