Add test for use of lldb inside venv

For https://bugzilla.redhat.com/show_bug.cgi?id=2361538.
This commit is contained in:
Nikita Popov 2025-07-09 12:48:06 +02:00 committed by nikic
commit 4f6d648643

View file

@ -7,15 +7,24 @@ rpm -q --requires "$LLDB_PACKAGE" | grep "python3\(\.12\)\?-lldb"
# Sanity test
g++ -g test.cpp
lldb -b -o 'breakpoint set --file test.cpp --line 8' \
-o run -o 'p i' -o 'p f'\
-- a.out | tee lldb.log
run_test() {
lldb -b -o 'breakpoint set --file test.cpp --line 8' \
-o run -o 'p i' -o 'p f'\
-- a.out | tee lldb.log
# shellcheck disable=SC2016
test "$(grep -c \
-e '(int) \($0 = \)\?1' \
-e '(float) \($1 = \)\?1' \
lldb.log \
)" -eq 2
# shellcheck disable=SC2016
test "$(grep -c \
-e '(int) \($0 = \)\?1' \
-e '(float) \($1 = \)\?1' \
lldb.log \
)" -eq 2
rm lldb.log
rm lldb.log
}
run_test
# Now try again inside virtualenv
python -m venv venv
source ./venv/bin/activate
run_test