diff --git a/native/jni/run-tests.sh b/native/jni/run-tests.sh
index 898ea1610d6bf43b70086c8812af2566513f5e30..5b60e0d65d8c586eaa195fb6b48ca567b764df7a 100755
--- a/native/jni/run-tests.sh
+++ b/native/jni/run-tests.sh
@@ -18,7 +18,7 @@ echo "Usage:" 1>&2
 echo "    source $0" 1>&2
 echo "  or" 1>&2
 echo "    . $0" 1>&2
-exit 1
+if [[ ${BASH_SOURCE[0]} != $0 ]]; then return; else exit 1; fi
 fi
 
 pushd $PWD > /dev/null
diff --git a/tools/dicttool/tests/etc/test-dicttool.sh b/tools/dicttool/tests/etc/test-dicttool.sh
index 5eb44fc8558e5ee78a0545bda622c6609c1d74b6..f96db6816767383b658a7250712ba3cd8cf7ffe2 100755
--- a/tools/dicttool/tests/etc/test-dicttool.sh
+++ b/tools/dicttool/tests/etc/test-dicttool.sh
@@ -18,7 +18,7 @@ echo "Usage:" 1>&2
 echo "    source $0" 1>&2
 echo "  or" 1>&2
 echo "    . $0" 1>&2
-exit 1
+if [[ ${BASH_SOURCE[0]} != $0 ]]; then return; else exit 1; fi
 fi
 
 find out -name "dicttool_aosp*" -exec rm -rf {} \; > /dev/null 2>&1