Skip to content

Commit 462ce2c

Browse files
committed
LDEV-4013 fix build label matching logic
1 parent 7cfaa72 commit 462ce2c

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

test/_testRunner.cfc

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,23 +103,25 @@ component {
103103
};
104104

105105
/* testbox mixes label and skip, which is confusing, skip false should always mean skip, so we check it manually */
106-
var checkTestLabels = function (any meta, string path ){
107-
if ( arrayLen (request.testLabels) eq 0 )
106+
var checkTestLabels = function ( any meta, string path ){
107+
if ( arrayLen ( request.testLabels ) eq 0 )
108108
return "";
109109
var labels = meta.labels ?: "";
110110
var labelsMatched = 0;
111111
loop array="#request.testLabels#" item="local.f" {
112-
if ( ListFindNoCase( f, labels ) gt 0 )
112+
if ( ListFindNoCase( labels, f ) gt 0 )
113113
labelsMatched++;
114114
}
115-
if ( labelsMatched neq arrayLen(request.testLabels) )
116-
return "didn't match all label(s)";
117-
else {
115+
if ( labelsMatched neq arrayLen( request.testLabels ) ){
116+
var failed = "#path# [#labels#] didn't match all label(s) #serializeJson(request.testLabels)#, only [#labelsMatched#] matched";
117+
// systemOutput(failed, true);
118+
return failed;
119+
} else {
118120
return ""; //ok
119121
}
120122
};
121123

122-
allowed = isValidTestCase( arguments.path );
124+
var allowed = isValidTestCase( arguments.path );
123125
//SystemOutput( arguments.path & " :: " & allowed, true );
124126
if ( allowed != "" ){
125127
if ( request.testDebug )

0 commit comments

Comments
 (0)