Only allow ssh subprocess (via say -r -) if BUP_TEST_LEVEL

0 views
Skip to first unread message

Rob Browning

unread,
Feb 23, 2026, 2:36:04 PM (3 days ago) Feb 23
to bup-...@googlegroups.com
See the commit messages for further details.

Pushed to main.

--
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4

Rob Browning

unread,
Feb 23, 2026, 2:36:05 PM (3 days ago) Feb 23
to bup-...@googlegroups.com
BUP_TEST_LEVEL existing in the environment will now be the indicator
that we're testing.

Signed-off-by: Rob Browning <r...@defaultvalue.org>
Tested-by: Rob Browning <r...@defaultvalue.org>
---
test/lib/wvpytest.py | 4 +++-
wvtest.sh | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/test/lib/wvpytest.py b/test/lib/wvpytest.py
index b292db0c..50d4f8d6 100644
--- a/test/lib/wvpytest.py
+++ b/test/lib/wvpytest.py
@@ -1,8 +1,10 @@
import os
import pytest

-# Precaution -- here just because it's already imported "everywhere".

+# These must be included by all tests. They're here just because this
+# is already sourced "everywhere".
+os.environb.setdefault(b'BUP_TEST_LEVEL', b'0')
os.environb[b'BUP_DIR'] = b'/dev/null'
os.environb[b'GIT_DIR'] = b'/dev/null'

diff --git a/wvtest.sh b/wvtest.sh
index 22eda616..34ce9e69 100644
--- a/wvtest.sh
+++ b/wvtest.sh
@@ -4,7 +4,9 @@
# . ./wvtest.sh
#

-# Here just because it's already sourced "everywhere".
+# These must be included by all tests. They're here just because this
+# is already sourced "everywhere".
+export BUP_TEST_LEVEL="${BUP_TEST_LEVEL:-0}"
export BUP_DIR=/dev/null
export GIT_DIR=/dev/null

--
2.47.3

Reply all
Reply to author
Forward
0 new messages