mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-06 05:49:30 +01:00
aaf41ade0a
We currently set TIMEOUT and PYTEST_PAR in our Travis instance directly, which is a bit unhelpful. In particular, parallelism should be increased when DEVELOPER isn't set since we spend 60 seconds waiting for gossip in many cases. If this doesn't stop timeouts, I'll have to mark more tests SLOW_MACHINE :( 331.24s call tests/test_connection.py::test_opening_tiny_channel 245.45s call tests/test_gossip.py::test_gossip_store_load_complex 215.35s call tests/test_invoices.py::test_invoice_routeboost 194.04s call tests/test_plugin.py::test_htlc_accepted_hook_forward_restart 182.62s call tests/test_plugin.py::test_htlc_accepted_hook_fail 182.02s call tests/test_plugin.py::test_htlc_accepted_hook_resolve 182.01s call tests/test_pay.py::test_pay_limits 159.10s call tests/test_gossip.py::test_gossip_notices_close 153.94s call tests/test_connection.py::test_peerinfo 121.62s call tests/test_invoices.py::test_invoice_preimage 121.46s call tests/test_gossip.py::test_gossipwith 120.76s call tests/test_pay.py::test_setchannelfee_all 120.61s call tests/test_connection.py::test_second_channel 120.42s call tests/test_closing.py::test_closing_id 120.39s call tests/test_gossip.py::test_gossip_addresses 120.39s call tests/test_gossip.py::test_gossip_weirdalias Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
54 lines
1.6 KiB
Bash
Executable File
54 lines
1.6 KiB
Bash
Executable File
#!/bin/bash -x
|
|
set -e
|
|
|
|
CWD=$(pwd)
|
|
export SLOW_MACHINE=1
|
|
export CC=${COMPILER:-gcc}
|
|
export DEVELOPER=${DEVELOPER:-1}
|
|
export SOURCE_CHECK_ONLY=${SOURCE_CHECK_ONLY:-"false"}
|
|
export COMPAT=${COMPAT:-1}
|
|
export PATH=$CWD/dependencies/bin:"$HOME"/.local/bin:"$PATH"
|
|
export TIMEOUT=180
|
|
export PYTEST_PAR=2
|
|
# If we're not in developer mode, tests spend a lot of time waiting for gossip!
|
|
if [ "$DEVELOPER" = 0 ]; then
|
|
PYTEST_PAR=4
|
|
fi
|
|
|
|
mkdir -p dependencies/bin || true
|
|
|
|
# Download bitcoind and bitcoin-cli
|
|
if [ ! -f dependencies/bin/bitcoind ]; then
|
|
wget https://bitcoin.org/bin/bitcoin-core-0.17.1/bitcoin-0.17.1-x86_64-linux-gnu.tar.gz
|
|
tar -xzf bitcoin-0.17.1-x86_64-linux-gnu.tar.gz
|
|
mv bitcoin-0.17.1/bin/* dependencies/bin
|
|
rm -rf bitcoin-0.17.1-x86_64-linux-gnu.tar.gz bitcoin-0.17.1
|
|
fi
|
|
|
|
pyenv global 3.7
|
|
pip3 install --user --quiet -r tests/requirements.txt
|
|
pip3 install --quiet \
|
|
pytest-test-groups==1.0.3
|
|
|
|
echo "Configuration which is going to be built:"
|
|
echo -en 'travis_fold:start:script.1\\r'
|
|
./configure CC="$CC"
|
|
cat config.vars
|
|
echo -en 'travis_fold:end:script.1\\r'
|
|
|
|
if [ "$SOURCE_CHECK_ONLY" == "false" ]; then
|
|
echo -en 'travis_fold:start:script.2\\r'
|
|
make -j3 > /dev/null
|
|
echo -en 'travis_fold:end:script.2\\r'
|
|
|
|
echo -en 'travis_fold:start:script.3\\r'
|
|
make check
|
|
echo -en 'travis_fold:end:script.3\\r'
|
|
else
|
|
git clone https://github.com/lightningnetwork/lightning-rfc.git
|
|
echo -en 'travis_fold:start:script.2\\r'
|
|
make -j3 > /dev/null
|
|
echo -en 'travis_fold:end:script.2\\r'
|
|
make check-source BOLTDIR=lightning-rfc
|
|
fi
|