aboutsummaryrefslogtreecommitdiffstats
path: root/messagebus_test/src/binref
diff options
context:
space:
mode:
Diffstat (limited to 'messagebus_test/src/binref')
-rw-r--r--messagebus_test/src/binref/.gitignore5
-rw-r--r--messagebus_test/src/binref/CMakeLists.txt5
-rwxr-xr-xmessagebus_test/src/binref/compilejava.in11
-rw-r--r--messagebus_test/src/binref/env.sh.in4
l---------messagebus_test/src/binref/progctl.sh1
-rwxr-xr-xmessagebus_test/src/binref/runjava.in13
l---------messagebus_test/src/binref/testrun.sh1
7 files changed, 40 insertions, 0 deletions
diff --git a/messagebus_test/src/binref/.gitignore b/messagebus_test/src/binref/.gitignore
new file mode 100644
index 00000000000..c1b83610972
--- /dev/null
+++ b/messagebus_test/src/binref/.gitignore
@@ -0,0 +1,5 @@
+.depend
+Makefile
+compilejava
+env.sh
+runjava
diff --git a/messagebus_test/src/binref/CMakeLists.txt b/messagebus_test/src/binref/CMakeLists.txt
new file mode 100644
index 00000000000..20594f98d02
--- /dev/null
+++ b/messagebus_test/src/binref/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+configure_file(compilejava.in compilejava @ONLY)
+configure_file(runjava.in runjava @ONLY)
+configure_file(env.sh.in env.sh @ONLY)
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
new file mode 100644
index 00000000000..64bbed9c51e
--- /dev/null
+++ b/messagebus_test/src/binref/env.sh.in
@@ -0,0 +1,4 @@
+BINREF=@CMAKE_CURRENT_BINARY_DIR@
+SBCMD=@PROJECT_BINARY_DIR@/slobrok/src/apps/sbcmd/sbcmd
+SLOBROK=@PROJECT_BINARY_DIR@/slobrok/src/apps/slobrok/slobrok
+export BINREF SBCMD SLOBROK
diff --git a/messagebus_test/src/binref/progctl.sh b/messagebus_test/src/binref/progctl.sh
new file mode 120000
index 00000000000..781d2058cf9
--- /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
new file mode 100755
index 00000000000..f6427a1f7cc
--- /dev/null
+++ b/messagebus_test/src/binref/runjava.in
@@ -0,0 +1,13 @@
+#!/bin/sh
+unset VESPA_LOG_TARGET
+unset LD_PRELOAD
+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]"
+ exit 1
+fi
+CLASS=$1
+shift
+exec java -cp $CLASSPATH $CLASS "$@"
diff --git a/messagebus_test/src/binref/testrun.sh b/messagebus_test/src/binref/testrun.sh
new file mode 120000
index 00000000000..457b9f75c5e
--- /dev/null
+++ b/messagebus_test/src/binref/testrun.sh
@@ -0,0 +1 @@
+../../../../vespalib/src/vespa/vespalib/testkit/testrun.sh \ No newline at end of file