2024-01-17 16:30:48 +00:00
|
|
|
# to run the tests, run make PASS=controllerpassword test
|
|
|
|
|
|
|
|
PREFIX=/usr/local
|
2024-01-16 18:10:43 +00:00
|
|
|
PYTHON_EXE_MSYS=${PREFIX}/bin/python3.sh
|
2024-02-04 03:29:52 +00:00
|
|
|
PIP_EXE_MSYS=${PREFIX}/bin/pip3.sh
|
2024-01-16 18:10:43 +00:00
|
|
|
LOCAL_DOCTEST=${PREFIX}/bin/toxcore_run_doctest3.bash
|
2024-01-14 14:28:53 +00:00
|
|
|
DOCTEST=${LOCAL_DOCTEST}
|
2024-01-15 12:37:32 +00:00
|
|
|
MOD=stem_examples
|
|
|
|
|
|
|
|
check::
|
|
|
|
sh python3.sh -c "import ${MOD}"
|
2024-01-14 14:28:53 +00:00
|
|
|
|
|
|
|
lint::
|
|
|
|
sh .pylint.sh
|
|
|
|
|
2024-02-05 14:26:19 +00:00
|
|
|
install::
|
|
|
|
${PIP_EXE_MSYS} --python ${PYTHON_EXE_MSYS} install \
|
|
|
|
--target ${PREFIX}/lib/python${PYTHON_MINOR}/site-packages/ \
|
|
|
|
--upgrade .
|
2024-02-04 03:29:52 +00:00
|
|
|
|
2024-01-14 14:28:53 +00:00
|
|
|
rsync::
|
|
|
|
bash .rsync.sh
|
|
|
|
|
2024-01-17 16:30:48 +00: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 12:37:32 +00:00
|
|
|
|
2024-01-17 16:30:48 +00:00
|
|
|
# execute these tests as: make test PASS=password
|
2024-01-16 18:10:43 +00:00
|
|
|
test::
|
2024-01-17 16:30:48 +00:00
|
|
|
echo src/${MOD}/check_digests.py
|
|
|
|
TOR_CONTROLLER_PASSWORD=${PASS} src/${MOD}/check_digests.py
|
2024-02-04 03:29:52 +00:00
|
|
|
echo src/${MOD}/interpreter.py
|
|
|
|
TOR_CONTROLLER_PASSWORD=${PASS} src/${MOD}/interpreter.py
|
2024-01-17 20:35:20 +00:00
|
|
|
echo src/${MOD}/connection_resolution.py
|
|
|
|
sudo env TOR_CONTROLLER_PASSWORD=${PASS} src/${MOD}/connection_resolution.py
|
2024-01-16 18:10:43 +00: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 16:30:48 +00:00
|
|
|
# TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/exit_used.py 10
|
|
|
|
echo src/${MOD}/introduction_points.py
|
2024-01-16 18:10:43 +00:00
|
|
|
TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/introduction_points.py
|
2024-01-17 16:30:48 +00: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 18:10:43 +00:00
|
|
|
TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/mappaddress.py
|
2024-01-17 16:30:48 +00: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 18:10:43 +00:00
|
|
|
TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/relay_connections.py
|
2024-01-17 16:30:48 +00:00
|
|
|
echo src/${MOD}/tor_bootstrap_check.py
|
|
|
|
TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/tor_bootstrap_check.py
|
2024-01-16 18:10:43 +00:00
|
|
|
|
2024-01-14 14:28:53 +00:00
|
|
|
doctest:
|
2024-02-05 14:26:19 +00:00
|
|
|
sudo -u tor env PYTHONPATH=${PWD}/src \
|
2024-01-16 18:10:43 +00:00
|
|
|
${DOCTEST} ${MOD}.txt
|
2024-01-15 12:37:32 +00:00
|
|
|
|
|
|
|
veryclean:: clean
|
|
|
|
rm -rf build dist __pycache__ .pylint.err .pylint.out
|
|
|
|
|
|
|
|
clean::
|
|
|
|
find . -name \*~ -delete
|