test: update default location of sharness

It's included as a module for a reason.

Also, use "$0" so the tests can be run like `./t/main.t` (or any other
directory).

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
Felipe Contreras
2023-03-26 20:02:29 -06:00
parent a89033b5b1
commit 51db3b4236
2 changed files with 2 additions and 2 deletions

View File

@@ -5,7 +5,7 @@
test_description='Main tests'
. "${SHARNESS_TEST_SRCDIR-/usr/share/sharness}"/sharness.sh || exit 1
. "${SHARNESS_TEST_SRCDIR-$(dirname "$0")/sharness}"/sharness.sh || exit 1
check() {
echo "$3" > expected &&

View File

@@ -8,7 +8,7 @@
test_description='Smoke test'
. "${SHARNESS_TEST_SRCDIR-/usr/share/sharness}"/sharness.sh || exit 1
. "${SHARNESS_TEST_SRCDIR-$(dirname "$0")/sharness}"/sharness.sh || exit 1
check() {
echo "$3" > expected &&