stem_examples/Makefile

59 lines
2.1 KiB
Makefile
Raw Normal View History

2024-01-17 17:30:48 +01:00
# to run the tests, run make PASS=controllerpassword test
PREFIX=/usr/local
2024-01-16 19:10:43 +01:00
PYTHON_EXE_MSYS=${PREFIX}/bin/python3.sh
2024-02-04 04:29:52 +01:00
PIP_EXE_MSYS=${PREFIX}/bin/pip3.sh
2024-01-16 19:10:43 +01:00
LOCAL_DOCTEST=${PREFIX}/bin/toxcore_run_doctest3.bash
2024-01-14 15:28:53 +01:00
DOCTEST=${LOCAL_DOCTEST}
2024-01-15 13:37:32 +01:00
MOD=stem_examples
check::
sh python3.sh -c "import ${MOD}"
2024-01-14 15:28:53 +01:00
lint::
sh .pylint.sh
2024-02-04 04:29:52 +01:00
xinstall::
${PIP_EXE_MSYS} install --target ${PREFIX}/lib/python3.11/site-packages/ --upgrade .
2024-01-14 15:28:53 +01:00
rsync::
bash .rsync.sh
2024-01-17 17:30:48 +01:00
install::
${PYTHON_EXE_MSYS} -m pip --timeout=30 --disable-pip-version-check --proxy http://127.0.0.1:9128 install --only-binary :none: --progress-bar=off --target /usr/local/lib/python3.11/site-packages --upgrade .
2024-01-15 13:37:32 +01:00
2024-01-17 17:30:48 +01:00
# execute these tests as: make test PASS=password
2024-01-16 19:10:43 +01:00
test::
2024-01-17 17:30:48 +01:00
echo src/${MOD}/check_digests.py
TOR_CONTROLLER_PASSWORD=${PASS} src/${MOD}/check_digests.py
2024-02-04 04:29:52 +01:00
echo src/${MOD}/interpreter.py
TOR_CONTROLLER_PASSWORD=${PASS} src/${MOD}/interpreter.py
2024-01-17 21:35:20 +01:00
echo src/${MOD}/connection_resolution.py
sudo env TOR_CONTROLLER_PASSWORD=${PASS} src/${MOD}/connection_resolution.py
2024-01-16 19:10:43 +01:00
# broken because this site fails: http://128.31.0.39:9131/tor/status-vote
# ${PYTHON_EXE_MSYS} src/${MOD}/compare_flags.py
# cant use from make: waits for the cmdline to to terminate
2024-01-17 17:30:48 +01:00
# TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/exit_used.py 10
echo src/${MOD}/introduction_points.py
2024-01-16 19:10:43 +01:00
TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/introduction_points.py
2024-01-17 17:30:48 +01:00
echo src/${MOD}/list_circuits.py
TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/list_circuits.py
echo src/${MOD}/mappaddress.py
2024-01-16 19:10:43 +01:00
TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/mappaddress.py
2024-01-17 17:30:48 +01:00
echo src/${MOD}/outdated_relays.py NOT WORKING?
TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/outdated_relays.py
echo src/${MOD}/relay_connections.py
2024-01-16 19:10:43 +01:00
TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/relay_connections.py
2024-01-17 17:30:48 +01:00
echo src/${MOD}/tor_bootstrap_check.py
TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/tor_bootstrap_check.py
2024-01-16 19:10:43 +01:00
2024-01-14 15:28:53 +01:00
doctest:
export PYTHONPATH=${PWD}
2024-01-16 19:10:43 +01:00
${DOCTEST} ${MOD}.txt
2024-01-15 13:37:32 +01:00
veryclean:: clean
rm -rf build dist __pycache__ .pylint.err .pylint.out
clean::
find . -name \*~ -delete