From bf3b77a9477054cca6c06c16eff3413fc6bc3c5d Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Aug 2019 19:27:27 +0930 Subject: [PATCH] Travis: skip testing VALGRIND=1 DEVELOPER=0, remove the slowest non-developer tests. I don't remember ever seeing a bug which only showed up in VALGRIND=1 with developer mode disabled, so don't test that, and spread out the other test more evenly. In addition, disable the worst-performing tests in DEVELOPER=0 mode. Here timings from my build machine: the worst 6 (- DEVELOPER=0 VALGRIND=0) with the same tests (+ DEVELOPER=1 VALGRIND=1) -452.42s call tests/test_pay.py::test_channel_spendable +87.69s call tests/test_pay.py::test_channel_spendable -335.66s call tests/test_gossip.py::test_gossip_store_compact_on_load +47.41s call tests/test_gossip.py::test_gossip_store_compact_on_load -332.07s call tests/test_connection.py::test_opening_tiny_channel +89.71s call tests/test_connection.py::test_opening_tiny_channel -331.97s call tests/test_pay.py::test_channel_spendable_large +56.23s call tests/test_pay.py::test_channel_spendable_large -305.28s call tests/test_invoices.py::test_invoice_routeboost +37.57s call tests/test_invoices.py::test_invoice_routeboost -284.28s call tests/test_plugin.py::test_htlc_accepted_hook_forward_restart +49.12s call tests/test_plugin.py::test_htlc_accepted_hook_forward_restart Signed-off-by: Rusty Russell --- .travis.yml | 22 ++++++++++++---------- tests/test_connection.py | 1 + tests/test_gossip.py | 1 + 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3a5bdd9ba..c5453d97e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,18 +12,20 @@ env: # - VALGRIND=0 ARCH=32 DEVELOPER=1 COMPILER=gcc TEST_GROUP=1 TEST_GROUP_COUNT=2 SOURCE_CHECK_ONLY=false # - VALGRIND=0 ARCH=32 DEVELOPER=1 COMPILER=gcc TEST_GROUP=2 TEST_GROUP_COUNT=2 SOURCE_CHECK_ONLY=false - VALGRIND=0 ARCH=64 DEVELOPER=1 COMPILER=gcc SOURCE_CHECK_ONLY=false - - VALGRIND=0 ARCH=64 DEVELOPER=0 COMPILER=gcc COMPAT=0 SOURCE_CHECK_ONLY=false - - VALGRIND=1 ARCH=64 DEVELOPER=0 COMPILER=gcc TEST_GROUP=1 TEST_GROUP_COUNT=3 SOURCE_CHECK_ONLY=false - - VALGRIND=1 ARCH=64 DEVELOPER=0 COMPILER=gcc TEST_GROUP=2 TEST_GROUP_COUNT=3 SOURCE_CHECK_ONLY=false - - VALGRIND=1 ARCH=64 DEVELOPER=0 COMPILER=gcc TEST_GROUP=3 TEST_GROUP_COUNT=3 SOURCE_CHECK_ONLY=false + - VALGRIND=0 ARCH=64 DEVELOPER=0 COMPILER=gcc COMPAT=0 TEST_GROUP=1 TEST_GROUP_COUNT=2 SOURCE_CHECK_ONLY=false + - VALGRIND=0 ARCH=64 DEVELOPER=0 COMPILER=gcc COMPAT=0 TEST_GROUP=2 TEST_GROUP_COUNT=2 SOURCE_CHECK_ONLY=false +# - VALGRIND=1 ARCH=64 DEVELOPER=0 COMPILER=gcc TEST_GROUP=1 TEST_GROUP_COUNT=3 SOURCE_CHECK_ONLY=false +# - VALGRIND=1 ARCH=64 DEVELOPER=0 COMPILER=gcc TEST_GROUP=2 TEST_GROUP_COUNT=3 SOURCE_CHECK_ONLY=false +# - VALGRIND=1 ARCH=64 DEVELOPER=0 COMPILER=gcc TEST_GROUP=3 TEST_GROUP_COUNT=3 SOURCE_CHECK_ONLY=false - VALGRIND=0 ARCH=64 DEVELOPER=1 COMPILER=clang SOURCE_CHECK_ONLY=false - VALGRIND=0 ARCH=64 DEVELOPER=0 COMPILER=gcc-4.8 SOURCE_CHECK_ONLY=true - - VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=1 TEST_GROUP_COUNT=6 SOURCE_CHECK_ONLY=false - - VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=2 TEST_GROUP_COUNT=6 SOURCE_CHECK_ONLY=false - - VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=3 TEST_GROUP_COUNT=6 SOURCE_CHECK_ONLY=false - - VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=4 TEST_GROUP_COUNT=6 SOURCE_CHECK_ONLY=false - - VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=5 TEST_GROUP_COUNT=6 SOURCE_CHECK_ONLY=false - - VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=6 TEST_GROUP_COUNT=6 SOURCE_CHECK_ONLY=false + - VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=1 TEST_GROUP_COUNT=7 SOURCE_CHECK_ONLY=false + - VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=2 TEST_GROUP_COUNT=7 SOURCE_CHECK_ONLY=false + - VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=3 TEST_GROUP_COUNT=7 SOURCE_CHECK_ONLY=false + - VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=4 TEST_GROUP_COUNT=7 SOURCE_CHECK_ONLY=false + - VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=5 TEST_GROUP_COUNT=7 SOURCE_CHECK_ONLY=false + - VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=6 TEST_GROUP_COUNT=7 SOURCE_CHECK_ONLY=false + - VALGRIND=1 ARCH=64 DEVELOPER=1 COMPILER=gcc TEST_GROUP=7 TEST_GROUP_COUNT=7 SOURCE_CHECK_ONLY=false cache: directories: - dependencies diff --git a/tests/test_connection.py b/tests/test_connection.py index ff9c7de0b..ab29f9be2 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -131,6 +131,7 @@ def test_bad_opening(node_factory): l2.daemon.wait_for_log('to_self_delay 100 larger than 99') +@unittest.skipIf(not DEVELOPER, "gossip without DEVELOPER=1 is slow") def test_opening_tiny_channel(node_factory): # Test custom min-capacity-sat parameters # diff --git a/tests/test_gossip.py b/tests/test_gossip.py index 2d94f8774..4b460e116 100644 --- a/tests/test_gossip.py +++ b/tests/test_gossip.py @@ -1309,6 +1309,7 @@ def test_gossip_store_load_no_channel_update(node_factory): assert bytearray(f.read()) == bytearray.fromhex("07") +@unittest.skipIf(not DEVELOPER, "gossip without DEVELOPER=1 is slow") def test_gossip_store_compact_on_load(node_factory, bitcoind): l2 = setup_gossip_store_test(node_factory, bitcoind)