[PATCH 1/3] test-ls*: rename BUP_TEST_REMOTE_REPO to BUP_TEST_LS_FAKE_SSH_REMOTE

0 views
Skip to first unread message

Rob Browning

unread,
Jul 22, 2026, 5:00:40 PM (2 days ago) Jul 22
to bup-...@googlegroups.com
BUP_TEST_REMOTE_REPO is supposed to require "real ssh" (see HACKING),
but the remote test-ls tests are really designed to test the behavior
of the ls command, and so testing without real ssh is just fine, and
preferable, so that we can always test ls -r.

Replace BUP_TEST_REMOTE_REPO in test-ls* with
BUP_TEST_LS_FAKE_SSH_REMOTE since it is just a test-ls specific
control parameter.

Signed-off-by: Rob Browning <r...@defaultvalue.org>
Tested-by: Rob Browning <r...@defaultvalue.org>
---
test/ext/test-ls | 4 ++--
test/ext/test-ls-from-other-bup | 2 +-
test/ext/test-ls-remote | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/ext/test-ls b/test/ext/test-ls
index b9987068..35977971 100755
--- a/test/ext/test-ls
+++ b/test/ext/test-ls
@@ -10,7 +10,7 @@ tmpdir="$(WVPASS wvmktempdir)" || exit $?
export BUP_DIR="$tmpdir/bup"
export GIT_DIR="$tmpdir/bup"

-if test "$BUP_TEST_REMOTE_REPO"; then
+if test "$BUP_TEST_LS_FAKE_SSH_REMOTE"; then
ls_cmd_desc='ls -r'
else
ls_cmd_desc='ls'
@@ -20,7 +20,7 @@ bup() { "$top/bup" "$@"; }
with-tty() { "$top/dev/with-tty" "$@"; }

bup-ls() {
- if test "$BUP_TEST_REMOTE_REPO"; then
+ if test "$BUP_TEST_LS_FAKE_SSH_REMOTE"; then
"$top/bup" ls -r "-:$BUP_DIR" "$@"
else
"$top/bup" ls "$@"
diff --git a/test/ext/test-ls-from-other-bup b/test/ext/test-ls-from-other-bup
index 561e0afb..58f4a1c7 100755
--- a/test/ext/test-ls-from-other-bup
+++ b/test/ext/test-ls-from-other-bup
@@ -9,7 +9,7 @@ if test -z "$BUP_TEST_OTHER_BUP"; then
exit 0
fi

-export BUP_TEST_REMOTE_REPO=t # as per test-ls-remote
+export BUP_TEST_LS_FAKE_SSH_REMOTE=t # as per test-ls-remote
export BUP_TEST_SSH_BUP_PATH="$BUP_TEST_OTHER_BUP"

test/ext/test-ls
diff --git a/test/ext/test-ls-remote b/test/ext/test-ls-remote
index 1c59c531..d2e76269 100755
--- a/test/ext/test-ls-remote
+++ b/test/ext/test-ls-remote
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

-BUP_TEST_REMOTE_REPO=t test/ext/test-ls
+BUP_TEST_LS_FAKE_SSH_REMOTE=t test/ext/test-ls
--
2.47.3

Reply all
Reply to author
Forward
0 new messages