We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0959619 commit 0d73e97Copy full SHA for 0d73e97
1 file changed
tests/instances.tcl
@@ -495,7 +495,14 @@ while 1 {
495
continue
496
}
497
if {[file isdirectory $test]} continue
498
- set ::cur_test_file $test
+ # 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
+ }
506
puts [colorstr yellow "Testing unit: [lindex [file split $test] end]"]
507
if {[catch { source $test } err]} {
508
puts "FAILED: caught an error in the test $err"
0 commit comments