Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit b89dbbe

Browse files
committed
Add lzma scanner to test to help debug
1 parent f1a7a0c commit b89dbbe

File tree

1 file changed

+22
-0
lines changed
  • containers/codespaces-linux/test-project

1 file changed

+22
-0
lines changed

containers/codespaces-linux/test-project/test.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,28 @@ check "pydocstyle" pydocstyle --version
3838
check "bandit" bandit --version
3939
check "virtualenv" virtualenv --version
4040

41+
# TODO: Remove this chunk. I added this to debug python
42+
echo 'which python'
43+
which python
44+
echo "Searching for python on PATH and testing for lzma..."
45+
all_python="$(whereis -b python | sed 's/^python: \(.*\)/\1/')"
46+
for python in $all_python
47+
do
48+
# Skip config binaries
49+
if echo "$python" | grep config &>/dev/null; then
50+
continue
51+
fi
52+
# Skip directories
53+
if [[ -d "$python" ]]; then
54+
continue
55+
fi
56+
if "$python" -c 'import lzma' &>/dev/null; then
57+
echo "$python: true"
58+
else
59+
echo "$python: false"
60+
fi
61+
done
62+
4163
check "lzma cpython test" python /opt/python/3.10.4/lib/python3.10/test/test_lzma.py
4264
check "lzma library included" python -c "import lzma"
4365

0 commit comments

Comments
 (0)