From 2eb0a4600f24e39f0d73d040fd352d0969681124 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 13 Jul 2021 18:12:31 +0200 Subject: [PATCH] make+itest: add tranche index to test name To make it easier to see what tranche a failed test was running in, we add the tranche index to the test name. This corresponds to the number in the .logs-tranche folder name so the logs can be found much quicker. --- lntest/itest/lnd_test.go | 6 +++--- make/testing_flags.mk | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lntest/itest/lnd_test.go b/lntest/itest/lnd_test.go index 2ec062547..20acfdea9 100644 --- a/lntest/itest/lnd_test.go +++ b/lntest/itest/lnd_test.go @@ -205,9 +205,9 @@ func TestLightningNetworkDaemon(t *testing.T) { // Run the subset of the test cases selected in this tranche. for idx, testCase := range testCases { testCase := testCase - name := fmt.Sprintf("%02d-of-%d/%s/%s", - trancheOffset+uint(idx)+1, len(allTestCases), - chainBackend.Name(), testCase.name) + name := fmt.Sprintf("tranche%02d/%02d-of-%d/%s/%s", + trancheIndex, trancheOffset+uint(idx)+1, + len(allTestCases), chainBackend.Name(), testCase.name) success := t.Run(name, func(t1 *testing.T) { cleanTestCaseName := strings.ReplaceAll( diff --git a/make/testing_flags.mk b/make/testing_flags.mk index 1cfea5517..e75f3d6ce 100644 --- a/make/testing_flags.mk +++ b/make/testing_flags.mk @@ -46,7 +46,7 @@ endif # Define the integration test.run filter if the icase argument was provided. ifneq ($(icase),) -TEST_FLAGS += -test.run="TestLightningNetworkDaemon/.*-of-.*/.*/$(icase)" +TEST_FLAGS += -test.run="TestLightningNetworkDaemon/tranche.*/.*-of-.*/.*/$(icase)" endif # Run itests with specified db backend.