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<index> folder name so the logs can be found much
quicker.
This commit is contained in:
Oliver Gugger 2021-07-13 18:12:31 +02:00
parent 9e1bb7e8e2
commit 2eb0a4600f
No known key found for this signature in database
GPG key ID: 8E4256593F177720
2 changed files with 4 additions and 4 deletions

View file

@ -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(

View file

@ -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.