jobdb::job-set-status $flight $jobinfo(job) $st
}
+proc testid_matches_globs {testid globs} {
+ foreach glob [split $globs] {
+ if {[string match $glob $testid]} {
+ return 1
+ }
+ }
+ return 0
+}
+
#---------- test script handling ----------
proc run-ts {args} {
eval jobdb::step-set-status [lrange $details 0 2] $result
jobdb::logputs stdout "finished $detstr $result $emsg"
- foreach truncate_glob [split $truncate_globs] {
- if {[string match $truncate_glob $testid]} {
- jobdb::logputs stdout "truncating job now as instructed"
- set truncate 1
- break
- }
+ if {[testid_matches_globs $testid $truncate_globs]} {
+ jobdb::logputs stdout "truncating job now as instructed"
+ set truncate 1
}
return [expr {![string compare $result pass]}]
}