aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/internals/test_internals_valgrind.sh4
-rwxr-xr-xtests/internals/test_rate_limiter_valgrind.sh4
-rwxr-xr-xtests/test_bindfs.rb7
3 files changed, 11 insertions, 4 deletions
diff --git a/tests/internals/test_internals_valgrind.sh b/tests/internals/test_internals_valgrind.sh
index a84c664..4511ccd 100755
--- a/tests/internals/test_internals_valgrind.sh
+++ b/tests/internals/test_internals_valgrind.sh
@@ -1,3 +1,5 @@
#!/bin/sh
-cd `dirname "$0"`
+if [ ! -x ./test_internals ]; then
+ cd `dirname "$0"`
+fi
valgrind --error-exitcode=100 ./test_internals
diff --git a/tests/internals/test_rate_limiter_valgrind.sh b/tests/internals/test_rate_limiter_valgrind.sh
index e291360..bf0a7cd 100755
--- a/tests/internals/test_rate_limiter_valgrind.sh
+++ b/tests/internals/test_rate_limiter_valgrind.sh
@@ -1,3 +1,5 @@
#!/bin/sh
-cd `dirname "$0"`
+if [ ! -x ./test_rate_limiter ]; then
+ cd `dirname "$0"`
+fi
valgrind --error-exitcode=100 ./test_rate_limiter
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb
index 48611b2..39f709e 100755
--- a/tests/test_bindfs.rb
+++ b/tests/test_bindfs.rb
@@ -18,7 +18,10 @@
# along with bindfs. If not, see <http://www.gnu.org/licenses/>.
#
-require './common.rb'
+# if we are being run by make check it will set srcdir and we should use it
+localsrc_path = ENV['srcdir'] || '.'
+
+require localsrc_path + '/common.rb'
include Errno
@@ -39,7 +42,7 @@ $nobody_uid = nobody_uid = Etc.getpwnam('nobody').uid
$nobody_gid = nobody_gid = Etc.getpwnam('nobody').gid
$nobody_group = nobody_group = Etc.getgrgid(nobody_gid).name
-$tests_dir = File.dirname(File.realpath(__FILE__))
+$tests_dir = File.realpath('.')
testenv("") do