1 Star 0 Fork 8

abushwang/nbdkit

forked from OpenCloudOS Stream/nbdkit 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0013-tests-test-read-password-Remove-use-of-SRCDIR.patch 1.83 KB
一键复制 编辑 原始数据 按行查看 历史
abushwang 提交于 2023-07-13 15:37 . update to 1.35.5
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/abushwang/nbdkit.git
git@gitee.com:abushwang/nbdkit.git
abushwang
nbdkit
nbdkit
master

搜索帮助