From 51db3b42368291de255d7a3281d2a962338bd2a3 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Sun, 26 Mar 2023 20:02:29 -0600 Subject: [PATCH] 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 --- t/main.t | 2 +- t/smoke-test.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/t/main.t b/t/main.t index c4603fc..25acb35 100755 --- a/t/main.t +++ b/t/main.t @@ -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 && diff --git a/t/smoke-test.t b/t/smoke-test.t index 5bda86a..73ffff8 100755 --- a/t/smoke-test.t +++ b/t/smoke-test.t @@ -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 &&