56 lines
1.8 KiB
Diff
56 lines
1.8 KiB
Diff
|
From 92ae65f93d8ebeb09500552d7ebfc1e8149ded6f Mon Sep 17 00:00:00 2001
|
||
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||
|
Date: Thu, 22 Jun 2023 10:48:51 +0100
|
||
|
Subject: [PATCH 13/15] tests/test-read-password*: Remove use of $SRCDIR
|
||
|
|
||
|
These tests required exporting $abs_top_srcdir so that the plugin
|
||
|
(which is a C script) can use it.
|
||
|
---
|
||
|
tests/test-read-password-interactive.sh | 3 +++
|
||
|
tests/test-read-password.sh | 3 +++
|
||
|
tests/test-read-password-plugin.c | 2 +-
|
||
|
3 files changed, 7 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/tests/test-read-password-interactive.sh b/tests/test-read-password-interactive.sh
|
||
|
index ee345872e..2738922f4 100755
|
||
|
--- a/tests/test-read-password-interactive.sh
|
||
|
+++ b/tests/test-read-password-interactive.sh
|
||
|
@@ -39,6 +39,9 @@ requires_plugin cc
|
||
|
plugin=$abs_top_srcdir/tests/test-read-password-plugin.c
|
||
|
requires test -x $plugin
|
||
|
|
||
|
+# This variable is used by $plugin.
|
||
|
+export abs_top_srcdir
|
||
|
+
|
||
|
# expect on macOS does not work for unclear reasons, skip it.
|
||
|
requires_not test "$(uname)" = "Darwin"
|
||
|
|
||
|
diff --git a/tests/test-read-password.sh b/tests/test-read-password.sh
|
||
|
index d0033dceb..8243d5491 100755
|
||
|
--- a/tests/test-read-password.sh
|
||
|
+++ b/tests/test-read-password.sh
|
||
|
@@ -39,6 +39,9 @@ requires_plugin cc
|
||
|
plugin=$abs_top_srcdir/tests/test-read-password-plugin.c
|
||
|
requires test -x $plugin
|
||
|
|
||
|
+# This variable is used by $plugin.
|
||
|
+export abs_top_srcdir
|
||
|
+
|
||
|
# Since we are matching on error messages.
|
||
|
export LANG=C
|
||
|
|
||
|
diff --git a/tests/test-read-password-plugin.c b/tests/test-read-password-plugin.c
|
||
|
index d8faea4e3..397f69d72 100755
|
||
|
--- a/tests/test-read-password-plugin.c
|
||
|
+++ b/tests/test-read-password-plugin.c
|
||
|
@@ -1,5 +1,5 @@
|
||
|
#if 0
|
||
|
-exec nbdkit cc "$0" "$@" EXTRA_CFLAGS="-I.. -I${SRCDIR:-.}/../include"
|
||
|
+exec nbdkit cc "$0" "$@" EXTRA_CFLAGS="-I.. -I$abs_top_srcdir/include"
|
||
|
#endif
|
||
|
/* nbdkit
|
||
|
* Copyright Red Hat
|
||
|
--
|
||
|
2.41.0
|
||
|
|