Skip to content

Commit 853379d

Browse files
committed
tests: update uninstall test for protobuf dependency
Protobuf is now installed into the Python environment, so its dist-info metadata files are expected to remain after uninstall. The test was updated to ignore them. Signed-off-by: Andrii Herheliuk <andrii@herheliuk.com>
1 parent d25d829 commit 853379d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/others/make/uninstall.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,18 @@ make uninstall DESTDIR=$DESTDIR
1212
set +x
1313

1414
# There should be no files left (directories are OK for now)
15-
if [ $(find $DESTDIR -type f | wc -l) -gt 0 ]; then
15+
# except protobuf under Python site-packages
16+
17+
ALLOW_RE='
18+
/python[0-9.]\+/site-packages/google/.*$
19+
| /python[0-9.]\+/site-packages/protobuf-[0-9.]\+\.dist-info/.*$
20+
'
21+
22+
LEFT=$(find "$DESTDIR" -type f | grep -vE "$ALLOW_RE" || true)
23+
24+
if [ -n "$LEFT" ]; then
1625
echo "Files left after uninstall:"
17-
find $DESTDIR -type f
26+
echo "$LEFT"
1827
echo "FAIL"
1928
exit 1
2029
fi

0 commit comments

Comments
 (0)