Skip to content

Commit 0d73e97

Browse files
committed
Fix the relative path of issues created for cluster and sentinel failures
Signed-off-by: Hanxi Zhang <hanxizh@amazon.com>
1 parent 0959619 commit 0d73e97

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/instances.tcl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,14 @@ while 1 {
495495
continue
496496
}
497497
if {[file isdirectory $test]} continue
498-
set ::cur_test_file $test
498+
# Convert relative path (../tests/...) to project-relative path (tests/<suite>/tests/...)
499+
set normalized [file normalize $test]
500+
set project_root [file normalize "../../.."]
501+
if {[string match "${project_root}/*" $normalized]} {
502+
set ::cur_test_file [string range $normalized [expr {[string length $project_root] + 1}] end]
503+
} else {
504+
set ::cur_test_file $test
505+
}
499506
puts [colorstr yellow "Testing unit: [lindex [file split $test] end]"]
500507
if {[catch { source $test } err]} {
501508
puts "FAILED: caught an error in the test $err"

0 commit comments

Comments
 (0)