aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/run-java-trial.sh11
-rwxr-xr-xscripts/run-native-trial.sh15
2 files changed, 23 insertions, 3 deletions
diff --git a/scripts/run-java-trial.sh b/scripts/run-java-trial.sh
index 889fc4ae..7e54a8cf 100755
--- a/scripts/run-java-trial.sh
+++ b/scripts/run-java-trial.sh
@@ -1,5 +1,8 @@
#!/bin/bash
+#export direct_bt_debug=true
+#export direct_bt_verbose=true
+
#
# See scripts/scripts/run-native-example.sh for general details,
# however, commandline arguments are not used for trials but '-log <logfile>'
@@ -78,10 +81,16 @@ test_classpath=/usr/share/java/junit4.jar:${build_dir}/java/direct_bt.jar:${buil
do_test() {
echo "script invocation: $0 ${script_args}"
echo logfile $logfile
+ echo test_class ${test_class}
+
+ test_dir="${build_dir}/trial/java/"
+ echo "cd ${test_dir}"
+ cd ${test_dir}
+ pwd
echo "/usr/bin/sudo" "/sbin/capsh" "--caps=cap_net_raw,cap_net_admin+eip cap_setpcap,cap_setuid,cap_setgid+ep" "--keep=1" "--user=sven" "--addamb=cap_net_raw,cap_net_admin+eip" "--" "-c" "ulimit -c unlimited; $EXE_WRAPPER ${JAVA_CMD} ${JAVA_PROPS} -cp ${test_classpath} -Djava.library.path=${rootdir}/dist-${archabi}/lib org.junit.runner.JUnitCore ${test_class} ${*@Q}"
- "/usr/bin/sudo" "/sbin/capsh" "--caps=cap_net_raw,cap_net_admin+eip cap_setpcap,cap_setuid,cap_setgid+ep" "--keep=1" "--user=sven" "--addamb=cap_net_raw,cap_net_admin+eip" "--" "-c" "ulimit -c unlimited; $EXE_WRAPPER ${JAVA_CMD} ${JAVA_PROPS} -cp ${test_classpath} -Djava.library.path=${rootdir}/dist-${archabi}/lib org.junit.runner.JUnitCore ${test_class} ${*@Q}"
+ "/usr/bin/sudo" -E "/sbin/capsh" "--caps=cap_net_raw,cap_net_admin+eip cap_setpcap,cap_setuid,cap_setgid+ep" "--keep=1" "--user=sven" "--addamb=cap_net_raw,cap_net_admin+eip" "--" "-c" "ulimit -c unlimited; $EXE_WRAPPER ${JAVA_CMD} ${JAVA_PROPS} -cp ${test_classpath} -Djava.library.path=${rootdir}/dist-${archabi}/lib org.junit.runner.JUnitCore ${test_class} ${*@Q}"
exit $?
}
diff --git a/scripts/run-native-trial.sh b/scripts/run-native-trial.sh
index 280e18b6..27a12d68 100755
--- a/scripts/run-native-trial.sh
+++ b/scripts/run-native-trial.sh
@@ -1,5 +1,8 @@
#!/bin/bash
+#export direct_bt_debug=true
+#export direct_bt_verbose=true
+
#
# See scripts/scripts/run-native-example.sh for general details,
# however, commandline arguments are not used for trials but '-log <logfile>'
@@ -21,7 +24,7 @@ else
logfile=
fi
-test_exe=test_client_server10_NoEnc
+test_exe=${build_dir}/trial/direct_bt/test_client_server10_NoEnc
if [ ! -z "$1" ] ; then
test_exe=$1
shift 1
@@ -58,8 +61,16 @@ export LANG=en_US.UTF-8
do_test() {
echo "script invocation: $0 ${script_args}"
echo logfile $logfile
+ echo test_exe ${test_exe}
+ echo test_basename ${test_basename}
+ echo direct_bt_debug ${direct_bt_debug}
+
+ test_dir=`dirname $test_exe`
+ echo "cd ${test_dir}"
+ cd ${test_dir}
+ pwd
- "/usr/bin/sudo" "/sbin/capsh" "--caps=cap_net_raw,cap_net_admin+eip cap_setpcap,cap_setuid,cap_setgid+ep" "--keep=1" "--user=sven" "--addamb=cap_net_raw,cap_net_admin+eip" "--" "-c" "ulimit -c unlimited; $EXE_WRAPPER ${test_exe} ${*@Q}"
+ "/usr/bin/sudo" -E "/sbin/capsh" "--caps=cap_net_raw,cap_net_admin+eip cap_setpcap,cap_setuid,cap_setgid+ep" "--keep=1" "--user=sven" "--addamb=cap_net_raw,cap_net_admin+eip" "--" "-c" "ulimit -c unlimited; $EXE_WRAPPER ./${test_basename} ${*@Q}"
exit $?
}