Skip to content

Commit b0ba2b5

Browse files
committed
Changed API so that user can call tProcessIDs as the string Inteoperability too, tested that it still works on Profiler and using RunAllTests
1 parent ecf4bef commit b0ba2b5

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

cls/TestCoverage/Manager.cls

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Property Monitor As TestCoverage.Utils.LineByLineMonitor [ InitialExpression = {
7676
/// Note that overall tracking is always available; more granular tracking requires more time and disk space.</li>
7777
/// <li><var>pLogIndex</var> (optional) allows for aggregation of code coverage results across unit test runs. To use this, get it back as output from the first test run, then pass it to the next.</li>
7878
/// <li><var>pSourceNamespace</var> (optional) specifies the namespace in which classes were compiled, defaulting to the current namespace. This may be required to retrieve some metadata.</li>
79-
/// <li><var>pPIDList</var> (optional) has a $ListBuild list of process IDs to monitor. If this is empty, all processes are monitored. If this is $listbuild("Interop"), the current process and all interoperability processes are monitored. By default, this is just the current process.</li>
79+
/// <li><var>pPIDList</var> (optional) has a $ListBuild list of process IDs to monitor. If this is empty, all processes are monitored. If this is $listbuild("Interop") or "Interoperability", the current process and all interoperability processes are monitored. By default, this is just the current process.</li>
8080
/// <li><var>pTiming</var> (optional) may be set to 1 to also collect timing information per line.</li>
8181
/// </ul>
8282
/// Granular data is stored in <class>TestCoverage.Data.Coverage</class>; aggregated data is stored per class in <class>TestCoverage.Data.Aggregate.ByCodeUnit</class> and for the whole run in <class>TestCoverage.Data.Aggregate.ByRun</class>.
@@ -213,7 +213,6 @@ Method StartCoverageTracking() As %Status [ Private ]
213213
Try {
214214
If (..CoverageTargets '= "") {
215215
Set $Namespace = ..SourceNamespace
216-
217216
Set tRelevantTargets = ""
218217
Set tNewTargets = ""
219218
Set tPointer = 0
@@ -272,7 +271,7 @@ Method StartCoverageTracking() As %Status [ Private ]
272271
}
273272
}
274273
}
275-
ElseIf ($list(tProcessIDs, 1)="Interop")
274+
ElseIf (..InteroperabilityProcesses)
276275
{
277276
do GetInteropProcesses(.tProcessIDs)
278277
}
@@ -568,9 +567,13 @@ ClassMethod OnBeforeAllTests(manager As TestCoverage.Manager, dir As %String, By
568567
Set tProcessIDs = $Get(userparam("ProcessIDs"),$ListBuild($Job))
569568
If (tProcessIDs = "*") {
570569
Set tProcessIDs = ""
571-
} ElseIf (tProcessIDs = "") || '$ListValid(tProcessIDs) {
570+
} ElseIf ((tProcessIDs = "Interoperability") || (tProcessIDs = "interoperability")) {
571+
Set manager.InteroperabilityProcesses = 1
572+
Set tProcessIDs = $lb("Interop")
573+
}
574+
ElseIf (tProcessIDs = "") || '$ListValid(tProcessIDs) {
572575
Set tProcessIDs = $ListBuild($Job)
573-
} ElseIf ($list(tProcessIDs, 1)="Interop") {
576+
} ElseIf (($list(tProcessIDs, 1)="Interop") || ($list(tProcessIDs, 1)="interop") ) {
574577
Set manager.InteroperabilityProcesses = 1
575578
}
576579
Set tTiming = $Get(userparam("Timing"),0)

0 commit comments

Comments
 (0)