61 lines
2.2 KiB
Makefile
61 lines
2.2 KiB
Makefile
# to run the tests, run make PASS=controllerpassword test
|
|
|
|
PREFIX=/usr/local
|
|
PYTHON_EXE_MSYS=${PREFIX}/bin/python3.sh
|
|
PIP_EXE_MSYS=${PREFIX}/bin/pip3.sh
|
|
LOCAL_DOCTEST=${PREFIX}/bin/toxcore_run_doctest3.bash
|
|
DOCTEST=${LOCAL_DOCTEST}
|
|
MOD=stem_examples
|
|
|
|
check::
|
|
sh python3.sh -c "import ${MOD}"
|
|
|
|
lint::
|
|
sh .pylint.sh
|
|
|
|
install::
|
|
${PIP_EXE_MSYS} --python ${PYTHON_EXE_MSYS} install \
|
|
--no-deps \
|
|
--target ${PREFIX}/lib/python${PYTHON_MINOR}/site-packages/ \
|
|
--upgrade .
|
|
sed -i -e "1s@/usr/bin/python${PYTHON_MINOR}@${PYTHON_EXE_MSYS}@" \
|
|
${PREFIX}/lib/python${PYTHON_MINOR}/site-packages/bin/*
|
|
|
|
rsync::
|
|
bash .rsync.sh
|
|
|
|
# execute these tests as: make test PASS=password
|
|
test::
|
|
echo src/${MOD}/check_digests.py
|
|
TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/check_digests.py
|
|
echo src/${MOD}/interpreter.py
|
|
TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/interpreter.py
|
|
echo src/${MOD}/connection_resolution.py
|
|
sudo env TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/connection_resolution.py
|
|
# 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
|
|
# TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/exit_used.py 10
|
|
echo src/${MOD}/introduction_points.py
|
|
TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/introduction_points.py
|
|
echo src/${MOD}/list_circuits.py
|
|
TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/list_circuits.py
|
|
echo src/${MOD}/mappaddress.py
|
|
TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/mappaddress.py
|
|
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
|
|
sudo env TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/relay_connections.py
|
|
echo src/${MOD}/tor_bootstrap_check.py
|
|
TOR_CONTROLLER_PASSWORD=${PASS} ${PYTHON_EXE_MSYS} src/${MOD}/tor_bootstrap_check.py
|
|
|
|
doctest:
|
|
sudo -u tor env PYTHONPATH=${PWD}/src \
|
|
${DOCTEST} ${MOD}.txt
|
|
|
|
veryclean:: clean
|
|
rm -rf build dist __pycache__ .pylint.err .pylint.out
|
|
|
|
clean::
|
|
find . -name \*~ -delete
|