|
|
|
@ -126,7 +126,7 @@ parse_flags () |
|
|
|
echo "Invalid option $1" |
|
|
|
echo "Invalid option $1" |
|
|
|
fi |
|
|
|
fi |
|
|
|
echo " |
|
|
|
echo " |
|
|
|
Usage: "${0}" [options] |
|
|
|
Usage: ${0} [options] |
|
|
|
|
|
|
|
|
|
|
|
Options: |
|
|
|
Options: |
|
|
|
|
|
|
|
|
|
|
|
@ -155,7 +155,7 @@ run_jm_tests () |
|
|
|
btcuser="bitcoinrpc" |
|
|
|
btcuser="bitcoinrpc" |
|
|
|
btcpwd="123456abcdef" |
|
|
|
btcpwd="123456abcdef" |
|
|
|
nirc="2" |
|
|
|
nirc="2" |
|
|
|
if ! parse_flags ${@}; then |
|
|
|
if ! parse_flags "${@}"; then |
|
|
|
return 1 |
|
|
|
return 1 |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
@ -176,7 +176,7 @@ run_jm_tests () |
|
|
|
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${VIRTUAL_ENV}/lib" |
|
|
|
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${VIRTUAL_ENV}/lib" |
|
|
|
export C_INCLUDE_PATH="${C_INCLUDE_PATH}:${VIRTUAL_ENV}/include" |
|
|
|
export C_INCLUDE_PATH="${C_INCLUDE_PATH}:${VIRTUAL_ENV}/include" |
|
|
|
|
|
|
|
|
|
|
|
pushd "${jm_source}" |
|
|
|
pushd "${jm_source}" || return 1 |
|
|
|
if [ ! -f 'miniircd.tar.gz' ] || ! sha256_verify 'ce3a4ddc777343645ccd06ca36233b5777e218ee89d887ef529ece86a917fc33' 'miniircd.tar.gz'; then |
|
|
|
if [ ! -f 'miniircd.tar.gz' ] || ! sha256_verify 'ce3a4ddc777343645ccd06ca36233b5777e218ee89d887ef529ece86a917fc33' 'miniircd.tar.gz'; then |
|
|
|
http_get "https://github.com/JoinMarket-Org/miniircd/archive/master.tar.gz" "miniircd.tar.gz" |
|
|
|
http_get "https://github.com/JoinMarket-Org/miniircd/archive/master.tar.gz" "miniircd.tar.gz" |
|
|
|
fi |
|
|
|
fi |
|
|
|
@ -217,18 +217,18 @@ run_jm_tests () |
|
|
|
echo "datadir=${jm_test_datadir}" >> "${jm_test_datadir}/bitcoin.conf" |
|
|
|
echo "datadir=${jm_test_datadir}" >> "${jm_test_datadir}/bitcoin.conf" |
|
|
|
python -m pytest $additional_pytest_flags \ |
|
|
|
python -m pytest $additional_pytest_flags \ |
|
|
|
${HAS_JOSH_K_SEAL_OF_APPROVAL+--cov=jmclient --cov=jmbitcoin --cov=jmbase --cov=jmdaemon --cov-report html} \ |
|
|
|
${HAS_JOSH_K_SEAL_OF_APPROVAL+--cov=jmclient --cov=jmbitcoin --cov=jmbase --cov=jmdaemon --cov-report html} \ |
|
|
|
--btcconf=$btcconf \ |
|
|
|
--btcconf="$btcconf" \ |
|
|
|
--btcpwd=$btcpwd \ |
|
|
|
--btcpwd="$btcpwd" \ |
|
|
|
--btcroot=$btcroot \ |
|
|
|
--btcroot="$btcroot" \ |
|
|
|
--btcuser=$btcuser \ |
|
|
|
--btcuser="$btcuser" \ |
|
|
|
--nirc=$nirc \ |
|
|
|
--nirc="$nirc" \ |
|
|
|
-p no:warnings |
|
|
|
-p no:warnings |
|
|
|
local success="$?" |
|
|
|
local success="$?" |
|
|
|
[[ -f ./joinmarket.cfg ]] && unlink ./joinmarket.cfg |
|
|
|
[[ -f ./joinmarket.cfg ]] && unlink ./joinmarket.cfg |
|
|
|
if [ -f "${jm_test_datadir}/bitcoind.pid" ] && read bitcoind_pid <"${jm_test_datadir}/bitcoind.pid"; then |
|
|
|
if [ -f "${jm_test_datadir}/bitcoind.pid" ] && read -r bitcoind_pid < "${jm_test_datadir}/bitcoind.pid"; then |
|
|
|
kill -15 ${bitcoind_pid} || kill -9 ${bitcoind_pid} |
|
|
|
kill -15 "${bitcoind_pid}" || kill -9 "${bitcoind_pid}" |
|
|
|
fi |
|
|
|
fi |
|
|
|
if [[ "${HAS_JOSH_K_SEAL_OF_APPROVAL}" == true ]] && (( ${success} != 0 )); then |
|
|
|
if [[ "${HAS_JOSH_K_SEAL_OF_APPROVAL}" == true ]] && (( success != 0 )); then |
|
|
|
tail -100 "${jm_test_datadir}/regtest/debug.log" |
|
|
|
tail -100 "${jm_test_datadir}/regtest/debug.log" |
|
|
|
find "${jm_test_datadir}" |
|
|
|
find "${jm_test_datadir}" |
|
|
|
else |
|
|
|
else |
|
|
|
@ -236,4 +236,4 @@ run_jm_tests () |
|
|
|
fi |
|
|
|
fi |
|
|
|
return ${success:-1} |
|
|
|
return ${success:-1} |
|
|
|
} |
|
|
|
} |
|
|
|
run_jm_tests ${@} |
|
|
|
run_jm_tests "${@}" |
|
|
|
|